com.javadocking.dock
Interface DockableHider

All Superinterfaces:
Dock, LeafDock
All Known Implementing Classes:
SingleDock, TabDock

public interface DockableHider
extends LeafDock

This is an interface for a leaf dock that can hide an restore one of its dockables.

Author:
Heidi Rakels.

Method Summary
 Dockable getHiddenDockable(int index)
          Gets the dockable that is hidden in this dock with the given index.
 int getHiddenDockableCount()
          Gets the number of hidden dockables of this dock.
 void hideDockable(Dockable dockable)
           Hides the content of the dockable.
 void restoreDockable(Dockable dockable)
          Restores the dockable that is hidden.
 
Methods inherited from interface com.javadocking.dock.LeafDock
addDockable, canRemoveDockable, containsDockable, getDockable, getDockableCount, getDockablePosition, moveDockable, removeDockable
 
Methods inherited from interface com.javadocking.dock.Dock
addDockable, addDockingListener, getDockPriority, getParentDock, isEmpty, isFull, loadProperties, removeDockingListener, retrieveDockingRectangle, saveProperties, setParentDock
 

Method Detail

hideDockable

void hideDockable(Dockable dockable)

Hides the content of the dockable. The dockable stays docked in this dock at the same position, but it has to be removed from the components of this dock.

The dock is not empty if it has a hidden dockable.

Parameters:
dockable - The dockable that is docked in this dock, that has to be hidden.
Throws:
java.lang.IllegalArgumentException - If the given dockable is not docked in this dock.
java.lang.IllegalStateException - If there is already a hidden dockable.

getHiddenDockableCount

int getHiddenDockableCount()
Gets the number of hidden dockables of this dock.

Returns:
The number of hidden dockables of this dock.

getHiddenDockable

Dockable getHiddenDockable(int index)
Gets the dockable that is hidden in this dock with the given index.

Parameters:
index - The index of the hidden dockable.
Returns:
The hidden dockable, if there is one; otherwise null.
Throws:
java.lang.IndexOutOfBoundsException - If the index is out of range (index < 0 || index >= getHiddenDockableCount()).

restoreDockable

void restoreDockable(Dockable dockable)
Restores the dockable that is hidden.

Parameters:
dockable - The dockable to restore
Throws:
java.lang.IllegalStateException - If the dockable is not hidden.
java.lang.IllegalArgumentException - If the dockable is not docked in this dock.