bibliothek.gui
Class DockFrontend.DockInfo

java.lang.Object
  extended by bibliothek.gui.DockFrontend.DockInfo
All Implemented Interfaces:
FrontendEntry
Enclosing class:
DockFrontend

public class DockFrontend.DockInfo
extends Object
implements FrontendEntry

Information about a Dockable.

Author:
Benjamin Sigg

Constructor Summary
DockFrontend.DockInfo(Dockable dockable, String key)
          Creates a new DockInfo.
 
Method Summary
 Dockable getDockable()
          The element for which this object stores information.
 String getKey()
          The name which is used for this object.
 DockLayoutComposition getLayout()
          Gets information about the layout of this element.
 DockableProperty getLocation()
          Gets the location of the element which it had the last time it was made invisible.
 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 isEntryLayout()
          If set, then every entry Setting can change the layout of this element.
 boolean isHideable()
          Tells whether to show a "close"-action for the dockable or not.
 boolean isShown()
          Tells whether this infos dockable should be shown.
 void setDockable(Dockable dockable)
          Exchanges the dockable which is stored in this DockFrontend.DockInfo
 void setEntryLayout(boolean entryLayout)
          If set, then every entry Setting can change the layout of this element.
 void setHideable(boolean hideable)
          Sets whether the element can be made invisible or not.
 void setLayout(DockLayoutComposition layout)
          Sets information about the layout of this element.
 void setLocation(String root, DockableProperty location)
          Sets the location of the element.
 void setShown(boolean shown)
          Sets whether the dockable of this entry should be shown or not.
 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
 

Constructor Detail

DockFrontend.DockInfo

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

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

setShown

public void setShown(boolean shown)
Description copied from interface: FrontendEntry
Sets whether the dockable of this entry should be shown or not. Note that this method will not change any state of the dockable, it only stores a hint.

Specified by:
setShown in interface FrontendEntry
Parameters:
shown - whether the element should be shown

isShown

public boolean isShown()
Description copied from interface: FrontendEntry
Tells whether this infos dockable should be shown. Note that this is only a hint, not the actual state.

Specified by:
isShown in interface FrontendEntry
Returns:
whether this element should be shown

isEntryLayout

public boolean isEntryLayout()
Description copied from interface: FrontendEntry
If set, then every entry Setting can change the layout of this element.

Specified by:
isEntryLayout in interface FrontendEntry
Returns:
true if the layout of this element should be stored always.

setEntryLayout

public void setEntryLayout(boolean entryLayout)
Description copied from interface: FrontendEntry
If set, then every entry Setting can change the layout of this element.

Specified by:
setEntryLayout in interface FrontendEntry
Parameters:
entryLayout - if the layout of this element should be stored always.

isHideable

public boolean isHideable()
Description copied from interface: FrontendEntry
Tells whether to show a "close"-action for the dockable or not.

Specified by:
isHideable in interface FrontendEntry
Returns:
true if the element can be made invisible.

setHideable

public void setHideable(boolean hideable)
Description copied from interface: FrontendEntry
Sets whether the element can be made invisible or not. This method will have an immediate effect.

Specified by:
setHideable in interface FrontendEntry
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()
Description copied from interface: FrontendEntry
The element for which this object stores information.

Specified by:
getDockable in interface FrontendEntry
Returns:
the element, can be null

setDockable

public void setDockable(Dockable dockable)
Exchanges the dockable which is stored in this DockFrontend.DockInfo

Parameters:
dockable - the new dockable, can be null

getKey

public String getKey()
Description copied from interface: FrontendEntry
The name which is used for this object.

Specified by:
getKey in interface FrontendEntry
Returns:
the name

updateLocation

public void updateLocation()
Description copied from interface: FrontendEntry
Updates the values of root and location according to the current location of the element.

Specified by:
updateLocation in interface FrontendEntry

setLocation

public void setLocation(String root,
                        DockableProperty location)
Description copied from interface: FrontendEntry
Sets the location of the element. Note that this method will have no effect if the dockable is currently shown.

Specified by:
setLocation in interface FrontendEntry
Parameters:
root - the root, might be null
location - the location, might be null

getRoot

public String getRoot()
Description copied from interface: FrontendEntry
Gets the name of the station on which the element was the last time when it was made invisible.

Specified by:
getRoot in interface FrontendEntry
Returns:
the name or null

getLocation

public DockableProperty getLocation()
Description copied from interface: FrontendEntry
Gets the location of the element which it had the last time it was made invisible.

Specified by:
getLocation in interface FrontendEntry
Returns:
the location or null

setLayout

public void setLayout(DockLayoutComposition layout)
Description copied from interface: FrontendEntry
Sets information about the layout of this element. Note: this is only a hint and might only be applied if the dockable of this entry is currently missing and added later.

Specified by:
setLayout in interface FrontendEntry
Parameters:
layout - the layout, can be null

getLayout

public DockLayoutComposition getLayout()
Description copied from interface: FrontendEntry
Gets information about the layout of this element.

Specified by:
getLayout in interface FrontendEntry
Returns:
the information, might be null