|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.portrayal.SimplePortrayal2D
sim.portrayal.simple.TransformedPortrayal2D
A wrapper for other Portrayal2Ds which transforms the graphics space before drawing them.
Field Summary | |
SimplePortrayal2D |
child
|
java.awt.geom.AffineTransform |
transform
|
Constructor Summary | |
TransformedPortrayal2D(SimplePortrayal2D child,
java.awt.geom.AffineTransform transform)
|
Method Summary | |
void |
draw(java.lang.Object object,
java.awt.Graphics2D graphics,
DrawInfo2D info)
Draw a portrayed object centered at the origin in info, and with the given scaling factors. |
SimplePortrayal2D |
getChild(java.lang.Object object)
|
Inspector |
getInspector(LocationWrapper wrapper,
GUIState state)
Provide an inspector for an object. |
java.lang.String |
getName(LocationWrapper wrapper)
Returns a static, one-line name for the given object that is useful for a human to distinguish it from other objects. |
boolean |
hitObject(java.lang.Object object,
DrawInfo2D range)
If drawing area intersects selected area, return true. |
boolean |
setSelected(LocationWrapper wrapper,
boolean selected)
Change the portrayal state to reflect the fact that you've been selected or not selected. |
Methods inherited from class sim.portrayal.SimplePortrayal2D |
getStatus, move |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public SimplePortrayal2D child
public java.awt.geom.AffineTransform transform
Constructor Detail |
public TransformedPortrayal2D(SimplePortrayal2D child, java.awt.geom.AffineTransform transform)
Method Detail |
public SimplePortrayal2D getChild(java.lang.Object object)
public void draw(java.lang.Object object, java.awt.Graphics2D graphics, DrawInfo2D info)
Portrayal2D
draw
in interface Portrayal2D
draw
in class SimplePortrayal2D
public boolean hitObject(java.lang.Object object, DrawInfo2D range)
SimplePortrayal2D
hitObject
in class SimplePortrayal2D
public boolean setSelected(LocationWrapper wrapper, boolean selected)
Portrayal
setSelected
in interface Portrayal
setSelected
in class SimplePortrayal2D
public Inspector getInspector(LocationWrapper wrapper, GUIState state)
Portrayal
getInspector
in interface Portrayal
getInspector
in class SimplePortrayal2D
public java.lang.String getName(LocationWrapper wrapper)
Portrayal
getName
in interface Portrayal
getName
in class SimplePortrayal2D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |