|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.bbn.openmap.gui.OMComponentPanel com.bbn.openmap.gui.EmbeddedScaleDisplayPanel
public class EmbeddedScaleDisplayPanel
A panel that listens for projection changes and draws a little legend line on itself with a distance. Can be modified with Properties.
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
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
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
|
Fields inherited from class com.bbn.openmap.gui.OMComponentPanel |
---|
beanContextChildSupport, i18n, isolated, orientation, propertyPrefix, windowSupport |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
EmbeddedScaleDisplayPanel()
|
|
EmbeddedScaleDisplayPanel(DrawingAttributes dAtts,
Length units)
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.bbn.openmap.gui.OMComponentPanel |
---|
addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, fireVetoableChange, getBeanContext, getOrientation, getProperties, getPropertyInfo, getPropertyPrefix, getWindowSupport, isIsolated, removeVetoableChangeListener, setBeanContext, setIsolated, setOrientation, setProperties, setPropertyPrefix, setWindowSupport |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, 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 |
Methods inherited from class java.awt.Container |
---|
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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.beans.beancontext.BeanContextChild |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
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
Constructor Detail |
---|
public EmbeddedScaleDisplayPanel()
public EmbeddedScaleDisplayPanel(DrawingAttributes dAtts, Length units)
Method Detail |
---|
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.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |