nl.tudelft.simulation.dsol.animation.D2
Class EditableRenderable2D

java.lang.Object
  extended by nl.tudelft.simulation.dsol.animation.D2.Renderable2D
      extended by nl.tudelft.simulation.dsol.animation.D2.EditableRenderable2D
All Implemented Interfaces:
EditableRenderable2DInterface, Renderable2DInterface

public abstract class EditableRenderable2D
extends Renderable2D
implements EditableRenderable2DInterface

EditableRenderable2D is an abstract class that implements EditableRenderable2DInterface. This class can be extended by classes that animate editable simulation 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.

Since:
1.4
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:21:28 $
Author:
Peter Jacobs

Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
Renderable2DInterface.Util
 
Field Summary
protected  Editable source
          the source of this renderable
 
Fields inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
flip, rotate, scale, simulator, translate
 
Constructor Summary
EditableRenderable2D(Editable source, SimulatorInterface simulator)
          constructs a new EditableRenderable2D
 
Method Summary
 boolean allowAddOrDeletePoints()
          Is the user allowed to add or delete points of this editable?
 boolean allowDelete()
          Is the user allowed to delete this object?
 boolean allowEditPoints()
          Is the user allowed to edit individual points of this editable?
 boolean allowMove()
          Is the user allowed to move this editable?
 boolean allowRotate()
          Is the user allowed to rotate this editable?
 boolean allowScale()
          Is the user allowed to scale this editable?
 int getMaxNumberOfPoints()
          Get the maximum allowed number of points for this editable
 int getMinNumberOfPoints()
          Get the minimum allowed number of points for this editable
 boolean isClosedShape()
          Returns whether this shape is closed or open.
 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, destroy, getSource, isFlip, isRotate, isScale, isTranslate, paint, paint, setFlip, setRotate, setScale, setTranslate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
contains, destroy, getSource, paint
 

Field Detail

source

protected Editable source
the source of this renderable

Constructor Detail

EditableRenderable2D

public EditableRenderable2D(Editable source,
                            SimulatorInterface simulator)
constructs a new EditableRenderable2D

Parameters:
source - the source and target
simulator - the simulator
Method Detail

isClosedShape

public boolean isClosedShape()
Description copied from interface: EditableRenderable2DInterface
Returns whether this shape is closed or open. For example an area is a closed shape while a trajectory is open (has ends).

Specified by:
isClosedShape in interface EditableRenderable2DInterface
Returns:
true or false
See Also:
EditableRenderable2DInterface.isClosedShape()

allowMove

public boolean allowMove()
Description copied from interface: EditableRenderable2DInterface
Is the user allowed to move this editable?

Specified by:
allowMove in interface EditableRenderable2DInterface
Returns:
True or false
See Also:
EditableRenderable2DInterface.allowMove()

allowRotate

public boolean allowRotate()
Description copied from interface: EditableRenderable2DInterface
Is the user allowed to rotate this editable?

Specified by:
allowRotate in interface EditableRenderable2DInterface
Returns:
True or false
See Also:
EditableRenderable2DInterface.allowRotate()

allowScale

public boolean allowScale()
Description copied from interface: EditableRenderable2DInterface
Is the user allowed to scale this editable?

Specified by:
allowScale in interface EditableRenderable2DInterface
Returns:
True or false
See Also:
EditableRenderable2DInterface.allowScale()

allowEditPoints

public boolean allowEditPoints()
Description copied from interface: EditableRenderable2DInterface
Is the user allowed to edit individual points of this editable?

Specified by:
allowEditPoints in interface EditableRenderable2DInterface
Returns:
True or false
See Also:
EditableRenderable2DInterface.allowEditPoints()

allowDelete

public boolean allowDelete()
Description copied from interface: EditableRenderable2DInterface
Is the user allowed to delete this object?

Specified by:
allowDelete in interface EditableRenderable2DInterface
Returns:
True or false
See Also:
EditableRenderable2DInterface.allowDelete()

allowAddOrDeletePoints

public boolean allowAddOrDeletePoints()
Description copied from interface: EditableRenderable2DInterface
Is the user allowed to add or delete points of this editable?

Specified by:
allowAddOrDeletePoints in interface EditableRenderable2DInterface
Returns:
True or false
See Also:
EditableRenderable2DInterface.allowAddOrDeletePoints()

getMaxNumberOfPoints

public int getMaxNumberOfPoints()
Description copied from interface: EditableRenderable2DInterface
Get the maximum allowed number of points for this editable

Specified by:
getMaxNumberOfPoints in interface EditableRenderable2DInterface
Returns:
Maximum number of points
See Also:
EditableRenderable2DInterface.getMaxNumberOfPoints()

getMinNumberOfPoints

public int getMinNumberOfPoints()
Description copied from interface: EditableRenderable2DInterface
Get the minimum allowed number of points for this editable

Specified by:
getMinNumberOfPoints in interface EditableRenderable2DInterface
Returns:
Minimum number of points
See Also:
EditableRenderable2DInterface.getMinNumberOfPoints()


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.