|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.flexdock.docking.defaults.AbstractDockable
public abstract class AbstractDockable
Provides a default implementation of the Dockable interface. This
class should be extended by any application that wishes to make use of the
Dockable interface without the need for writing out an implementation
for every method that isn't explicitly used.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.flexdock.docking.event.DockingListener |
|---|
DockingListener.Stub |
| Field Summary |
|---|
| Fields inherited from interface org.flexdock.docking.Dockable |
|---|
DOCKABLE_INDICATOR |
| Constructor Summary | |
|---|---|
AbstractDockable(String id)
Creates a new AbstractDockable instance. |
|
| Method Summary | |
|---|---|
void |
addDockingListener(DockingListener listener)
Adds a DockingListener to observe docking events for this
Dockable. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
boolean |
dock(Dockable dockable)
Provides the default Dockable implementation of
dock(Dockable dockable) by calling and returning
DockingManager.dock(Dockable dockable, Dockable parent). |
boolean |
dock(Dockable dockable,
String relativeRegion)
Provides the default Dockable implementation of
dock(Dockable dockable, String relativeRegion) by calling and
returning
DockingManager.dock(Dockable dockable, Dockable parent, String region). |
boolean |
dock(Dockable dockable,
String relativeRegion,
float ratio)
Provides the default Dockable implementation of
dock(Dockable dockable, String relativeRegion, float ratio) by
calling and returning
DockingManager.dock(Dockable dockable, Dockable parent, String region, float proportion). |
void |
dockingCanceled(DockingEvent evt)
No operation. |
void |
dockingComplete(DockingEvent evt)
No operation. |
void |
dragStarted(DockingEvent evt)
No operation. |
void |
dropStarted(DockingEvent evt)
No operation. |
Object |
getClientProperty(Object key)
Returns the value of the property with the specified key. |
abstract Component |
getComponent()
Returns the Component used to back this Dockable
instance. |
DockingListener[] |
getDockingListeners()
Returns an array of all DockingListeners added to this
Dockable. |
DockingPort |
getDockingPort()
Returns the DockingPort within which this Dockable is
currently docked. |
DockablePropertySet |
getDockingProperties()
Returns a DockablePropertySet instance associated with this
Dockable. |
List |
getDragSources()
Returns a List of Components used to initiate
drag-to-dock operation. |
Set |
getFrameDragSources()
Returns a HashSet of Components used as frame drag
sources when this Dockable is floating in a non-decorated
external dialog. |
String |
getPersistentId()
Returns the persistent ID of this Dockable instance provided when
this object was instantiated. |
String |
getTabText()
Returns the String used for tab labels when this Dockable
is embedded within a tabbed layout. |
void |
putClientProperty(Object key,
Object value)
Adds an arbitrary key/value "client property" to this Dockable. |
void |
removeDockingListener(DockingListener listener)
Removes the specified DockingListener from this Dockable. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setTabText(String tabText)
Sets the String to be used for tab labels when this
Dockable is embedded within a tabbed layout. |
void |
undockingComplete(DockingEvent evt)
No operation. |
void |
undockingStarted(DockingEvent evt)
No operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDockable(String id)
AbstractDockable instance. This constructor is
meant to be invoked by subclasses as it initializes the
Dockable's persistent ID and drag sources.
id - the persistent ID of the resulting DockableDockable.getPersistentId()| Method Detail |
|---|
public abstract Component getComponent()
Component used to back this Dockable
instance.
getComponent in interface DockableComponent used to back this Dockable
instance.Dockable.getComponent()public List getDragSources()
List of Components used to initiate
drag-to-dock operation. By default, the returned List contains
the Component returned by getComponent().
getDragSources in interface DockableList of Components used to initiate
drag-to-dock operation.Dockable.getDragSources(),
getComponent()public String getPersistentId()
Dockable instance provided when
this object was instantiated.
getPersistentId in interface DockableDockableDockable.getPersistentId(),
AbstractDockable(String)public Set getFrameDragSources()
HashSet of Components used as frame drag
sources when this Dockable is floating in a non-decorated
external dialog. The HashSet returned by this method is initially
empty. Because it is mutable, however, new Components may be
added to it.
getFrameDragSources in interface DockableHashSet of Components used as frame drag
sources when this Dockable is floating in a non-decorated
external dialog.Dockable.getFrameDragSources()public void setTabText(String tabText)
String to be used for tab labels when this
Dockable is embedded within a tabbed layout. null values
are discouraged, but not illegal.
tabText - the String to be used for tab labels when this
Dockable is embedded within a tabbed layout.public String getTabText()
String used for tab labels when this Dockable
is embedded within a tabbed layout. It is possible for this method to
return a null reference.
String used for tab labels when this
Dockable is embedded within a tabbed layout.public void dockingCanceled(DockingEvent evt)
DockingListener interface contract.
dockingCanceled in interface DockingListenerevt - the DockingEvent to respond to.DockingListener.dockingCanceled(DockingEvent)public void dockingComplete(DockingEvent evt)
DockingListener interface contract.
dockingComplete in interface DockingListenerevt - the DockingEvent to respond to.DockingListener.dockingComplete(DockingEvent)public void dragStarted(DockingEvent evt)
DockingListener interface contract.
dragStarted in interface DockingListenerevt - the DockingEvent to respond to.DockingListener.dragStarted(DockingEvent)public void dropStarted(DockingEvent evt)
DockingListener interface contract.
dropStarted in interface DockingListenerevt - the DockingEvent to respond to.DockingListener.dropStarted(DockingEvent)public void undockingComplete(DockingEvent evt)
DockingListener interface contract.
undockingComplete in interface DockingListenerevt - the DockingEvent to respond to.DockingListener.undockingComplete(DockingEvent)public void undockingStarted(DockingEvent evt)
DockingListener interface contract.
undockingStarted in interface DockingListenerevt - the DockingEvent to respond to.DockingListener.undockingStarted(DockingEvent)public void addDockingListener(DockingListener listener)
DockingListener to observe docking events for this
Dockable. null arguments are ignored.
addDockingListener in interface DockingMonitorlistener - the DockingListener to add to this Dockable.getDockingListeners(),
removeDockingListener(DockingListener)public DockingListener[] getDockingListeners()
DockingListeners added to this
Dockable. If there are no listeners present for this
Dockable, then a zero-length array is returned.
getDockingListeners in interface DockingMonitorDockingListeners added to this
Dockable.addDockingListener(DockingListener),
removeDockingListener(DockingListener)public void removeDockingListener(DockingListener listener)
DockingListener from this Dockable.
If the specified DockingListener is null, or the
listener has not previously been added to this Dockable, then no
Exception is thrown and no action is taken.
removeDockingListener in interface DockingMonitorlistener - the DockingListener to remove from this
DockableaddDockingListener(DockingListener),
getDockingListeners()public Object getClientProperty(Object key)
putClientProperty will return a non-null
value. If key is null, a null reference is
returned.
If the Component returned by getComponent() is an
instance of JComponent, then this method will dispatch to that
JComponent's getClientProperty(Object, Object) method.
Otherwise, this Dockable will provide its own internal mapping of
client properties.
getClientProperty in interface Dockablekey - the key that is being queried
nullDockable.getClientProperty(Object),
JComponent.getClientProperty(java.lang.Object)
public void putClientProperty(Object key,
Object value)
Dockable.
null values are allowed. If key is null, then no
action is taken.
If the Component returned by getComponent() is an
instance of JComponent, then this method will dispatch to that
JComponent's putClientProperty(Object, Object) method.
Otherwise, this Dockable will provide its own internal mapping of
client properties.
putClientProperty in interface Dockablekey - the new client property keyvalue - the new client property value; if null this method
will remove the propertyDockable.putClientProperty(Object, Object),
JComponent.putClientProperty(java.lang.Object,
java.lang.Object)public DockablePropertySet getDockingProperties()
DockablePropertySet instance associated with this
Dockable. This method returns the default implementation
supplied by the framework by invoking
getDockablePropertySet(Dockable dockable) on
org.flexdock.docking.props.PropertyManager and supplying an
argument of this.
getDockingProperties in interface DockableDockablePropertySet associated with this
Dockable. This method will not return a null
reference.DockablePropertySet,
Dockable.getDockingProperties(),
PropertyManager.getDockablePropertySet(Dockable)public DockingPort getDockingPort()
DockingPort within which this Dockable is
currently docked. If not currently docked, this method will return
null.
This method defers processing to
getDockingPort(Dockable dockable), passing an argument of
this. This DockingPort returned is based upon the
Component returned by this Dockable's abstract
getComponent() method.
getDockingPort in interface DockableDockingPort within which this Dockable is
currently docked.Dockable.getDockingPort(),
DockingManager.getDockingPort(Dockable)public boolean dock(Dockable dockable)
Dockable implementation of
dock(Dockable dockable) by calling and returning
DockingManager.dock(Dockable dockable, Dockable parent).
'this' is passed as the parent parameter.
dock in interface Dockabledockable - the Dockable to dock relative to this Dockable
true if the docking operation was successful;
false otherwise.Dockable.dock(Dockable),
DockingManager.dock(Dockable, Dockable)
public boolean dock(Dockable dockable,
String relativeRegion)
Dockable implementation of
dock(Dockable dockable, String relativeRegion) by calling and
returning
DockingManager.dock(Dockable dockable, Dockable parent, String region).
'this' is passed as the parent parameter.
dock in interface Dockabledockable - the Dockable to dock relative to this DockablerelativeRegion - the docking region into which to dock the specified
Dockable
true if the docking operation was successful;
false otherwise.Dockable.dock(Dockable, String),
DockingManager.dock(Dockable, Dockable, String)
public boolean dock(Dockable dockable,
String relativeRegion,
float ratio)
Dockable implementation of
dock(Dockable dockable, String relativeRegion, float ratio) by
calling and returning
DockingManager.dock(Dockable dockable, Dockable parent, String region, float proportion).
'this' is passed as the parent parameter.
dock in interface Dockabledockable - the Dockable to dock relative to this DockablerelativeRegion - the docking region into which to dock the specified
Dockableratio - the proportion of available space in the resulting layout to
allot to the new sibling Dockable.
true if the docking operation was successful;
false otherwise.DockingManager.dock(Dockable, Dockable, String, float)public void addPropertyChangeListener(PropertyChangeListener listener)
DockableIf listener is null, no exception is thrown and no action is performed.
addPropertyChangeListener in interface Dockablelistener - the PropertyChangeListener to be addedDockable.removePropertyChangeListener(PropertyChangeListener)public void removePropertyChangeListener(PropertyChangeListener listener)
DockableIf listener is null, no exception is thrown and no action is performed.
removePropertyChangeListener in interface Dockablelistener - the PropertyChangeListener to be removedDockable.addPropertyChangeListener(java.beans.PropertyChangeListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||