|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.event.MapMouseAdapter com.bbn.openmap.omGraphics.EditableOMGraphic com.bbn.openmap.omGraphics.EditableOMGraphicList
public class EditableOMGraphicList
An EditableOMGraphic list encapsulates an OMGraphicList to move the editable ones around when they are selected as a group.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bbn.openmap.omGraphics.EditableOMGraphic |
---|
EditableOMGraphic.OMGraphicUndoEvent |
Field Summary | |
---|---|
protected java.util.List<EditableOMGraphic> |
editables
The list of editables wrapping the list contents. |
protected OffsetGrabPoint |
gpm
For grabbing the list objects and moving them. |
protected OMGraphicList |
list
The list of OMGraphics being selected and moved. |
Fields inherited from class com.bbn.openmap.omGraphics.EditableOMGraphic |
---|
actionMask, canGrabGraphic, DEBUG, DEBUG_DETAIL, gPoints, GRAB_POINT_DRAWING_ATTRIBUTES_ATTRIBUTE, holder, i18n, lastMouseEvent, listeners, mouseModeServiceList, movingPoint, popupIsUp, projection, SELECTED_GRAB_POINT_DRAWING_ATTRIBUTES_ATTRIBUTE, showGUI, stateMachine, undoStack, xorRendering |
Constructor Summary | |
---|---|
EditableOMGraphicList()
Create an empty EditableOMGraphicList, ready to have OMGraphics added to it. |
|
EditableOMGraphicList(OMGraphicList oml)
Create the EditableOMGraphicList with an OMGraphicList already defined, ready for editing. |
Method Summary | |
---|---|
void |
add(EditableOMGraphic editable)
Add the EditableOMGraphic to the list. |
void |
add(OMGraphicList list,
OMDrawingTool drawingTool)
|
EditableOMGraphic |
add(OMGraphic omg,
OMDrawingTool drawingTool)
Create an EditableOMGraphic and add it to the list. |
void |
clear()
Remove all EditableOMGraphics and clear out. |
void |
createGraphic(GraphicAttributes ga)
Create and set the graphic within the state machine. |
boolean |
generate(Projection proj)
Use the current projection to place the graphics on the screen. |
java.util.List<EditableOMGraphic> |
getEditables()
|
GrabPoint[] |
getGrabPoints()
Get the array of grab points used for the EditableOMGraphic. |
OMGraphic |
getGraphic()
Get the OMGraphic being created/modified by the EditableOMGraphicList. |
GrabPoint |
getMovingPoint(java.awt.event.MouseEvent me)
Given a MouseEvent, find a GrabPoint that it is touching, and set the moving point to that GrabPoint. |
void |
init()
Create and initialize the state machine that interprets the modifying gestures/commands, as well as initialize the grab points. |
void |
init(OMDrawingTool drawingTool)
Must be called on a EditableOMGraphicList that is created from an OMGraphicList containing OMGraphics. |
void |
move(java.awt.event.MouseEvent e)
Called to set the OffsetGrabPoint to the current mouse location, and update the OffsetGrabPoint with all the other GrabPoint locations, so everything can shift smoothly. |
void |
regenerate(Projection proj)
Given a new projection, the grab points may need to be repositioned off the current position of the graphic. |
boolean |
remove(EditableOMGraphic editable)
Remove the EditableOMGraphic from the list. |
void |
remove(OMGraphic omg)
Remove an OMGraphic from being moved. |
void |
render(java.awt.Graphics graphics)
Draw the EditableOMGraphicList parts into the java.awt.Graphics object. |
void |
setGrabPoints()
Take the current location of the GrabPoints, and modify the location parameters of the OMLine with them. |
void |
setGraphic(OMGraphic graphic)
Set the graphic within the state machine. |
void |
setProjection(Projection proj)
Set the current projection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OffsetGrabPoint gpm
protected OMGraphicList list
protected java.util.List<EditableOMGraphic> editables
Constructor Detail |
---|
public EditableOMGraphicList()
public EditableOMGraphicList(OMGraphicList oml)
oml
- OMGraphicList that should be handled.Method Detail |
---|
public java.util.List<EditableOMGraphic> getEditables()
public void init()
public void init(OMDrawingTool drawingTool)
drawingTool
- OMDrawingTool used to create
EditableOMGraphics for other OMGraphics on the list,
which will in turn be managed by this
EditableOMGraphicList. If this is null, nothing will get
done. If this drawing tool doesn't know how to create an
EditableOMGraphic for anything on the list, those things
will not be managed.public GrabPoint[] getGrabPoints()
EditableOMGraphic
getGrabPoints
in class EditableOMGraphic
public void setGraphic(OMGraphic graphic)
setGraphic
in class EditableOMGraphic
graphic
- OMGraphic.public void createGraphic(GraphicAttributes ga)
createGraphic
in class EditableOMGraphic
ga
- GraphicAttributes, describing the graphic to be created.public OMGraphic getGraphic()
getGraphic
in class EditableOMGraphic
public void add(OMGraphicList list, OMDrawingTool drawingTool)
public EditableOMGraphic add(OMGraphic omg, OMDrawingTool drawingTool)
omg
- OMGraphic to add.drawingTool
- to use to figure out what EditableOMGraphic
to use for the OMGraphic.
public void add(EditableOMGraphic editable)
public void remove(OMGraphic omg)
public boolean remove(EditableOMGraphic editable)
public void clear()
public void setProjection(Projection proj)
setProjection
in class EditableOMGraphic
public void setGrabPoints()
setGrabPoints
in class EditableOMGraphic
public GrabPoint getMovingPoint(java.awt.event.MouseEvent me)
EditableOMGraphic
getMovingPoint
in class EditableOMGraphic
me
- MouseEvent
public void move(java.awt.event.MouseEvent e)
move
in class EditableOMGraphic
public boolean generate(Projection proj)
generate
in class EditableOMGraphic
proj
- com.bbn.openmap.proj.Projection
public void regenerate(Projection proj)
regenerate
in class EditableOMGraphic
public void render(java.awt.Graphics graphics)
render
in class EditableOMGraphic
graphics
- java.awt.Graphics.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |