public class EmbeddedScaleDisplayPanel extends OMComponentPanel implements ProjectionListener
unitOfMeasure=km (or any value from the Length class) locationXoffset=-10 (value off the edge of the component to have legend) locationYoffset=-10 width=pixel width of component height=pixel height of component
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected DrawingAttributes |
dAttributes |
protected int |
defaultHeight |
protected java.lang.String |
defaultLineColorString |
protected int |
defaultLocationXoffset |
protected int |
defaultLocationYoffset |
protected java.lang.String |
defaultTextColorString |
protected java.lang.String |
defaultUnitOfMeasureString |
protected int |
defaultWidth |
protected int |
height |
static java.lang.String |
HeightProperty |
protected OMGraphicList |
legend |
protected int |
locationXoffset |
static java.lang.String |
LocationXOffsetProperty |
protected int |
locationYoffset |
static java.lang.String |
LocationYOffsetProperty |
static java.util.logging.Logger |
logger |
protected MapBean |
mapBean |
static java.lang.String |
UnitOfMeasureProperty |
protected Length |
uom |
protected int |
width |
static java.lang.String |
WidthProperty |
beanContextChildSupport, i18n, isolated, orientation, propertyPrefix, windowSupport
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
EmbeddedScaleDisplayPanel() |
EmbeddedScaleDisplayPanel(DrawingAttributes dAtts,
Length units) |
Modifier and Type | Method and Description |
---|---|
void |
findAndInit(java.lang.Object someObj) |
void |
findAndUndo(java.lang.Object someObj) |
java.awt.Component |
getGUI()
Creates the interface palette.
|
OMGraphicList |
getLegend() |
protected int |
getPtAtDistanceFromLatLon(LatLonPoint loc2,
double unitDist,
Projection projection,
Length uom) |
java.lang.String |
getUnitOfMeasure()
Getter for property unitOfMeasure.
|
void |
paint(java.awt.Graphics g) |
void |
projectionChanged(ProjectionEvent e)
Invoked when there has been a fundamental change to the Map.
|
protected double |
scopeDistance(double dist)
Take a given distance and round it down to the nearest 1, 2, or 5 (or
tens/hundreds version of those increments) multiple of that number.
|
void |
setLegend(OMGraphicList legend) |
void |
setProperties(java.lang.String prefix,
java.util.Properties properties)
Sets the properties for the
Layer . |
void |
setUnitOfMeasure(java.lang.String unitOfMeasure)
Setter for property unitOfMeasure.
|
addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, fireVetoableChange, getBeanContext, getOrientation, getProperties, getPropertyInfo, getPropertyPrefix, getWindowSupport, isIsolated, removeVetoableChangeListener, setBeanContext, setIsolated, setOrientation, setProperties, setPropertyPrefix, setWindowSupport
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, 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, addImpl, 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, setLayout, 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, hide, 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
protected java.lang.String defaultLineColorString
protected java.lang.String defaultTextColorString
protected java.lang.String defaultUnitOfMeasureString
protected int defaultLocationXoffset
protected int defaultLocationYoffset
protected int defaultWidth
protected int defaultHeight
public static final java.lang.String UnitOfMeasureProperty
public static final java.lang.String LocationXOffsetProperty
public static final java.lang.String LocationYOffsetProperty
public static final java.lang.String WidthProperty
public static final java.lang.String HeightProperty
protected Length uom
protected int locationXoffset
protected int locationYoffset
protected int width
protected int height
protected DrawingAttributes dAttributes
protected OMGraphicList legend
public static java.util.logging.Logger logger
protected MapBean mapBean
public EmbeddedScaleDisplayPanel()
public EmbeddedScaleDisplayPanel(DrawingAttributes dAtts, Length units)
public void setProperties(java.lang.String prefix, java.util.Properties properties)
Layer
. This allows
Layer
s to get a richer set of parameters than the
setArgs
method.setProperties
in interface PropertyConsumer
setProperties
in class OMComponentPanel
prefix
- the token to prefix the property namesproperties
- the Properties
objectpublic java.lang.String getUnitOfMeasure()
public void setUnitOfMeasure(java.lang.String unitOfMeasure)
unitOfMeasure
- New value of property unitOfMeasure.PropertyVetoException
public java.awt.Component getGUI()
public void projectionChanged(ProjectionEvent e)
ProjectionListener
Layers are expected to recompute their graphics (if this makes
sense), and then repaint()
themselves.
projectionChanged
in interface ProjectionListener
e
- ProjectionEventprotected int getPtAtDistanceFromLatLon(LatLonPoint loc2, double unitDist, Projection projection, Length uom)
protected double scopeDistance(double dist)
dist
- public OMGraphicList getLegend()
public void setLegend(OMGraphicList legend)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void findAndInit(java.lang.Object someObj)
findAndInit
in interface LightMapHandlerChild
findAndInit
in class OMComponentPanel
public void findAndUndo(java.lang.Object someObj)
findAndUndo
in interface LightMapHandlerChild
findAndUndo
in class OMComponentPanel
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details