com.vlsolutions.swing.docking
public class DockableState extends Object implements Comparable
This class is a simple record of a dockable and its current display state.
It is used together with DockableStateChangeEvents (and listeners) to track changes of Dockable visibility.
UNKNOWN: 2005/10/07 Lilian Chamontin : added getStateName(int state) method
| Field Summary | |
|---|---|
| static int | STATE_CLOSED A constant describing a Dockable that is not visible.
|
| static int | STATE_DOCKED A constant describing a Dockable that is visible (displayed in a DockableContainer) |
| static int | STATE_FLOATING A constant describing a Dockable that is currently floating (detached from the desktop) |
| static int | STATE_HIDDEN A constant describing a Dockable that is in auto-hide mode (reduced to a button) |
| static int | STATE_MAXIMIZED A constant describing a Dockable that is currently maximized |
| Constructor Summary | |
|---|---|
| DockableState() | |
| DockableState(Dockable dockable, int state) | |
| DockableState(Dockable dockable, int state, RelativeDockablePosition position) | |
| Method Summary | |
|---|---|
| int | compareTo(Object object) Comparable interface, used to sort components by name order.
|
| Dockable | getDockable() Returns the dockable this state is for |
| RelativeDockablePosition | getPosition() Returns the relative restore position of the dockable when it is not shown (auto-hide
or closed).
|
| int | getState() Returns the current state of the dockable (CLOSED, DOCKED, HIDDEN...). |
| static String | getStateName(int state) Returns a litteral representation of the given state |
| boolean | isClosed() Convenience method returning wether the dockable is in the CLOSED state |
| boolean | isDocked() Convenience method returning wether the dockable is in the DOCKED state |
| boolean | isFloating() Convenience method returning wether the dockable is in the FLOATING state |
| boolean | isHidden() Convenience method returning wether the dockable is in the HIDDEN state |
| boolean | isMaximized() Convenience method returning wether the dockable is in the MAXIMIZED state |
| String | toString() |
Please note that this position is meaningless for visible components (as it is not automatically calculated at every move / resize of the dockable ).
Since: 2.0.1