|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.tools.beanbox.BeanBox
public abstract class BeanBox
The BeanBox class manages a set of java beans that are delivered to
it from the BeanPanel
via the
BeanBoxDnDCatcher
. An
implementation of this abstract class is expected to be associated
with an openmap layer. The abstract BeanBox class performs
functions such as adding and removing beans from the associated
openmap layer and provides support for moving beans on the layer
and cut/copy/paste functionality.
Layer developers wishing to make use of the BeanBox's bean management capabilities should:
BeanBoxHandler
interface in
the layer associated with the BeanBox implementation.An implementation of this class should provide layer specific versions of at least the following abstract base class methods:
BeanContainer
s)Additionally, an implementation of this class can optionally provide layer specific versions of the following base class methods:
Constructor Summary | |
---|---|
BeanBox()
Default constructor initializes the BeanBox. |
Method Summary | |
---|---|
abstract void |
addBean(java.lang.Object bean)
This method is called when a bean is dropped on the layer associated with this BeanBox. |
abstract void |
beanChanged(java.lang.Object bean,
java.lang.String changedPropertyName)
This method is called by a propertysheet whenever a bean property changes. |
abstract boolean |
containsBean(java.lang.Object bean)
This method is intended to check whether this BeanBox knows about the specified bean. |
protected void |
createPropertySheet(java.lang.Object bean)
Utility method to create and display a property sheet to show the specified bean's properties. |
protected void |
doSpecialHandling(java.lang.Object bean)
Checks if the specified bean should be added to a BeanContainer . |
abstract BeanContainer |
findEnclosingContainer(java.lang.Object bean)
Returns a bean contained in the layer that implements the BeanContainer interface and which contains the specified bean. |
abstract java.lang.Object |
getBeanAtLocation(java.awt.Point pointOnMap)
Returns a bean contained in the layer at the specified map location. |
java.beans.BeanInfo |
getBeanInfoForBean(java.lang.String beanClassName)
Utility method to obtain the BeanInfo object associated with a bean class that the BeanBox knows about. |
protected java.awt.Image |
getDragImage(java.lang.Object bean)
Returns the image that the cursor will be set to when the specified bean is dragged over the map. |
protected void |
prepareForAddition(java.lang.Object bean,
java.beans.BeanInfo beanInfo,
java.awt.Point location)
This method is called to prepare the bean for addition to the beanbox. |
abstract void |
relocateBean(java.lang.Object bean,
java.beans.BeanInfo beanInfo,
java.awt.Point newLocation)
This method is called when a bean is moved from its present location to the newlocation within the layer associated with this BeanBox. |
abstract void |
removeBean(java.lang.Object bean)
This method is called when a bean is moved from the layer associated with this BeanBox to another layer. |
abstract void |
setBeanProperties(java.lang.Object bean,
java.beans.BeanInfo beanInfo,
java.awt.Point location)
This method is called when a bean is dropped on the layer associated with this BeanBox. |
void |
showCut(java.lang.Object bean)
This method is called when the user 'cuts' a bean, usually as a a result of the clicking on it in a layer and then pressing Ctrl-X. |
void |
showSelected(java.lang.Object bean)
This method is called when the user selects a bean, usually as a a result of the clicking on it in a layer. |
void |
showUnCut(java.lang.Object bean)
This method is called when the user cancels a 'cut' operation, usually as a a result of pressing the ESC key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanBox()
Method Detail |
---|
public java.beans.BeanInfo getBeanInfoForBean(java.lang.String beanClassName)
protected void prepareForAddition(java.lang.Object bean, java.beans.BeanInfo beanInfo, java.awt.Point location)
protected void createPropertySheet(java.lang.Object bean) throws java.lang.Exception
java.lang.Exception
protected void doSpecialHandling(java.lang.Object bean)
BeanContainer
.
protected java.awt.Image getDragImage(java.lang.Object bean)
public void showSelected(java.lang.Object bean)
public void showCut(java.lang.Object bean)
public void showUnCut(java.lang.Object bean)
public abstract void addBean(java.lang.Object bean)
public abstract void removeBean(java.lang.Object bean)
public abstract boolean containsBean(java.lang.Object bean)
public abstract void setBeanProperties(java.lang.Object bean, java.beans.BeanInfo beanInfo, java.awt.Point location)
public abstract java.lang.Object getBeanAtLocation(java.awt.Point pointOnMap)
public abstract BeanContainer findEnclosingContainer(java.lang.Object bean)
public abstract void relocateBean(java.lang.Object bean, java.beans.BeanInfo beanInfo, java.awt.Point newLocation)
public abstract void beanChanged(java.lang.Object bean, java.lang.String changedPropertyName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |