public class LayerPane
extends javax.swing.JPanel
implements java.io.Serializable, java.awt.event.ActionListener, java.awt.event.ComponentListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
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 |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
|
LayerPane(Layer layer,
LayerHandler layerHandler,
javax.swing.ButtonGroup bg) |
protected |
LayerPane(java.lang.String title)
Used for the background LayerPanel marker.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getAccessibleContext, getUI, getUIClassID, paramString, 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, getNextFocusableComponent, getPopupLocation, 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, 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
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
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
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)
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)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details