|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.dsol.animation.D2.GisRenderable2D
public class GisRenderable2D
This renderable draws CAD/GIS objects.
(c) copyright 2002-2005 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface |
---|
Renderable2DInterface.Util |
Field Summary | |
---|---|
protected Bounds |
bounds
the bounds of the image |
protected Rectangle2D |
extent
the cached extent |
protected BufferedImage |
image
the image cached image |
protected DirectedPoint |
location
the location of the image |
protected nl.javel.gisbeans.map.MapInterface |
map
the map to display |
protected Dimension |
screenSize
the cached screenSize |
Constructor Summary | |
---|---|
GisRenderable2D(SimulatorInterface simulator,
URL mapFile)
constructs a new GisRenderable2D |
Method Summary | |
---|---|
protected void |
bind2Context(SimulatorInterface simulator)
binds a renderable2D to the context. |
boolean |
contains(Point2D pointWorldCoordinates,
Rectangle2D extent,
Dimension screen)
does the shape contain the point |
void |
destroy()
destroys an RenderableObject by unsubscribing it from the context. |
Bounds |
getBounds()
returns the bounds of the locatable object. |
DirectedPoint |
getLocation()
returns the location of an object |
LocatableInterface |
getSource()
gets the source of this renderable |
void |
paint(Graphics2D graphics,
Rectangle2D extent,
Dimension screen,
ImageObserver observer)
paints the object on a 2D graphics object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected nl.javel.gisbeans.map.MapInterface map
protected BufferedImage image
protected Rectangle2D extent
protected Dimension screenSize
protected DirectedPoint location
protected Bounds bounds
Constructor Detail |
---|
public GisRenderable2D(SimulatorInterface simulator, URL mapFile)
simulator
- the simulator.mapFile
- the mapfile to use.Method Detail |
---|
protected void bind2Context(SimulatorInterface simulator)
simulator
- the simulator used for binding the object.public void paint(Graphics2D graphics, Rectangle2D extent, Dimension screen, ImageObserver observer)
Renderable2DInterface
paint
in interface Renderable2DInterface
graphics
- the graphics objectextent
- the extent of the panelscreen
- the screen of the panelobserver
- the observer of the renderableInterface#paint(java.awt.Graphics2D, java.awt.geom.Rectangle2D,
java.awt.Dimension, java.awt.image.ImageObserver)
public LocatableInterface getSource()
Renderable2DInterface
getSource
in interface Renderable2DInterface
Renderable2DInterface.getSource()
public Bounds getBounds()
LocatableInterface
getBounds
in interface LocatableInterface
LocatableInterface.getBounds()
public DirectedPoint getLocation()
LocatableInterface
getLocation
in interface LocatableInterface
LocatableInterface.getLocation()
public void destroy()
destroy
in interface Renderable2DInterface
public boolean contains(Point2D pointWorldCoordinates, Rectangle2D extent, Dimension screen)
Renderable2DInterface
contains
in interface Renderable2DInterface
pointWorldCoordinates
- the point in world coordinates. Default
implementation is to intersect the 3D bounds on location.z and to
return the bounds2D of this intersect.extent
- the extent of the panel.screen
- the screen of the panel.
Renderable2DInterface.contains(java.awt.geom.Point2D,
java.awt.geom.Rectangle2D, java.awt.Dimension)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |