|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sim.portrayal.SimplePortrayal2D sim.portrayal.geo.GeomPortrayal
public class GeomPortrayal
The portrayal for MasonGeometry objects. The class draws the JTS geometry object (currently, we can draw Point, LineString, Polygon, MultiLineString and MultiPolygon objects), and sets up the inspectors for the MasonGeometry object. The inspector is TabbedInspector with at most three tabs: the first tab shows various information about the JTS geometry, the second tab shows the associated attribute information, and the third tab shows information about the MasonGeometry userData field, which can be any Java object.
Field Summary | |
---|---|
boolean |
filled
Should objects be filled when painting? |
java.awt.Paint |
paint
How to paint each object |
double |
scale
Scale for each object |
Fields inherited from class sim.portrayal.SimplePortrayal2D |
---|
TYPE_HIT_OBJECT, TYPE_SELECTED_OBJECT |
Constructor Summary | |
---|---|
GeomPortrayal()
Default constructor creates filled, gray objects with a scale of 1.0 |
|
GeomPortrayal(boolean filled)
|
|
GeomPortrayal(double scale)
|
|
GeomPortrayal(double scale,
boolean filled)
|
|
GeomPortrayal(java.awt.Paint paint)
|
|
GeomPortrayal(java.awt.Paint paint,
boolean filled)
|
|
GeomPortrayal(java.awt.Paint paint,
double scale)
|
|
GeomPortrayal(java.awt.Paint paint,
double scale,
boolean filled)
|
Method Summary | |
---|---|
void |
draw(java.lang.Object object,
java.awt.Graphics2D graphics,
sim.portrayal.DrawInfo2D info)
Draw a JTS geometry object. |
sim.portrayal.Inspector |
getInspector(sim.portrayal.LocationWrapper wrapper,
sim.display.GUIState state)
Use our custom Inspector. |
boolean |
hitObject(java.lang.Object object,
sim.portrayal.DrawInfo2D range)
Determine if the object was hit or not. |
Methods inherited from class sim.portrayal.SimplePortrayal2D |
---|
getName, getStatus, handleMouseEvent, setSelected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.awt.Paint paint
public double scale
public boolean filled
Constructor Detail |
---|
public GeomPortrayal()
public GeomPortrayal(java.awt.Paint paint)
public GeomPortrayal(double scale)
public GeomPortrayal(java.awt.Paint paint, double scale)
public GeomPortrayal(java.awt.Paint paint, boolean filled)
public GeomPortrayal(double scale, boolean filled)
public GeomPortrayal(boolean filled)
public GeomPortrayal(java.awt.Paint paint, double scale, boolean filled)
Method Detail |
---|
public sim.portrayal.Inspector getInspector(sim.portrayal.LocationWrapper wrapper, sim.display.GUIState state)
getInspector
in interface sim.portrayal.Portrayal
getInspector
in class sim.portrayal.SimplePortrayal2D
public void draw(java.lang.Object object, java.awt.Graphics2D graphics, sim.portrayal.DrawInfo2D info)
draw
in interface sim.portrayal.Portrayal2D
draw
in class sim.portrayal.SimplePortrayal2D
public boolean hitObject(java.lang.Object object, sim.portrayal.DrawInfo2D range)
hitObject
in class sim.portrayal.SimplePortrayal2D
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |