public class IlvMapAnnotationToolBar extends JToolBar
grapherMode
is true.Modifier and Type | Class and Description |
---|---|
static interface |
IlvMapAnnotationToolBar.AnnotationGraphic
Interface that annotation graphic objects should implement.
|
static class |
IlvMapAnnotationToolBar.MapGraphicPath
An
IlvMapGraphicPath for annotations. |
static class |
IlvMapAnnotationToolBar.MapLink
An
IlvMapCompositeLink with annotation extensions. |
static class |
IlvMapAnnotationToolBar.MapMarker
An
IlvMapMarker annotation extension. |
static class |
IlvMapAnnotationToolBar.MapPolyline
An
IlvMapPolyline with annotation extensions. |
class |
IlvMapAnnotationToolBar.ToolBarButton
A
JToggleButton that can be associated with and trigger an
IlvManagerViewInteractor . |
JToolBar.AccessibleJToolBar, JToolBar.Separator
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
ANNOTATION_PROPERTY_NAME
The name of the attribute displayed as a label by the annotation.
|
static String |
EXT_ANNOTATION_PROPERTY_NAME
The name of the attribute displayed as an extended description by the annotation.
|
static int |
LINK_BUTTON
The index of the link annotation button.
|
static int |
POINT_BUTTON
The index of the point annotation button.
|
static int |
POLYGON_BUTTON
The index of the polygon annotation button.
|
static int |
POLYLINE_BUTTON
The index of the polyline annotation button.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvMapAnnotationToolBar()
Creates a new
IlvMapAnnotationToolBar
with the default set of buttons:
A polyline button
A polygon button
A point button
These buttons are associated with interactors that create graphic annotations
on a map. |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(IlvGraphic graphic,
String label,
String description)
Adds an annotation graphic into the annotation model.
|
protected void |
addImpl(Component comp,
Object constraints,
int index) |
String |
askForString(String old)
Called at graphic annotation creation to provide a string to be displayed as
the annotation label.
|
String[] |
askForStrings(String defaultLabel,
String defaultDescription)
Pops a dialog to ask for the label and the extended description.
|
protected JMenuItem |
deleteItem()
Creates a menu item that allows you to delete the annotation.
|
IlvMapAnnotationToolBar.ToolBarButton |
getButton(int i)
Returns the nth
ToolBarButton button of the toolbar. |
Dimension |
getButtonSize()
Retrieves the button size set by setButtonSize().
|
JPopupMenu |
getPopupMenu()
Returns the pop-up menu that is displayed for the graphic objects created by this toolbar.
|
IlvManagerView |
getView()
Returns the view associated with this annotation toolbar.
|
boolean |
isChecking()
Indicates if the point validity is checked or not.
|
boolean |
isGrapherMode()
Returns
true if the interactors are in grapher mode. |
boolean |
isPermanent()
Returns
true if the interactors are permanent. |
protected JMenuItem |
labelItem()
Creates a menu item that allows you to change the label of the annotation.
|
void |
setButtonSize(Dimension buttonSize)
Forces the button sizes for the buttons contained by this toolbar.
|
void |
setChecking(boolean check)
Requests this toolbar to check if the points entered are valid or not.
|
void |
setGrapherMode(boolean value)
Sets the grapher mode value.
|
void |
setPermanent(boolean value)
Sets the permanent indicator .
|
void |
setView(IlvManagerView v)
Sets the view for this annotation toolbar.
|
protected JMenuItem |
styleItem()
Creates a menu item that allows you to change the style of the annotation.
|
add, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int POLYLINE_BUTTON
public static final int POLYGON_BUTTON
public static final int POINT_BUTTON
public static final int LINK_BUTTON
public static String ANNOTATION_PROPERTY_NAME
public static String EXT_ANNOTATION_PROPERTY_NAME
public IlvMapAnnotationToolBar()
IlvMapAnnotationToolBar
with the default set of buttons:
public void addAnnotation(IlvGraphic graphic, String label, String description)
IlvMapAnnotationToolBar.MapMarker m=new IlvMapAnnotationToolBar.MapMarker(new IlvPoint(10,10)); annotationToolbar.addAnnotation(m, "marker", "this is a marker");
graphic
- Annotation to add into the model and configure. The object should implement the IlvMapAnnotationToolBar.AnnotationGraphic
interface.label
- Value of the attribute displayed as a label by the annotation.description
- Value of the attribute displayed as an extended description by the annotation.public String askForString(String old)
old
- The old string value.public String[] askForStrings(String defaultLabel, String defaultDescription)
defaultLabel
- A label to fill the label field of the dialog or null
defaultDescription
- A description to fill the description field of the dialog or null
public IlvMapAnnotationToolBar.ToolBarButton getButton(int i)
ToolBarButton
button of the toolbar.i
- The nth button or null if the index is out of range.
You can also retrieve the polyline annotation button by passing IlvMapAnnotationToolBar.POLYLINE_BUTTON
as
index, the polygon annotation button by passing IlvMapAnnotationToolBar.POLYGON_BUTTON
, or the point annotation
button by passing IlvMapAnnotationToolBar.POINT_BUTTON
.ToolBarButton
.public Dimension getButtonSize()
public JPopupMenu getPopupMenu()
JPopupMenu
allowing you to change the value attribute
of the IlvGraphic
, to delete the annotation, and to change/add a new style.public IlvManagerView getView()
public boolean isChecking()
true
checking is performed, false
otherwise.public void setButtonSize(Dimension buttonSize)
buttonSize
- The forced button size.public void setChecking(boolean check)
check
- If set to true
checking is performed, false
otherwise.public void setGrapherMode(boolean value)
true
, created objects will be added
to the grapher of the attached view with IlvGrapher.addNode(IlvGraphic, boolean)
method.
If false
, they will be added with IlvManager.addObject(IlvGraphic, boolean)
.value
- The value to be set.isGrapherMode()
public boolean isGrapherMode()
true
if the interactors are in grapher mode.true
if the interactors are in grapher mode.
The default is false
.setGrapherMode(boolean)
public void setPermanent(boolean value)
true
, the toolbar interactors will be permanent.value
- The value to be set.isPermanent()
public boolean isPermanent()
true
if the interactors are permanent.true
if the interactors are permanent.
The default is false
.setPermanent(boolean)
public void setView(IlvManagerView v)
v
- The view to be associated with this annotation toolbar.protected JMenuItem deleteItem()
protected JMenuItem labelItem()
protected JMenuItem styleItem()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.