bibliothek.gui.dock.common.intern
Interface CControlAccess


public interface CControlAccess

Gives access to the internal methods of a CControl.
This class is not intended to be used by clients, using it wrongly can result in weird behavior of its owning CControl.

Author:
Benjamin Sigg

Method Summary
 CDockableAccess access(CDockable dockable)
          Grants access to the internal methods of a CDockable.
 DockAction createCloseAction(CDockable dockable)
          Gets an action that closes dockable when clicked.
 void fillMultiFactories(CSetting setting)
          Fills the property multiple factory dockables in setting.
 java.lang.String getFactoryId(MultipleCDockableFactory<?,?> factory)
          Gets the id of factory.
 CLocationModeManager getLocationManager()
          Gets the manager that is responsible to change the extended mode of the Dockables.
 CControl getOwner()
          Gets the control to which this object gives access.
 MutableCControlRegister getRegister()
          Gets the mutable register of the CControl.
 boolean hasParent(CDockable dockable)
          Tells whether dockable has a parent and is registered.
 void hide(CDockable dockable)
          Makes dockable invisible.
 boolean isVisible(CDockable dockable)
          Tells whether dockable is visible or not.
 void link(CDockable dockable, CDockableAccess access)
          Gives or removes access to internal properties of an CDockable.
 java.lang.String shouldStore(CDockable dockable)
          Tells whether information about dockable should remain stored even if the element is removed from the CControl.
 boolean shouldStore(java.lang.String key)
          Calls one of the shouldStore methods of MissingCDockableStrategy if key has the correct format
 void show(CDockable dockable)
          Makes dockable visible.
 

Method Detail

getOwner

CControl getOwner()
Gets the control to which this object gives access.

Returns:
the owner

show

void show(CDockable dockable)
Makes dockable visible.

Parameters:
dockable - the element that will be made visible

hide

void hide(CDockable dockable)
Makes dockable invisible.

Parameters:
dockable - the element that will be made invisible

isVisible

boolean isVisible(CDockable dockable)
Tells whether dockable is visible or not.

Parameters:
dockable - the dockable whose visibility-state is in question
Returns:
true if dockable is visible

hasParent

boolean hasParent(CDockable dockable)
Tells whether dockable has a parent and is registered.

Parameters:
dockable - the dockable to check
Returns:
true if dockable is in the tree and not a root

getFactoryId

java.lang.String getFactoryId(MultipleCDockableFactory<?,?> factory)
Gets the id of factory.

Parameters:
factory - the factory to search
Returns:
the id or null

getLocationManager

CLocationModeManager getLocationManager()
Gets the manager that is responsible to change the extended mode of the Dockables.

Returns:
the manager

createCloseAction

DockAction createCloseAction(CDockable dockable)
Gets an action that closes dockable when clicked.

Parameters:
dockable - the element to close
Returns:
the action

link

void link(CDockable dockable,
          CDockableAccess access)
Gives or removes access to internal properties of an CDockable.

Parameters:
dockable - the element which changes its access
access - the new access, might be null

access

CDockableAccess access(CDockable dockable)
Grants access to the internal methods of a CDockable.

Parameters:
dockable - the element whose access is searched
Returns:
the access or null

shouldStore

boolean shouldStore(java.lang.String key)
Calls one of the shouldStore methods of MissingCDockableStrategy if key has the correct format

Parameters:
key - the key for which a dockable might be stored
Returns:
true if layout information for key should be stored, false otherwise

shouldStore

java.lang.String shouldStore(CDockable dockable)
Tells whether information about dockable should remain stored even if the element is removed from the CControl.

Parameters:
dockable - the element to check
Returns:
null if nothing should be stored, the unique encoded identifier of dockable if data should remain stored

getRegister

MutableCControlRegister getRegister()
Gets the mutable register of the CControl. Note that clients should only query this register, but not change anything in it.

Returns:
the register

fillMultiFactories

void fillMultiFactories(CSetting setting)
Fills the property multiple factory dockables in setting.

Parameters:
setting - the setting to fill