bibliothek.gui.dock.frontend
Class DefaultDockFrontendPerspective

java.lang.Object
  extended by bibliothek.gui.dock.frontend.DefaultDockFrontendPerspective
All Implemented Interfaces:
DockFrontendPerspective

public class DefaultDockFrontendPerspective
extends Object
implements DockFrontendPerspective

This default implementation of DockFrontendPerspective is used by the DefaultLayoutChangeStrategy and builds upon a PredefinedDockSituation.

Author:
Benjamin Sigg

Constructor Summary
DefaultDockFrontendPerspective(DockFrontend frontend, PredefinedPerspective perspective, boolean entry)
          Creates a new perspective
 
Method Summary
 void apply()
          Applies the current layout to the DockFrontend which created this perspective.
Please note that implementations may restrict what information is applied, specifically: It may not be possible to add/remove root-stations through this method. Invisible elements may not be touched
 PredefinedPerspective getPerspective()
          Gets the internal representation of this layout.
 PropertyTransformer getPropertyTransformer()
          Gets a PropertyTransformer which is used to read and write DockablePropertys.
 PerspectiveStation getRoot(String root)
          Allows access to the root DockStation named root.
 void store(String name)
          Stores this perspective in the DockFrontend using name as key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDockFrontendPerspective

public DefaultDockFrontendPerspective(DockFrontend frontend,
                                      PredefinedPerspective perspective,
                                      boolean entry)
Creates a new perspective

Parameters:
frontend - the DockFrontend in whose realm this perspective is used
perspective - the perspective to build upon, not null
entry - whether the layout is a full or regular layout
Method Detail

getPropertyTransformer

public PropertyTransformer getPropertyTransformer()
Description copied from interface: DockFrontendPerspective
Gets a PropertyTransformer which is used to read and write DockablePropertys.

Specified by:
getPropertyTransformer in interface DockFrontendPerspective
Returns:
the transformer

getPerspective

public PredefinedPerspective getPerspective()
Description copied from interface: DockFrontendPerspective
Gets the internal representation of this layout.

Specified by:
getPerspective in interface DockFrontendPerspective
Returns:
the internal representation

getRoot

public PerspectiveStation getRoot(String root)
Description copied from interface: DockFrontendPerspective
Allows access to the root DockStation named root.

Specified by:
getRoot in interface DockFrontendPerspective
Parameters:
root - the name of the station
Returns:
the root station or null if not found

apply

public void apply()
Description copied from interface: DockFrontendPerspective
Applies the current layout to the DockFrontend which created this perspective.
Please note that implementations may restrict what information is applied, specifically:

Specified by:
apply in interface DockFrontendPerspective

store

public void store(String name)
Description copied from interface: DockFrontendPerspective
Stores this perspective in the DockFrontend using name as key. The same restrictions as found in DockFrontendPerspective.apply() may apply to this method.

Specified by:
store in interface DockFrontendPerspective
Parameters:
name - the name of this layout