|
||||||||||
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.LayerPane
public class LayerPane
A LayerPane is a single instance of how a layer represented in the LayersPanel. It contains three widgets: an on/off button; a palette button; and a toggle button with the layer name.
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 I18n |
i18n
|
protected Layer |
layer
|
protected LayerHandler |
layerHandler
|
protected javax.swing.JToggleButton |
layerName
|
protected static javax.swing.ImageIcon |
layerOffIcon
|
protected static javax.swing.ImageIcon |
layerOnIcon
|
static java.util.logging.Logger |
logger
|
protected java.awt.Color |
offColor
|
protected java.awt.Color |
onColor
|
protected javax.swing.AbstractButton |
onoffButton
|
protected javax.swing.AbstractButton |
paletteButton
|
protected static javax.swing.ImageIcon |
paletteIcon
|
protected static javax.swing.ImageIcon |
paletteOnIcon
|
protected boolean |
selected
|
static java.lang.String |
showPaletteCmd
|
static java.lang.String |
toggleLayerCmd
|
protected static java.net.URL |
url1
|
protected static java.net.URL |
url2
|
protected static java.net.URL |
url3
|
protected static java.net.URL |
url4
|
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
|
LayerPane(Layer layer,
LayerHandler layerHandler,
javax.swing.ButtonGroup bg)
|
protected |
LayerPane(java.lang.String title)
Used for the background LayerPanel marker. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
ActionListener interface. |
void |
cleanup()
LayerPane disconnects from listeners, nulls out components, shuts down layer palette. |
void |
cleanup(javax.swing.ButtonGroup bg)
Same as cleanup, except the layer name toggle button gets removed from the given button group. |
void |
componentHidden(java.awt.event.ComponentEvent e)
Invoked when component has been hidden. |
void |
componentMoved(java.awt.event.ComponentEvent e)
Invoked when component has been moved. |
void |
componentResized(java.awt.event.ComponentEvent e)
Invoked when component has been resized. |
void |
componentShown(java.awt.event.ComponentEvent e)
Invoked when component has been shown. |
protected void |
createGUI(javax.swing.ButtonGroup bg)
|
protected javax.swing.AbstractButton |
createOnOffButton()
Simply creates the AbstractButton object that turns the layer on/off. |
protected javax.swing.AbstractButton |
createPaletteButton()
Simply creates the AbstractButton object that turns the layer palette on/off. |
static LayerPane |
getBackgroundLayerSeparator(java.lang.String title)
|
Layer |
getLayer()
|
protected LayerHandler |
getLayerHandler()
|
java.awt.Dimension |
getMinimumSize()
|
protected javax.swing.AbstractButton |
getOnOffButton()
Calls createOnOFfButton to create the button, and then adds all the behavior settings to the button. |
protected javax.swing.AbstractButton |
getPaletteButton()
Calls createPaletteButton to create the button, and then adds all the behavior settings to the button. |
java.awt.Dimension |
getPreferredSize()
|
protected void |
hidePalette()
|
boolean |
isLayerOn()
|
boolean |
isPaletteOn()
|
boolean |
isSelected()
|
void |
setLayerHandler(LayerHandler in_layerHandler)
|
void |
setLayerOn(boolean value)
Turns the button on or off |
void |
setPaletteOn(boolean value)
Turns the palette button on or off |
void |
setSelected(boolean select)
Highlights/de-highlights the panel border. |
protected void |
showPalette()
|
void |
updateLayerLabel()
Tell the pane to check with the layer to get the current layer name for it's label. |
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, 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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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 |
Field Detail |
---|
public static java.util.logging.Logger logger
protected transient javax.swing.AbstractButton onoffButton
protected transient javax.swing.AbstractButton paletteButton
protected transient javax.swing.JToggleButton layerName
protected transient boolean selected
protected transient Layer layer
protected transient LayerHandler layerHandler
protected static transient java.net.URL url1
protected static transient javax.swing.ImageIcon paletteIcon
protected static transient java.net.URL url2
protected static transient javax.swing.ImageIcon paletteOnIcon
protected static transient java.net.URL url3
protected static transient javax.swing.ImageIcon layerOnIcon
protected static transient java.net.URL url4
protected static transient javax.swing.ImageIcon layerOffIcon
public static final transient java.lang.String showPaletteCmd
public static final transient java.lang.String toggleLayerCmd
protected java.awt.Color offColor
protected java.awt.Color onColor
protected I18n i18n
Constructor Detail |
---|
public LayerPane(Layer layer, LayerHandler layerHandler, javax.swing.ButtonGroup bg)
layer
- the layer to be represented by the pane.bg
- the buttongroup for the layerlayerHandler
- the LayerHandler that contains information about the
Layers.protected LayerPane(java.lang.String title)
Method Detail |
---|
protected void createGUI(javax.swing.ButtonGroup bg)
protected javax.swing.AbstractButton createOnOffButton()
protected javax.swing.AbstractButton getOnOffButton()
protected javax.swing.AbstractButton createPaletteButton()
protected javax.swing.AbstractButton getPaletteButton()
public void setLayerHandler(LayerHandler in_layerHandler)
protected LayerHandler getLayerHandler()
public void cleanup(javax.swing.ButtonGroup bg)
public void cleanup()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public boolean isLayerOn()
public void setLayerOn(boolean value)
public boolean isPaletteOn()
public void setPaletteOn(boolean value)
public boolean isSelected()
public void setSelected(boolean select)
public Layer getLayer()
public void updateLayerLabel()
protected void showPalette()
protected void hidePalette()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- ActionEventpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public static LayerPane getBackgroundLayerSeparator(java.lang.String title)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |