bibliothek.gui
Class DockFrontend.DockInfo

java.lang.Object
  extended by bibliothek.gui.DockFrontend.DockInfo
Enclosing class:
DockFrontend

private class DockFrontend.DockInfo
extends java.lang.Object

Information about a Dockable.

Author:
Benjamin Sigg

Field Summary
private  Dockable dockable
          The element for which information is stored
private  boolean hideable
          true if the element has a "close"-action, false otherwise
private  boolean hideActionVisible
          Whether the hide-action is currently visible or not
private  java.lang.String key
          The name of the element
private  DockableProperty location
          The location of dockable on the station named root
private  java.lang.String root
          The name of the root on which dockable was, when it was made invisible
private  DefaultDockActionSource source
          The DockActionSource which is used for dockable
 
Constructor Summary
DockFrontend.DockInfo(Dockable dockable, java.lang.String key)
          Creates a new DockInfo.
 
Method Summary
 Dockable getDockable()
          The element for which this object stores information.
 java.lang.String getKey()
          The name which is used for this object.
 DockableProperty getLocation()
          Gets the location of the element which it had the last time it was made invisible.
 java.lang.String getRoot()
          Gets the name of the station on which the element was the last time when it was made invisible.
 DefaultDockActionSource getSource()
          Gets the DockActionSource which will be added to the offers of the element.
 boolean isHideable()
          Tells whether to show a "close"-action for the dockable or not.
 void setHideable(boolean hideable)
          Sets whether the element can be made invisible or not.
 void setLocation(java.lang.String root, DockableProperty location)
          Sets the location of the element.
 void updateHideAction()
          Updates the visibility-state of the hide action
 void updateLocation()
          Updates the values of root and location according to the current location of the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dockable

private Dockable dockable
The element for which information is stored


key

private java.lang.String key
The name of the element


hideable

private boolean hideable
true if the element has a "close"-action, false otherwise


source

private DefaultDockActionSource source
The DockActionSource which is used for dockable


root

private java.lang.String root
The name of the root on which dockable was, when it was made invisible


location

private DockableProperty location
The location of dockable on the station named root


hideActionVisible

private boolean hideActionVisible
Whether the hide-action is currently visible or not

Constructor Detail

DockFrontend.DockInfo

public DockFrontend.DockInfo(Dockable dockable,
                             java.lang.String key)
Creates a new DockInfo.

Parameters:
dockable - the element whose informations are stored
key - the name of the element
Method Detail

isHideable

public boolean isHideable()
Tells whether to show a "close"-action for the dockable or not.

Returns:
true if the element can be made invisible.

setHideable

public void setHideable(boolean hideable)
Sets whether the element can be made invisible or not.

Parameters:
hideable - the new state

updateHideAction

public void updateHideAction()
Updates the visibility-state of the hide action


getSource

public DefaultDockActionSource getSource()
Gets the DockActionSource which will be added to the offers of the element.

Returns:
the additional source

getDockable

public Dockable getDockable()
The element for which this object stores information.

Returns:
the element

getKey

public java.lang.String getKey()
The name which is used for this object.

Returns:
the name

updateLocation

public void updateLocation()
Updates the values of root and location according to the current location of the element.


setLocation

public void setLocation(java.lang.String root,
                        DockableProperty location)
Sets the location of the element. Note that this just stores the location, no effect will be visible for the user.

Parameters:
root - the root, might be null
location - the location, might be null

getRoot

public java.lang.String getRoot()
Gets the name of the station on which the element was the last time when it was made invisible.

Returns:
the name or null
See Also:
updateLocation()

getLocation

public DockableProperty getLocation()
Gets the location of the element which it had the last time it was made invisible.

Returns:
the location or null
See Also:
updateLocation()