|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.dsol.gui.editor2D.actions.EditorUtilities
public final class EditorUtilities
Utility methods to select, create, edit and delete editables
(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.
Field Summary | |
---|---|
static int |
DEFAULT_OFFSET
the default offset value in x and y dirextion for new points |
Method Summary | |
---|---|
static void |
addPointToEditable(EditableRenderable2DInterface target,
Editor2DPanel panel)
add a point behind the last point of the editable |
static CartesianPoint |
convertToGlobalCoordinates(CartesianPoint point,
DirectedPoint location)
converts a coordinate in local coordinates to global coordinates note: this works only for 2D |
static CartesianPoint |
convertToLocalCoordinates(CartesianPoint point,
DirectedPoint location)
converts a coordinate in global coordinates to local coordinates note: this works only for 2D |
static void |
deleteEditable(EditableRenderable2DInterface target,
Editor2DPanel panel)
delete the selected editable |
static Renderable2DInterface |
determineSelected(Point2D worldCoordinate,
Editor2DPanel panel)
determine selected object as the mouse CartesianPoint. |
static List |
determineTargets(Point2D worldCoordinate,
Editor2DPanel panel)
determine the targeted objects at the mouse CartesianPoint |
static void |
instantiateNewEditable(Point2D worldCoordinate,
DSOLApplicationInterface application,
Editor2DPanel panel)
instantiate a new editable |
static void |
moveEditable(EditableRenderable2DInterface target,
Point2D newCoordinate,
Point2D oldCoordinate)
move the object |
static void |
moveSelectedPoint(EditableRenderable2DInterface target,
Point2D worldCoordinate,
Editor2DPanel panel)
move the selected control point |
static void |
rotateEditable(EditableRenderable2DInterface target,
Point2D newCoordinate,
Point2D centerCoordinate,
Point2D oldCoordinate)
rotate the editable |
static Renderable2DInterface |
selectEditable(Point2D worldCoordinate,
Editor2DPanel panel)
determine the selected object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_OFFSET
Method Detail |
---|
public static Renderable2DInterface selectEditable(Point2D worldCoordinate, Editor2DPanel panel)
worldCoordinate
- point in world coordinatespanel
- the editable animation panel
public static void instantiateNewEditable(Point2D worldCoordinate, DSOLApplicationInterface application, Editor2DPanel panel)
worldCoordinate
- point in world coordinatesapplication
- the applicationpanel
- the editable animation panelpublic static void moveSelectedPoint(EditableRenderable2DInterface target, Point2D worldCoordinate, Editor2DPanel panel)
target
- the editableRenderable which is moved.worldCoordinate
- point in world coordinates where to move topanel
- the Editor2D panelpublic static void moveEditable(EditableRenderable2DInterface target, Point2D newCoordinate, Point2D oldCoordinate)
target
- the target editable renderablenewCoordinate
- Point in world coordinates where to move tooldCoordinate
- Point in world coordinates where the mouse was the
last iteration, because we move relative to this coordinatepublic static void rotateEditable(EditableRenderable2DInterface target, Point2D newCoordinate, Point2D centerCoordinate, Point2D oldCoordinate)
target
- the target editable renderablenewCoordinate
- point in world coordinates where to rotate tooldCoordinate
- Point in world coordinates where the mouse was the
last iteration, because we move relative to this coordinatecenterCoordinate
- the center of rotation in world coordinatespublic static void deleteEditable(EditableRenderable2DInterface target, Editor2DPanel panel)
target
- the target editable renderablepanel
- the editable animation panelpublic static void addPointToEditable(EditableRenderable2DInterface target, Editor2DPanel panel)
target
- the target editable renderablepanel
- the animation panelpublic static Renderable2DInterface determineSelected(Point2D worldCoordinate, Editor2DPanel panel)
worldCoordinate
- the selected point in world coordinatespanel
- the editable animation panel
public static List determineTargets(Point2D worldCoordinate, Editor2DPanel panel)
worldCoordinate
- point in world coordinatespanel
- the editable animation panel
public static CartesianPoint convertToGlobalCoordinates(CartesianPoint point, DirectedPoint location)
point
- point in local coordinateslocation
- location vector
public static CartesianPoint convertToLocalCoordinates(CartesianPoint point, DirectedPoint location)
point
- point in local coordinateslocation
- location vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |