|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.javadocking.dockable.ButtonDockable
public class ButtonDockable
This is an implementation for a dockable that serves as wrapper around components like buttons. This gives these components the ability to be moved to different tool bars.
By default it can be docked only in tool bars and tool grids.
The content button may not be null.
| Constructor Summary | |
|---|---|
ButtonDockable(java.lang.String id,
java.awt.Component content)
Constructs a new dockable with the specified ID and content. |
|
ButtonDockable(java.lang.String id,
java.awt.Component content,
int dockingModes)
Constructs a new dockable with the specified id, content and docking modes. |
|
| 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()
Returns null. |
java.awt.Component |
getContent()
Gets the content of the dockable. |
java.lang.String |
getDescription()
Always returns null |
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()
Always returns null |
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()
Always returns null |
java.lang.Object |
getVisualizer()
Gets the object that currently shows the content of the dockable. |
int |
hashCode()
|
boolean |
isWithHeader()
Always returns false. |
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 |
setDock(LeafDock dock)
Sets the dock in which the dockable is docked. |
void |
setLastDockingMode(int dockPosition)
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 |
setPossibleStates(int possibleStates)
Sets the possible states of the dockable. |
void |
setState(int state,
java.lang.Object visualizer)
Tries to set the new state of the dockable. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonDockable(java.lang.String id,
java.awt.Component content)
DockingMode.TOOL_BAR and DockingMode.FLOAT.
id - The ID of the dockable. The IDs of all dockables should be different.content - The content of the dockable.
java.lang.IllegalArgumentException - If the given ID is null.
public ButtonDockable(java.lang.String id,
java.awt.Component content,
int dockingModes)
id - The ID of the dockable. The IDs of all dockables should be different.content - The content of the dockable.dockingModes - The possible docking modes of the dockable. This integer should be combination of constants
defined by DockingMode.
java.lang.IllegalArgumentException - If the given ID is null.| Method Detail |
|---|
public java.lang.String getID()
Dockable
getID in interface Dockablepublic void setDock(LeafDock dock)
Dockable
setDock in interface Dockabledock - The dock in which the dockable is docked.
This can be null, if the dockable is not docked.public LeafDock getDock()
Dockable
getDock in interface Dockablepublic java.awt.Component getContent()
Dockable
getContent in interface Dockablepublic java.lang.String getTitle()
getTitle in interface Dockablepublic java.lang.String getDescription()
getDescription in interface Dockablepublic javax.swing.Icon getIcon()
getIcon in interface Dockablepublic 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 DockableDockingMode.public void setLastDockingMode(int dockPosition)
Dockable
setLastDockingMode in interface DockabledockPosition - 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 int getLastDockingMode()
Dockable
getLastDockingMode in interface DockableDockingMode.public boolean isWithHeader()
isWithHeader in interface Dockable
public void setState(int state,
java.lang.Object visualizer)
Tries to set the new state of the dockable.
When the given state is DockableState.CLOSED, the dock of this dockable will be set to null.
When the given state is DockableState.NORMAL, the visualizer should be the LeafDock where the
dockable is docked in. The dock of this dockable will be set.
For other states the visualizer can have another type, but these types are not obligatory. The visualizer can even be null.
setState in interface Dockablestate - 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 java.lang.Object getVisualizer()
DockableDockableState.CLOSED.
getVisualizer in interface Dockablepublic int getState()
Dockable
getState in interface DockableDockableState.public int getPossibleStates()
Gets the possible states of the dockable. This can be a combination of constants defined by DockableState.
A combination is made by the bitwise or-operation on the integer constants.
The default states are DockableState.CLOSED | DockableState.NORMAL.
getPossibleStates in interface Dockablepublic javax.swing.Action[][] getActions()
getActions in interface Dockablepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Dockabledock property.
addPropertyChangeListener in interface Dockablelistener - The property change listener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Dockable
removePropertyChangeListener in interface Dockablelistener - The property change listener to be removedpublic void addDockingListener(DockingListener listener)
Dockable
addDockingListener in interface Dockablelistener - A docking listener that will be notified, when this dockable is added, moved, or removed.public void removeDockingListener(DockingListener listener)
Dockable
removeDockingListener in interface Dockablelistener - A docking listener to remove.public void fireDockingWillChange(DockableEvent dockableEvent)
Dockable
fireDockingWillChange in interface DockabledockableEvent - 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 DockabledockableEvent - 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.Objectobject -
Dockable with the same ID
as this dockable, false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic void setPossibleStates(int possibleStates)
possibleStates - The possible states of the dockable.getPossibleStates()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||