Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.gui
Class LayerControlButtonPanel

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      com.bbn.openmap.gui.OMComponentPanel
                          com.bbn.openmap.gui.LayerControlButtonPanel

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, java.awt.image.ImageObserver, LightMapHandlerChild, java.awt.MenuContainer, java.beans.PropertyChangeListener, PropertyConsumer, java.io.Serializable

public class LayerControlButtonPanel
extends OMComponentPanel
implements java.awt.event.ActionListener, java.beans.PropertyChangeListener

A OMComponentPanel that provides controls to manupulate layer order in the LayersPanel, and to provide add layer and delete layer buttons. This panel can be embedded into the LayersPanel, or it can be positioned somewhere else in the application. The LayersPanel can be set to create one of these itself, in which case it will be embedded. If you don't want an embedded version, create one and add it to the MapHandler, it will hook up to the LayersPanel when it finds it. The LayerPanes, LayersPanel and LayerControlButtonPanel communicate with each other using PropertyChangeEvents. The LayerPanes notify the LayersPanelwhen one of them is selected, and that event gets passed to this panel. When a button on this panel is pressed, it fires a PropertyChangeEvent with the layer and command to take to all its PropertyChangeListeners.

The LayerControlButtonPanel takes these properties:

         # Direction buttons are laid out, vertical or horizontal (vertical is
         default).
         orientation=vertical
         # Flag on whether to insert buttons onto LayersPanel (true by default).
         embedded=true
         # Configuration setting when embedding into LayersPanel (WEST,
         # NORTH, EAST, SOUTH, NORTH_SOUTH) NORTH_SOUTH puts up button above
         # list, down button below list.
         configuration=WEST
         # Flag to put button that lets the user delete layers (true by default).
         delete=true
         # Flag to put button that lets the user add layers, if the
         # LayersAddPanel is discovered in the MapHandler (true by default)
         add=true

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected javax.swing.JButton` | `add`
`protected static javax.swing.ImageIcon` | `addclickedgif`
`protected static javax.swing.ImageIcon` | `addgif`
`protected boolean` | `addLayers`
`static java.lang.String` | `AddLayersProperty`
`protected javax.swing.JButton` | `bottom`
`protected static javax.swing.ImageIcon` | `bottomclickedgif`
`protected static javax.swing.ImageIcon` | `bottomgif`
`protected java.lang.String` | `configuration`
`static java.lang.String` | `ConfigurationProperty`
`static java.lang.String` | `DefaultConfiguration`
`protected javax.swing.JButton` | `delete`
`protected static javax.swing.ImageIcon` | `deleteclickedgif`
`protected static javax.swing.ImageIcon` | `deletegif`
`protected boolean` | `deleteLayers`
`static java.lang.String` | `DeleteLayersProperty`
`protected javax.swing.JButton` | `down`
`protected static javax.swing.ImageIcon` | `downclickedgif`
`protected static javax.swing.ImageIcon` | `downgif`
`static java.lang.String` | `EAST_CONFIG`
`protected boolean` | `embedded`
`static java.lang.String` | `EmbeddedProperty`
`static java.lang.String` | `HORIZONTAL_CONFIG`
`protected LayerAddPanel` | `layerAddPanel`
`static java.lang.String` | `NORTH_CONFIG`
`static java.lang.String` | `NORTH_SOUTH_CONFIG`
`protected int` | `orientation`
`static java.lang.String` | `OrientationProperty`
`protected Layer` | `selected`
`static java.lang.String` | `SOUTH_CONFIG`
`protected javax.swing.JButton` | `top`
`protected static javax.swing.ImageIcon` | `topclickedgif`
`protected static javax.swing.ImageIcon` | `topgif`
`protected javax.swing.JButton` | `up`
`protected static javax.swing.ImageIcon` | `upclickedgif`
`protected static javax.swing.ImageIcon` | `upgif`
`protected static java.net.URL` | `urladd`
`protected static java.net.URL` | `urladdc`
`protected static java.net.URL` | `urlbottom`
`protected static java.net.URL` | `urlbottomc`
`protected static java.net.URL` | `urldelete`
`protected static java.net.URL` | `urldeletec`
`protected static java.net.URL` | `urldown`
`protected static java.net.URL` | `urldownc`
`protected static java.net.URL` | `urltop`
`protected static java.net.URL` | `urltopc`
`protected static java.net.URL` | `urlup`
`protected static java.net.URL` | `urlupc`
`static java.lang.String` | `VERTICAL_CONFIG`
`static java.lang.String` | `WEST_CONFIG`

Fields inherited from class com.bbn.openmap.gui.OMComponentPanel
`beanContextChildSupport, i18n, 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
`LayerControlButtonPanel()`
`LayerControlButtonPanel(LayersPanel panel)`

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` Method associated with the ActionListener interface.
`protected void` | `createInterface()`
`void` | `findAndInit(java.lang.Object someObj)`
`void` | `findAndUndo(java.lang.Object someObj)`
`LayerAddPanel` | `getLayerAddPanel()` Get the panel interface to dynamically add layers.
`java.util.Properties` | `getProperties(java.util.Properties props)` PropertyConsumer method, to fill in a Properties object, reflecting the current values of the OMComponent.
`java.util.Properties` | `getPropertyInfo(java.util.Properties props)` Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
`void` | `propertyChange(java.beans.PropertyChangeEvent pce)`
`void` | `removeLayersPanel(LayersPanel panel)`
`void` | `setLayerAddPanel(LayerAddPanel lap)` Set the panel that brings up an interface to dynamically add layers.
`void` | `setLayersPanel(LayersPanel panel)` Sets this panel to control the LayersPanel.
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Sets the properties for the OMComponent.

Methods inherited from class com.bbn.openmap.gui.OMComponentPanel
`addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, fireVetoableChange, getBeanContext, getPropertyPrefix, getWindowSupport, removeVetoableChangeListener, setBeanContext, 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, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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

### urlup

    protected static transient java.net.URL urlup

### upgif

    protected static transient javax.swing.ImageIcon upgif

### urlupc

    protected static transient java.net.URL urlupc

### upclickedgif

    protected static transient javax.swing.ImageIcon upclickedgif

### urltop

    protected static transient java.net.URL urltop

### topgif

    protected static transient javax.swing.ImageIcon topgif

### urltopc

    protected static transient java.net.URL urltopc

### topclickedgif

    protected static transient javax.swing.ImageIcon topclickedgif

### urldown

    protected static transient java.net.URL urldown

### downgif

    protected static transient javax.swing.ImageIcon downgif

### urldownc

    protected static transient java.net.URL urldownc

### downclickedgif

    protected static transient javax.swing.ImageIcon downclickedgif

### urlbottom

    protected static transient java.net.URL urlbottom

### bottomgif

    protected static transient javax.swing.ImageIcon bottomgif

### urlbottomc

    protected static transient java.net.URL urlbottomc

### bottomclickedgif

    protected static transient javax.swing.ImageIcon bottomclickedgif

### urldelete

    protected static transient java.net.URL urldelete

### deletegif

    protected static transient javax.swing.ImageIcon deletegif

### urldeletec

    protected static transient java.net.URL urldeletec

### deleteclickedgif

    protected static transient javax.swing.ImageIcon deleteclickedgif

### urladd

    protected static transient java.net.URL urladd

### addgif

    protected static transient javax.swing.ImageIcon addgif

### urladdc

    protected static transient java.net.URL urladdc

### addclickedgif

    protected static transient javax.swing.ImageIcon addclickedgif

### add

    protected javax.swing.JButton add

### delete

    protected javax.swing.JButton delete

### top

    protected javax.swing.JButton top

### up

    protected javax.swing.JButton up

### down

    protected javax.swing.JButton down

### bottom

    protected javax.swing.JButton bottom

### layerAddPanel

    protected LayerAddPanel layerAddPanel

### OrientationProperty

    public static final java.lang.String OrientationProperty

See Also:
  Constant Field Values

### ConfigurationProperty

    public static final java.lang.String ConfigurationProperty

See Also:
  Constant Field Values

### EmbeddedProperty

    public static final java.lang.String EmbeddedProperty

See Also:
  Constant Field Values

### DeleteLayersProperty

    public static final java.lang.String DeleteLayersProperty

See Also:
  Constant Field Values

### AddLayersProperty

    public static final java.lang.String AddLayersProperty

See Also:
  Constant Field Values

### HORIZONTAL_CONFIG

    public static final java.lang.String HORIZONTAL_CONFIG

See Also:
  Constant Field Values

### VERTICAL_CONFIG

    public static final java.lang.String VERTICAL_CONFIG

See Also:
  Constant Field Values

### WEST_CONFIG

    public static final java.lang.String WEST_CONFIG

See Also:
  Constant Field Values

### EAST_CONFIG

    public static final java.lang.String EAST_CONFIG

See Also:
  Constant Field Values

### NORTH_CONFIG

    public static final java.lang.String NORTH_CONFIG

See Also:
  Constant Field Values

### SOUTH_CONFIG

    public static final java.lang.String SOUTH_CONFIG

See Also:
  Constant Field Values

### NORTH_SOUTH_CONFIG

    public static final java.lang.String NORTH_SOUTH_CONFIG

See Also:
  Constant Field Values

### DefaultConfiguration

    public static final java.lang.String DefaultConfiguration

See Also:
  Constant Field Values

### orientation

    protected int orientation

### configuration

    protected java.lang.String configuration

### embedded

    protected boolean embedded

### deleteLayers

    protected boolean deleteLayers

### addLayers

    protected boolean addLayers

### selected

    protected Layer selected

Constructor Detail

### LayerControlButtonPanel

    public LayerControlButtonPanel()

### LayerControlButtonPanel

    public LayerControlButtonPanel(LayersPanel panel)

Method Detail

### removeLayersPanel

    public void removeLayersPanel(LayersPanel panel)

### setLayersPanel

    public void setLayersPanel(LayersPanel panel)

  Sets this panel to control the LayersPanel. If you want to extend this class and change how the buttons are displayed in the LayersPanel, change this method.

### createInterface

    protected void createInterface()

### setLayerAddPanel

    public void setLayerAddPanel(LayerAddPanel lap)

  Set the panel that brings up an interface to dynamically add layers.

### getLayerAddPanel

    public LayerAddPanel getLayerAddPanel()

  Get the panel interface to dynamically add layers.

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Method associated with the ActionListener interface. This method listens for action events meant to change the order of the layers, as fired by the layer order buttons.

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`
  Parameters:
    `e` - ActionEvent

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent pce)

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

### findAndInit

    public void findAndInit(java.lang.Object someObj)

  Specified by:
    `findAndInit` in interface `LightMapHandlerChild`
  Overrides:
    `findAndInit` in class `OMComponentPanel`

### findAndUndo

    public void findAndUndo(java.lang.Object someObj)

  Specified by:
    `findAndUndo` in interface `LightMapHandlerChild`
  Overrides:
    `findAndUndo` in class `OMComponentPanel`

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties props)

  Description copied from class: `OMComponentPanel`
  Sets the properties for the OMComponent.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `OMComponentPanel`
  Parameters:
    `prefix` - the token to prefix the property names
    `props` - the `Properties` object

### getProperties

    public java.util.Properties getProperties(java.util.Properties props)

  Description copied from class: `OMComponentPanel`
  PropertyConsumer method, to fill in a Properties object, reflecting the current values of the OMComponent. If the component has a propertyPrefix set, the property keys should have that prefix plus a separating '.' prepended to each propery key it uses for configuration.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Overrides:
    `getProperties` in class `OMComponentPanel`
  Parameters:
    `props` - a Properties object to load the PropertyConsumer properties into. If props equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### getPropertyInfo

    public java.util.Properties getPropertyInfo(java.util.Properties props)

  Description copied from class: `OMComponentPanel`
  Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.). For Layer, this method should at least return the 'prettyName' property.

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Overrides:
    `getPropertyInfo` in class `OMComponentPanel`
  Parameters:
    `props` - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details