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 OMComponentPanel

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

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

Direct Known Subclasses:
  BasicMapPanel, CombinedCoordPanel, InformationDelegator, LayerAddPanel, LayerControlButtonPanel, MiniBrowser, OMControlPanel, OMToolComponent, OMToolSet, StatusLightPanel, TimerControlButtonPanel

public abstract class OMComponentPanel
extends javax.swing.JPanel
implements PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, LightMapHandlerChild

The OMComponentPanel is a convienent super class intended to provide an easy way to extend JPanel while also implementing the common functions of an OMComponent (PropertyConsumer, BeanContextMembershipListener and BeanContextChild). The PropertyListener methods in the BeanContextChild aren't needed, because the java.awt.Component provides them.

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 java.beans.beancontext.BeanContextChildSupport` | `beanContextChildSupport` BeanContextChildSupport object provides helper functions for BeanContextChild interface.
`protected I18n` | `i18n` All OMComponentPanels have access to an I18n object, which is provided by the Environment.
`protected java.lang.String` | `propertyPrefix` Token uniquely identifying this compoentns in the application properties.
`protected WindowSupport` | `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
`protected` | `OMComponentPanel()`

Method Summary
`void` | `addVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener in_vcl)` Method for BeanContextChild interface.
`void` | `childrenAdded(java.beans.beancontext.BeanContextMembershipEvent bcme)` BeanContextMembershipListener method.
`void` | `childrenRemoved(java.beans.beancontext.BeanContextMembershipEvent bcme)` BeanContextMembershipListener method.
`void` | `findAndInit(java.util.Iterator it)` This is the method that your object can use to find other objects within the MapHandler (BeanContext).
`void` | `findAndInit(java.lang.Object obj)`
`void` | `findAndUndo(java.lang.Object obj)`
`void` | `fireVetoableChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)` Report a vetoable property update to any registered listeners.
`java.beans.beancontext.BeanContext` | `getBeanContext()` Method for BeanContextChild interface.
`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 list)` Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
`java.lang.String` | `getPropertyPrefix()` Get the property key prefix that is being used to prepend to the property keys for Properties lookups.
`WindowSupport` | `getWindowSupport()`
`void` | `removeVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener in_vcl)` Method for BeanContextChild interface.
`void` | `setBeanContext(java.beans.beancontext.BeanContext in_bc)` Method for BeanContextChild interface.
`void` | `setProperties(java.util.Properties props)` Sets the properties for the OMComponent.
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Sets the properties for the OMComponent.
`void` | `setPropertyPrefix(java.lang.String prefix)` Set the property key prefix that should be used by the PropertyConsumer.
`void` | `setWindowSupport(WindowSupport ws)`

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

### i18n

    protected I18n i18n

  All OMComponentPanels have access to an I18n object, which is provided by the Environment.

### beanContextChildSupport

    protected java.beans.beancontext.BeanContextChildSupport beanContextChildSupport

  BeanContextChildSupport object provides helper functions for BeanContextChild interface.

### windowSupport

    protected WindowSupport windowSupport

### propertyPrefix

    protected java.lang.String propertyPrefix

  Token uniquely identifying this compoentns in the application properties.

Constructor Detail

### OMComponentPanel

    protected OMComponentPanel()

Method Detail

### setWindowSupport

    public void setWindowSupport(WindowSupport ws)

### getWindowSupport

    public WindowSupport getWindowSupport()

### setProperties

    public void setProperties(java.util.Properties props)

  Sets the properties for the OMComponent.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Parameters:
    `props` - the `Properties` object.

### setProperties

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

  Sets the properties for the OMComponent.

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

### getProperties

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

  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`
  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 list)

  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`
  Parameters:
    `list` - 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.

### setPropertyPrefix

    public void setPropertyPrefix(java.lang.String prefix)

  Set the property key prefix that should be used by the PropertyConsumer. The prefix, along with a '.', should be prepended to the property keys known by the PropertyConsumer.

  Specified by:
    `setPropertyPrefix` in interface `PropertyConsumer`
  Parameters:
    `prefix` - the prefix String.

### getPropertyPrefix

    public java.lang.String getPropertyPrefix()

  Get the property key prefix that is being used to prepend to the property keys for Properties lookups.

  Specified by:
    `getPropertyPrefix` in interface `PropertyConsumer`
  Returns:
    the property prefix for the panel

### findAndInit

    public void findAndInit(java.lang.Object obj)

  Specified by:
    `findAndInit` in interface `LightMapHandlerChild`

### findAndUndo

    public void findAndUndo(java.lang.Object obj)

  Specified by:
    `findAndUndo` in interface `LightMapHandlerChild`

### findAndInit

    public void findAndInit(java.util.Iterator it)

  This is the method that your object can use to find other objects within the MapHandler (BeanContext). This method gets called when the object gets added to the MapHandler, or when another object gets added to the MapHandler after the object is a member.

  Parameters:
    `it` - Iterator to use to go through a list of objects. Find the ones you need, and hook yourself up.

### childrenAdded

    public void childrenAdded(java.beans.beancontext.BeanContextMembershipEvent bcme)

  BeanContextMembershipListener method. Called when a new object is added to the BeanContext of this object.

  Specified by:
    `childrenAdded` in interface `java.beans.beancontext.BeanContextMembershipListener`

### childrenRemoved

    public void childrenRemoved(java.beans.beancontext.BeanContextMembershipEvent bcme)

  BeanContextMembershipListener method. Called when a new object is removed from the BeanContext of this object. For the Layer, this method doesn't do anything. If your layer does something with the childrenAdded method, or findAndInit, you should take steps in this method to unhook the layer from the object used in those methods.

  Specified by:
    `childrenRemoved` in interface `java.beans.beancontext.BeanContextMembershipListener`

### getBeanContext

    public java.beans.beancontext.BeanContext getBeanContext()

  Method for BeanContextChild interface.

  Specified by:
    `getBeanContext` in interface `java.beans.beancontext.BeanContextChild`

### setBeanContext

    public void setBeanContext(java.beans.beancontext.BeanContext in_bc)
                        throws java.beans.PropertyVetoException

  Method for BeanContextChild interface. Adds this object as a BeanContextMembership listener, set the BeanContext in this objects BeanContextSupport, and receives the initial list of objects currently contained in the BeanContext.

  Specified by:
    `setBeanContext` in interface `java.beans.beancontext.BeanContextChild`
  Throws:
    `java.beans.PropertyVetoException`

### addVetoableChangeListener

    public void addVetoableChangeListener(java.lang.String propertyName,
                                          java.beans.VetoableChangeListener in_vcl)

  Method for BeanContextChild interface. Uses the BeanContextChildSupport to add a listener to this object's property. This listener wants to have the right to veto a property change.

  Specified by:
    `addVetoableChangeListener` in interface `java.beans.beancontext.BeanContextChild`

### removeVetoableChangeListener

    public void removeVetoableChangeListener(java.lang.String propertyName,
                                             java.beans.VetoableChangeListener in_vcl)

  Method for BeanContextChild interface. Uses the BeanContextChildSupport to remove a listener to this object's property. The listener has the power to veto property changes.

  Specified by:
    `removeVetoableChangeListener` in interface `java.beans.beancontext.BeanContextChild`

### fireVetoableChange

    public void fireVetoableChange(java.lang.String name,
                                   java.lang.Object oldValue,
                                   java.lang.Object newValue)
                            throws java.beans.PropertyVetoException

  Report a vetoable property update to any registered listeners. If anyone vetos the change, then fire a new event reverting everyone to the old value and then rethrow the PropertyVetoException.

  No event is fired if old and new are equal and non-null.

  Parameters:
    `name` - The programmatic name of the property that is about to change
    `oldValue` - The old value of the property
    `newValue` - - The new value of the property
  Throws:
    `java.beans.PropertyVetoException` - if the recipient wishes the property change to be rolled back.

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