|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.dockable.ActionDockable
public class ActionDockable
A decorator for a delegate Dockable
.
This decorator adds actions to the delegate.
Information on using dockables with actions is in How to Use Dockables in The Sanaware Developer Guide.
When the method getActions()
is called, the actions of this decorator
are added at the end of the matrix of actions retrieved by executing this method
on the delegate.
Constructor Summary | |
---|---|
ActionDockable(Dockable delegate)
Constructs a decorator for the given dockable. |
|
ActionDockable(Dockable delegate,
javax.swing.Action[][] actionsToAdd)
Constructs a decorator for the given dockable. |
Method Summary | |
---|---|
void |
addDockingListener(DockingListener listener)
Adds a listener for docking events of this dockable. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a java.beans.PropertyChangeListener. |
boolean |
equals(java.lang.Object object)
Returns true if the given object is a Dockable with the same ID
as this dockable. |
void |
fireDockingChanged(DockableEvent dockableEvent)
Notifies all listeners that have registered interest for notification on this event type. |
void |
fireDockingWillChange(DockableEvent dockableEvent)
Notifies all listeners that have registered interest for notification on this event type. |
javax.swing.Action[][] |
getActions()
Creates a matrix of actions with the actions retrieved from the delegate and the actions of this decorator. |
javax.swing.Action[][] |
getActionsToAdd()
Gets the actions that will be added by this wrapper to the matrix of actions of the delegate. |
java.awt.Component |
getContent()
Gets the content of the dockable. |
java.lang.String |
getDescription()
Gets the description of the dockable. |
LeafDock |
getDock()
Gets the dock in which the dockable is docked. |
int |
getDockingModes()
Gets the modes how this dockable can be docked. |
javax.swing.Icon |
getIcon()
Gets the icon of the dockable. |
java.lang.String |
getID()
Gets the ID of the dockable. |
int |
getLastDockingMode()
Gets the mode how the dockable is docked in its current dock or how it was docked the last time it was in a dock. |
int |
getPossibleStates()
Gets the possible states of the dockable. |
int |
getState()
Gets the state of the dockable. |
java.lang.String |
getTitle()
Gets the title of the dockable. |
java.lang.Object |
getVisualizer()
Gets the object that currently shows the content of the dockable. |
int |
hashCode()
|
boolean |
isWithHeader()
Returns whether the dockable will have a header when it is docked alone. |
void |
removeDockingListener(DockingListener listener)
Removes a listener for docking events of this dockable. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a java.beans.PropertyChangeListener. |
void |
setActionsToAdd(javax.swing.Action[][] actions)
Sets the actions that will be added by this wrapper to the matrix of actions of the delegate. |
void |
setDock(LeafDock dock)
Sets the dock in which the dockable is docked. |
void |
setLastDockingMode(int dockingMode)
Sets the mode how the dockable is docked in its current dock or how it was docked the last time it was in a dock. |
void |
setState(int state,
java.lang.Object visualizer)
Tries to set the new state of the dockable. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ActionDockable(Dockable delegate)
delegate
- The delegate dockable.public ActionDockable(Dockable delegate, javax.swing.Action[][] actionsToAdd)
delegate
- The delegate dockable.actionsToAdd
- The actions that will be added to the matrix of actions of the delegate.getActions()
Method Detail |
---|
public javax.swing.Action[][] getActions()
Creates a matrix of actions with the actions retrieved from the delegate and the actions of this decorator.
The rows of actions of this decorator will be the rows at the end of the action matrix.
If the delegate returns null, then the matrix of actions of this decorator is returned.
getActions
in interface Dockable
public java.awt.Component getContent()
Dockable
getContent
in interface Dockable
public LeafDock getDock()
Dockable
getDock
in interface Dockable
public int getDockingModes()
Dockable
Gets the modes how this dockable can be docked. The integer should be a combination of constants defined by DockingMode
.
Combinations of the different modes are made by using the bitwise or-operator.
getDockingModes
in interface Dockable
DockingMode
.public javax.swing.Icon getIcon()
Dockable
getIcon
in interface Dockable
public java.lang.String getID()
Dockable
getID
in interface Dockable
public int getLastDockingMode()
Dockable
getLastDockingMode
in interface Dockable
DockingMode
.public int getPossibleStates()
Dockable
DockableState
.
A combination is made by the bitwise or-operation on the integer constants.
getPossibleStates
in interface Dockable
public int getState()
Dockable
getState
in interface Dockable
DockableState
.public java.lang.String getTitle()
Dockable
getTitle
in interface Dockable
public java.lang.String getDescription()
Dockable
getDescription
in interface Dockable
public boolean isWithHeader()
Dockable
isWithHeader
in interface Dockable
public void setDock(LeafDock dock)
Dockable
setDock
in interface Dockable
dock
- The dock in which the dockable is docked.
This can be null, if the dockable is not docked.public void setLastDockingMode(int dockingMode)
Dockable
setLastDockingMode
in interface Dockable
dockingMode
- The mode how the dockable is docked in its current dock or how it was docked the last time it was
in a dock. This integer should be a constant defined by DockingMode
.public java.lang.Object getVisualizer()
Dockable
DockableState.CLOSED
.
getVisualizer
in interface Dockable
public void setState(int state, java.lang.Object visualizer)
Dockable
Dockable.getPossibleStates()
.
setState
in interface Dockable
state
- The new state of the dockable. This should be a constant defined by DockableState
.visualizer
- The object that currently shows the content of the dockable.
Can be null, i.e. when the state of the dockable is DockableState.CLOSED
.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Dockable
dock
property.
addPropertyChangeListener
in interface Dockable
listener
- The property change listener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Dockable
removePropertyChangeListener
in interface Dockable
listener
- The property change listener to be removedpublic void addDockingListener(DockingListener listener)
Dockable
addDockingListener
in interface Dockable
listener
- A docking listener that will be notified, when this dockable is added, moved, or removed.public void removeDockingListener(DockingListener listener)
Dockable
removeDockingListener
in interface Dockable
listener
- A docking listener to remove.public void fireDockingWillChange(DockableEvent dockableEvent)
Dockable
fireDockingWillChange
in interface Dockable
dockableEvent
- Gives more information about the origin dock, the destination dock,
and the object whose docking state changed.public void fireDockingChanged(DockableEvent dockableEvent)
Dockable
fireDockingChanged
in interface Dockable
dockableEvent
- Gives more information about the origin dock, the destination dock,
and the object whose docking state changed.public boolean equals(java.lang.Object object)
Dockable
with the same ID
as this dockable.
equals
in class java.lang.Object
object
-
Dockable
with the same ID
as this dockable, false otherwise.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setActionsToAdd(javax.swing.Action[][] actions)
actions
- The actions that will be added to the matrix of actions of the delegate.getActions()
public javax.swing.Action[][] getActionsToAdd()
getActions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |