public class EditableOMRangeRings extends EditableOMCircle
Modifier and Type | Class and Description |
---|---|
static class |
EditableOMRangeRings.OMRangeRingUndoEvent
Subclass for undoing edits for OMRangeRing classes, handles events that
may affect the extra GUI widgets.
|
EditableOMGraphic.OMGraphicUndoEvent
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JComponent |
attributeBox |
protected java.text.DecimalFormat |
df |
protected boolean |
drawLabelsHolder |
protected javax.swing.JTextField |
intervalField |
protected static int |
lastInterval |
protected static Length |
lastUnit |
protected javax.swing.JToolBar |
rrToolBar |
protected javax.swing.JCheckBox |
snapCheckBox |
protected static boolean |
snapToInterval |
protected javax.swing.JComboBox |
unitsCombo |
CENTER_POINT_INDEX, circle, E_POINT_INDEX, gpc, gpe, gpm, gpn, gpne, gpnw, gpo, gpr, gps, gpse, gpsw, gpw, lastRenderType, N_POINT_INDEX, NE_POINT_INDEX, NW_POINT_INDEX, OFFSET_POINT_INDEX, RADIUS_POINT_INDEX, S_POINT_INDEX, SE_POINT_INDEX, SW_POINT_INDEX, W_POINT_INDEX
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 and Description |
---|
EditableOMRangeRings()
Create the EditableOMRangeRings, setting the state machine to create the
circle off of the gestures.
|
EditableOMRangeRings(GraphicAttributes ga)
Create an EditableOMRangeRings with the circleType and renderType
parameters in the GraphicAttributes object.
|
EditableOMRangeRings(OMRangeRings omc)
Create the EditableOMRangeRings with an OMCircle already defined, ready
for editing.
|
Modifier and Type | Method and Description |
---|---|
void |
createGraphic(GraphicAttributes ga)
Create and set the graphic within the state machine.
|
protected UndoEvent |
createUndoEventForCurrentState(java.lang.String whatHappened)
Create an UndoEvent that can get an OMRangeRing back to what it looks like
right now.
|
java.awt.Component |
getGUI(GraphicAttributes graphicAttributes)
Modifies the gui to not include line type adjustments, and adds widgets to
control range ring settings.
|
protected javax.swing.JComponent |
getRangeRingGUI() |
protected javax.swing.JComponent |
getRangeRingGUI(int orientation,
javax.swing.JComponent guiComp)
Get the GUI associated with changing the Text.
|
int |
interpretValue(java.lang.String intervalStr) |
boolean |
isSnapToInterval() |
protected void |
modifyOMGraphicForEditRender()
A convenience method that gives an EditableOMGraphic a chance to modify
the OMGraphic so it can be drawn quickly, by turning off labels, etc,
right before the XORpainting happens.
|
protected void |
resetOMGraphicAfterEditRender()
A convenience method that gives an EditableOMGraphic a chance to reset the
OMGraphic so it can be rendered normally, after it has been modified for
quick paints.
|
protected void |
setRadius(double radius)
To be overloaded if needed when setting circle's radius.
|
void |
setSnapToInterval(boolean sti) |
void |
updateInterval(int val) |
void |
updateInterval(java.lang.String intervalStr) |
assertGrabPoints, attachToMovingGrabPoint, clearGrabPoints, detachFromMovingGrabPoint, generate, getCanGrabGraphic, getGraphic, getMovingPoint, init, move, regenerate, render, setGrabPoints, setGrabPoints, setGraphic, setMovingPoint
_getMovingPoint, addEOMGListener, cleanMap, createAttributePanel, finalize, fireEvent, fireEvent, fireEvent, fireEvent, getActionMask, getGrabPoint, getGrabPoints, getGUI, getMouseModeServiceList, getMovingPoint, getProjection, getProjectionPoint, getShowGUI, getStateMachine, getUndoStack, handleInitialMouseEvent, isMouseEventTouching, isMouseEventTouchingTheEdge, isPopupIsUp, isXorRendering, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, redraw, redraw, redraw, removeEOMGListener, repaint, repaintRender, reset, setActionMask, setCanGrabGraphic, setGrabPoint, setGrabPoints, setMouseModeServiceList, setPopupIsUp, setProjection, setShowGUI, setStateMachine, setUndoStack, setXorRendering, updateCurrentState
protected static int lastInterval
protected static Length lastUnit
protected static boolean snapToInterval
protected javax.swing.JTextField intervalField
protected javax.swing.JComboBox unitsCombo
protected javax.swing.JCheckBox snapCheckBox
protected javax.swing.JToolBar rrToolBar
protected transient java.text.DecimalFormat df
protected javax.swing.JComponent attributeBox
protected boolean drawLabelsHolder
public EditableOMRangeRings()
public EditableOMRangeRings(GraphicAttributes ga)
public EditableOMRangeRings(OMRangeRings omc)
omc
- OMCircle that should be edited.public void createGraphic(GraphicAttributes ga)
createGraphic
in class EditableOMCircle
ga
- GraphicAttributes, describing the graphic to be created.public java.awt.Component getGUI(GraphicAttributes graphicAttributes)
getGUI
in class EditableOMCircle
graphicAttributes
- the GraphicAttributes to use to get the GUI
widget from to control those parameters for this EOMG.public void updateInterval(int val)
public void updateInterval(java.lang.String intervalStr)
public int interpretValue(java.lang.String intervalStr)
protected javax.swing.JComponent getRangeRingGUI()
protected javax.swing.JComponent getRangeRingGUI(int orientation, javax.swing.JComponent guiComp)
orientation
- SwingConstants.HORIZONTAL/VERTICALguiComp
- the JComponent to add stuff to. If the orientation is
HORIZONTAL, the components will be added directly to this
component, or to a new JComponent that is returned if null. If the
orientation is Vertical, a button will be added to the guiComp, or
returned. This button will call up a dialog box with the settings,
since they don't really lay out vertically.protected void modifyOMGraphicForEditRender()
modifyOMGraphicForEditRender
in class EditableOMGraphic
protected void resetOMGraphicAfterEditRender()
resetOMGraphicAfterEditRender
in class EditableOMGraphic
public boolean isSnapToInterval()
public void setSnapToInterval(boolean sti)
protected void setRadius(double radius)
EditableOMCircle
setRadius
in class EditableOMCircle
radius
- in DECIMAL_DEGREESprotected UndoEvent createUndoEventForCurrentState(java.lang.String whatHappened)
createUndoEventForCurrentState
in class EditableOMGraphic
whatHappened
- String describing what got you here. You can leave this null if you just want to go with the default.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details