ur_rna.StructureEditor.services.drawing

## Class ScreenShape

- java.lang.Object
- - ur_rna.StructureEditor.services.drawing.ScreenShape

- All Implemented Interfaces:
    IScreenObject

      public class ScreenShape
      extends java.lang.Object
      implements IScreenObject

  Represents an object drawn onscreen that is meant to be interacted with by the user.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.Object` | `model`
    `protected java.awt.Shape` | `shape`
    `protected int` | `zorder`

    - ### Fields inherited from interface ur_rna.StructureEditor.models.IScreenObject

      `ZORDER_MAX, ZORDER_MIN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScreenShape(java.lang.Object model, java.awt.Shape shape, int zorder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Rectangle` | `getBounds()`
    `java.lang.Object` | `getModel()`
    `int` | `getZOrder()`
    `boolean` | `hitTest(java.awt.geom.Point2D point)` Determine if the object contains the given point (in screen coordinates)
    `boolean` | `hitTest(java.awt.Rectangle rc)` Determine if the object intersects the given rectangle (in screen coordinates)
    `void` | `updateView(View2D view)` Called before any other methods to notify the screen object of the current screen coordinates.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### model

          protected java.lang.Object model

    - #### shape

          protected java.awt.Shape shape

    - #### zorder

          protected int zorder

  - ### Constructor Detail

    - #### ScreenShape

          public ScreenShape(java.lang.Object model,
                             java.awt.Shape shape,
                             int zorder)

  - ### Method Detail

    - #### getBounds

          public java.awt.Rectangle getBounds()

      Specified by:
        `getBounds` in interface `IScreenObject`
      Returns:
        Returns the bounds of this screen object (in screen coordinates) The bounds should NOT include any additional selection border or buffer zone.

    - #### getModel

          public java.lang.Object getModel()

      Specified by:
        `getModel` in interface `IScreenObject`
      Returns:
        Returns the model-space object that is represented by this screen object.

    - #### getZOrder

          public int getZOrder()

      Specified by:
        `getZOrder` in interface `IScreenObject`
      Returns:
        Returns the z-order of the screen object. Objects with higher z-orders are given preference in hit-testing.

    - #### hitTest

          public boolean hitTest(java.awt.geom.Point2D point)

      Determine if the object contains the given point (in screen coordinates)
      Specified by:
        `hitTest` in interface `IScreenObject`
      Parameters:
        `point` -

    - #### hitTest

          public boolean hitTest(java.awt.Rectangle rc)

      Determine if the object intersects the given rectangle (in screen coordinates)
      Specified by:
        `hitTest` in interface `IScreenObject`
      Parameters:
        `rc` -

    - #### updateView

          public void updateView(View2D view)

      Called before any other methods to notify the screen object of the current screen coordinates.
      Specified by:
        `updateView` in interface `IScreenObject`
      Parameters:
        `view` -