public class ScreenShape extends java.lang.Object implements IScreenObject
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
model |
protected java.awt.Shape |
shape |
protected int |
zorder |
ZORDER_MAX, ZORDER_MIN
Constructor and Description |
---|
ScreenShape(java.lang.Object model,
java.awt.Shape shape,
int zorder) |
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.
|
protected java.lang.Object model
protected java.awt.Shape shape
protected int zorder
public ScreenShape(java.lang.Object model, java.awt.Shape shape, int zorder)
public java.awt.Rectangle getBounds()
getBounds
in interface IScreenObject
public java.lang.Object getModel()
getModel
in interface IScreenObject
public int getZOrder()
getZOrder
in interface IScreenObject
public boolean hitTest(java.awt.geom.Point2D point)
hitTest
in interface IScreenObject
point
- public boolean hitTest(java.awt.Rectangle rc)
hitTest
in interface IScreenObject
rc
- public void updateView(View2D view)
updateView
in interface IScreenObject
view
-