BeanContextAbstractPlugIn (OpenMap API)
Date: 2016-12-09

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.plugin
Class BeanContextAbstractPlugIn

    java.lang.Object
      com.bbn.openmap.plugin.AbstractPlugIn
          com.bbn.openmap.plugin.BeanContextAbstractPlugIn

All Implemented Interfaces:
  MapMouseListener, PlugIn, PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener

Direct Known Subclasses:
  EsriPlugIn, OMGraphicHandlerPlugIn

    public abstract class BeanContextAbstractPlugIn

extends AbstractPlugIn
implements java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener

This class is an abstract implementation of the PlugIn. It does all the things the AbstractPlugIn does, but also carries the support baggage for PlugIns that want to play in the BeanContext.

See Also:
  `PlugInLayer`, `PlugIn`, `MapHandler`, `MapHandlerChild`

Field Summary
`protected java.beans.beancontext.BeanContextChildSupport` | `beanContextChildSupport` BeanContextChildSupport object provides helper functions for BeanContextChild interface.

Fields inherited from class com.bbn.openmap.plugin.AbstractPlugIn
`addToBeanContext, component, i18n, mml, name, prefix, removable, RemovableProperty`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Constructor Summary
`BeanContextAbstractPlugIn()`
`BeanContextAbstractPlugIn(java.awt.Component comp)`

Method Summary
`void` | `addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener in_pcl)` Method for BeanContextChild interface.
`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)` The findAndInit method has been made non-abstract, because it now calls this method for every object that is in the iterator it receives.
`void` | `findAndUndo(java.lang.Object obj)` The childrenRemoved has been changed to go through its iterator to call this method with every object.
`void` | `firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)` Method for BeanContextChild interface.
`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.
`void` | `removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener in_pcl)` Method for BeanContextChild interface.
`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.

Methods inherited from class com.bbn.openmap.plugin.AbstractPlugIn
`dispose, doPrepare, getAddToBeanContext, getComponent, getGUI, getMapMouseListener, getMouseModeServiceList, getName, getProperties, getPropertyInfo, getPropertyPrefix, getRectangle, isRemovable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, removed, repaint, setAddToBeanContext, setComponent, setMapMouseListener, setName, setProperties, setProperties, setPropertyPrefix, setRemovable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### beanContextChildSupport

    protected java.beans.beancontext.BeanContextChildSupport beanContextChildSupport

  BeanContextChildSupport object provides helper functions for BeanContextChild interface.

Constructor Detail

### BeanContextAbstractPlugIn

    public BeanContextAbstractPlugIn()

### BeanContextAbstractPlugIn

    public BeanContextAbstractPlugIn(java.awt.Component comp)

Method Detail

### 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.

### findAndInit

    public void findAndInit(java.lang.Object obj)

  The findAndInit method has been made non-abstract, because it now calls this method for every object that is in the iterator it receives. This lets subclasses call a method on super classes so they can handle their needs as well.

### 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`

### findAndUndo

    public void findAndUndo(java.lang.Object obj)

  The childrenRemoved has been changed to go through its iterator to call this method with every object. This lets subclasses call this method on their super class, so it can handle what it needs to with objects it may be interested in.

### 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`

### addPropertyChangeListener

    public void addPropertyChangeListener(java.lang.String propertyName,
                                          java.beans.PropertyChangeListener in_pcl)

  Method for BeanContextChild interface. Uses the BeanContextChildSupport to add a listener to this object's property. You don't need this function for objects that extend java.awt.Component.

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

### removePropertyChangeListener

    public void removePropertyChangeListener(java.lang.String propertyName,
                                             java.beans.PropertyChangeListener in_pcl)

  Method for BeanContextChild interface. Uses the BeanContextChildSupport to remove a listener to this object's property. You don't need this function for objects that extend java.awt.Component.

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

### 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`

### firePropertyChange

    public void firePropertyChange(java.lang.String name,
                                   java.lang.Object oldValue,
                                   java.lang.Object newValue)

  Method for BeanContextChild interface. Uses the BeanContextChildSupport to fire a property change. You don't need this function for objects that extend java.awt.Component.

### 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