com.javadocking.dock
Class HidableFloatDock

java.lang.Object
  extended by com.javadocking.dock.FloatDock
      extended by com.javadocking.dock.HidableFloatDock
All Implemented Interfaces:
CompositeDock, Dock

public class HidableFloatDock
extends FloatDock

This is a FloatDock that can be hidden. When the dock is hidden, all its child docks are not visible.

Author:
Heidi Rakels.

Field Summary
 
Fields inherited from interface com.javadocking.dock.CompositeDock
CHILD_DOCK_PREFIX
 
Constructor Summary
HidableFloatDock()
          Constructs a hidable float dock with no owner and a SplitDockFactory as factory for the child docks.
HidableFloatDock(java.awt.Window owner)
          Constructs a hidable float dock with the given window as owner for the child dock windows and a SplitDockFactory as factory for creating child docks.
HidableFloatDock(java.awt.Window owner, DockFactory childDockFactory)
          Constructs a hidable float dock with the given window as owner for the child dock windows and the given factory for the child docks.
 
Method Summary
 void addChildDock(Dock dock, java.awt.Point location, java.awt.Dimension size)
           Adds the given dock as child dock to this dock.
 boolean isHidden()
          Determines if the float dock is hidden.
 void loadProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map newChildDocks, java.util.Map dockablesMap, java.awt.Window owner)
           Loads the properties for this dock.
 void saveProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map childDockIds)
           Saves the properties of this dock in the given properties object.
 void setHidden(boolean hidden)
           
 
Methods inherited from class com.javadocking.dock.FloatDock
addChildDock, addDockable, addDockingListener, addWindowFocusListener, clearGhosts, emptyChild, getChildDock, getChildDockCount, getChildDockFactory, getChildDockPosition, getChildDockWindows, getDefaultFloatingWindowLocation, getDockPriority, getDockPriority, getOwner, getParentDock, ghostChild, isEmpty, isFull, moveDock, removeDockingListener, removeWindowFocusListener, retrieveDockingRectangle, setChildDockFactory, setDockPriority, setOwner, setParentDock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HidableFloatDock

public HidableFloatDock()
Constructs a hidable float dock with no owner and a SplitDockFactory as factory for the child docks.


HidableFloatDock

public HidableFloatDock(java.awt.Window owner)
Constructs a hidable float dock with the given window as owner for the child dock windows and a SplitDockFactory as factory for creating child docks.

Parameters:
owner - The window that owns the floating windows created by this dock.

HidableFloatDock

public HidableFloatDock(java.awt.Window owner,
                        DockFactory childDockFactory)
Constructs a hidable float dock with the given window as owner for the child dock windows and the given factory for the child docks.

Parameters:
owner - The window that owns the floating windows created by this dock.
childDockFactory - The factory for creating child docks.
Method Detail

isHidden

public boolean isHidden()
Determines if the float dock is hidden.

Returns:
True, when the float dock is hidden, false otherwise.

setHidden

public void setHidden(boolean hidden)

addChildDock

public void addChildDock(Dock dock,
                         java.awt.Point location,
                         java.awt.Dimension size)
Description copied from class: FloatDock

Adds the given dock as child dock to this dock.

The dock is put in a dialog. This dialog is created with the method SwComponentFactory.createJDialog(Window) of the component factory of the DockingManager.

There is a border set around the dock. This border is created with the method SwComponentFactory.createFloatingBorder() of the component factory of the docking manager.

The floating window is put at the given location. The window will have the given size. If this size is null, then the preferred size is taken.

Overrides:
addChildDock in class FloatDock
Parameters:
dock - The child dock that is added to this float dock in a floating dialog.
location - The location for the dialog.
size - The size for the dialog. This may be null. In that case the preferred size is taken.

loadProperties

public void loadProperties(java.lang.String prefix,
                           java.util.Properties properties,
                           java.util.Map newChildDocks,
                           java.util.Map dockablesMap,
                           java.awt.Window owner)
                    throws java.io.IOException
Description copied from interface: Dock

Loads the properties for this dock. The properties can be found in the given properties object. The property names for this dock start with the given prefix.

The dockables that should be docked in this dock are added to this dock. They can be found in the given dockables mapping. The docks that should be docked inside this dock are added to this dock. They can be found in the given childDocks mapping.

This method should be called after the empty constructor to create the content of the dock. Don't call this method for a dock that already has a content.

Specified by:
loadProperties in interface Dock
Overrides:
loadProperties in class FloatDock
Parameters:
prefix - The prefix of the names of the properties that have been intended for this dock.
properties - The properties object that contains the properties for this dock. It can contain also properties for other objects, but they will have another prefix.
newChildDocks - A mapping between the dock keys of the child docks that are already loaded and the docks.
  • map key: the key that is used for saving the dock (java.lang.String).
  • map value: a child dock that is already loaded (Dock).
dockablesMap - A mapping that contains the available dockables.
  • map key: the ID of the dockable (java.lang.String).
  • map value: the dockable (Dockable).
owner - The owner window of the dock in the dock model (DockModel).
Throws:
java.io.IOException - If an error occures while decoding the properties.

saveProperties

public void saveProperties(java.lang.String prefix,
                           java.util.Properties properties,
                           java.util.Map childDockIds)
Description copied from interface: Dock

Saves the properties of this dock in the given properties object.

The property names for this dock should start with the given prefix.

Specified by:
saveProperties in interface Dock
Overrides:
saveProperties in class FloatDock
Parameters:
prefix - The prefix for the property names.
properties - The properties object to which the properties should be added.
childDockIds - A mapping between the child docks that are already saved and the keys that are used for the save.
  • map key: a child dock that is already saved (Dock).
  • map value: the key that is used for saving the dock (java.lang.String).