|
||||||||||
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
public abstract class Renderable2D
The Renderable2D provides an easy accessible renderable object.
(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 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 | |
---|---|
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. |
LocatableInterface |
getSource()
gets the source of this renderable |
boolean |
isFlip()
|
boolean |
isRotate()
|
boolean |
isScale()
|
boolean |
isTranslate()
|
abstract void |
paint(Graphics2D graphics,
ImageObserver observer)
draws an animation on a worldcoordinates around [x,y=0,0] |
void |
paint(Graphics2D graphics,
Rectangle2D extent,
Dimension screen,
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)
|
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 simulatorMethod Detail |
---|
protected void bind2Context(SimulatorInterface simulator)
simulator
- the simulator used for binding the object.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 Renderable2DInterface
Renderable2DInterface.getSource()
public boolean isTranslate()
public void setTranslate(boolean translate)
translate
- The translate to set.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(Graphics2D, Rectangle2D, Dimension,ImageObserver)
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.
#contains(java.awt.geom.Point2D, java.awt.geom.Rectangle2D,
java.awt.Dimension)
public void destroy()
destroy
in interface Renderable2DInterface
public String toString()
toString
in class Object
Object.toString()
public abstract void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
graphics
- the graphics objectobserver
- the observer
RemoteException
- on network exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |