public class DockableState extends java.lang.Object implements java.lang.Comparable<DockableState>
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.
Modifier and Type | Class and Description |
---|---|
static class |
DockableState.Location
Possible locations of a dockable
|
Constructor and Description |
---|
DockableState() |
DockableState(DockableState copy,
RelativeDockablePosition position)
Creates a dockable state based on an existing state, with another relative positionning
|
DockableState(DockingDesktop desktop,
Dockable dockable,
DockableState.Location location) |
DockableState(DockingDesktop desktop,
Dockable dockable,
DockableState.Location location,
RelativeDockablePosition position) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DockableState object)
Comparable interface, used to sort components by name order.
|
DockingDesktop |
getDesktop()
Returns the desktop currently using this dockable, or null if none
|
Dockable |
getDockable()
Returns the dockable this state is for
|
DockableState.Location |
getLocation()
Returns the current location of the dockable (CLOSED, DOCKED, HIDDEN...).
|
static DockableState.Location |
getLocationFromInt(int state)
Utility (compatibility) method used to associate an int to the Location enumeration
(opposite to location.ordinal()
|
RelativeDockablePosition |
getPosition()
Returns the relative restore position of the dockable when it is not shown (auto-hide
or closed).
|
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
|
void |
setDesktop(DockingDesktop desktop)
Updates the desktop field (desktop using this dockable)
|
java.lang.String |
toString() |
public DockableState()
public DockableState(DockingDesktop desktop, Dockable dockable, DockableState.Location location)
public DockableState(DockingDesktop desktop, Dockable dockable, DockableState.Location location, RelativeDockablePosition position)
public DockableState(DockableState copy, RelativeDockablePosition position)
public int compareTo(DockableState object)
compareTo
in interface java.lang.Comparable<DockableState>
public Dockable getDockable()
public boolean isDocked()
public boolean isHidden()
public boolean isClosed()
public boolean isFloating()
public boolean isMaximized()
public DockableState.Location getLocation()
public RelativeDockablePosition getPosition()
Please note that this position is meaningless for visible components (as it is not automatically calculated at every move / resize of the dockable ).
public java.lang.String toString()
toString
in class java.lang.Object
public DockingDesktop getDesktop()
public void setDesktop(DockingDesktop desktop)
public static DockableState.Location getLocationFromInt(int state)
Copyright © 2010-2014 Pacific Biosciences. All Rights Reserved.