|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.dsol.animation.D2.Renderable2D
The Renderable2D provides an easy accessible renderable object.
(c) copyright 2003 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
| Nested Class Summary |
| Nested classes inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface |
Renderable2DInterface.Util |
| Field Summary | |
protected boolean |
flip
whether to flip the renderable after rotating 180 degrees |
protected boolean |
rotate
whether to rotate the renderable |
protected boolean |
scale
whether to scale the renderable when zooming in or out |
protected SimulatorInterface |
simulator
simulator |
protected LocatableInterface |
source
the source of the renderable |
protected boolean |
translate
whether to translate the renderable when panning |
| Constructor Summary | |
Renderable2D(LocatableInterface source,
SimulatorInterface simulator)
constructs a new Renderable2D |
|
| Method Summary | |
boolean |
contains(java.awt.geom.Point2D pointWorldCoordinates,
java.awt.geom.Rectangle2D extent,
java.awt.Dimension screen)
does the shape contain the point |
void |
destroy()
destroys an RenderableObject by unsubscribing it from the context. |
LocatableInterface |
getSource()
gets the source of this renderable |
boolean |
isFlip()
|
boolean |
isRotate()
|
boolean |
isScale()
|
boolean |
isTranslate()
|
abstract void |
paint(java.awt.Graphics2D graphics,
java.awt.image.ImageObserver observer)
draws an animation on a worldcoordinates around [x,y=0,0] |
void |
paint(java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D extent,
java.awt.Dimension screen,
java.awt.image.ImageObserver observer)
paints the object on a 2D graphics object |
void |
setFlip(boolean flip)
|
void |
setRotate(boolean rotate)
|
void |
setScale(boolean scale)
|
void |
setTranslate(boolean translate)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected boolean rotate
protected boolean flip
protected boolean scale
protected boolean translate
protected SimulatorInterface simulator
protected LocatableInterface source
| Constructor Detail |
public Renderable2D(LocatableInterface source,
SimulatorInterface simulator)
source - the sourcesimulator - the simulator| Method Detail |
public boolean isFlip()
public void setFlip(boolean flip)
flip - The flip to set.public boolean isRotate()
public void setRotate(boolean rotate)
rotate - The rotate to set.public boolean isScale()
public void setScale(boolean scale)
scale - The scale to set.public LocatableInterface getSource()
Renderable2DInterface
getSource in interface Renderable2DInterfaceRenderable2DInterface.getSource()public boolean isTranslate()
public void setTranslate(boolean translate)
translate - The translate to set.
public void paint(java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D extent,
java.awt.Dimension screen,
java.awt.image.ImageObserver observer)
Renderable2DInterface
paint in interface Renderable2DInterfacegraphics - the graphics objectextent - the extent of the panelscreen - the screen of the panelobserver - the observer of the renderableInterface#paint(Graphics2D, Rectangle2D, Dimension,ImageObserver)
public boolean contains(java.awt.geom.Point2D pointWorldCoordinates,
java.awt.geom.Rectangle2D extent,
java.awt.Dimension screen)
Renderable2DInterface
contains in interface Renderable2DInterfacepointWorldCoordinates - 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.
#contains(java.awt.geom.Point2D, java.awt.geom.Rectangle2D,
java.awt.Dimension)public void destroy()
destroy in interface Renderable2DInterfacepublic java.lang.String toString()
Object.toString()
public abstract void paint(java.awt.Graphics2D graphics,
java.awt.image.ImageObserver observer)
throws java.rmi.RemoteException
graphics - the graphics objectobserver - the observer
java.rmi.RemoteException - on network exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||