com.javadocking.model
Class DefaultFloatDockFactory

java.lang.Object
  extended by com.javadocking.model.DefaultFloatDockFactory
All Implemented Interfaces:
FloatDockFactory

public class DefaultFloatDockFactory
extends java.lang.Object
implements FloatDockFactory

This class creates a normal float dock with the constructor FloatDock.FloatDock(Window, DockFactory) if the childDockFactory is not null. Otherwise the constructor FloatDock.FloatDock(Window) is used.

Author:
Heidi Rakels.

Constructor Summary
DefaultFloatDockFactory()
          Constructs a factory for creating FloatDocks.
DefaultFloatDockFactory(DockFactory childDockFactory)
          Constructs a factory for creating FloatDocks.
 
Method Summary
 FloatDock createFloatDock(java.awt.Window owner)
          Create a float dock with the given window as owner.
 DockFactory getChildDockFactory()
          Gets the factory that will create child docks for the float docks created by this factory.
 void loadProperties(java.lang.String prefix, java.util.Properties properties)
          Sets the properties for this float dock factory.
 void saveProperties(java.lang.String prefix, java.util.Properties properties)
          Saves the properties of this float dock factory in the given properties object.
 void setChildDockFactory(DockFactory childDockFactory)
          Sets the factory that will create child docks for the float docks created by this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFloatDockFactory

public DefaultFloatDockFactory()
Constructs a factory for creating FloatDocks.


DefaultFloatDockFactory

public DefaultFloatDockFactory(DockFactory childDockFactory)
Constructs a factory for creating FloatDocks. The specified factory for creating child docks is given to the created float docks.

Parameters:
childDockFactory - The factory that will create child docks for the float docks created by this factory.
Method Detail

createFloatDock

public FloatDock createFloatDock(java.awt.Window owner)
Description copied from interface: FloatDockFactory
Create a float dock with the given window as owner.

Specified by:
createFloatDock in interface FloatDockFactory
Parameters:
owner - The owner window of the float dock.
Returns:
The created float dock.

loadProperties

public void loadProperties(java.lang.String prefix,
                           java.util.Properties properties)
Description copied from interface: FloatDockFactory
Sets the properties for this float dock factory. The properties can be found in the given properties object and the property names for this float dock factory start with the given prefix.

Specified by:
loadProperties in interface FloatDockFactory
Parameters:
prefix - The prefix of the names of the properties that have been intended for this float dock factory.
properties - The properties object that contains the properties for this float dock factory. It can contain also properties for other objects, but they will have another prefix.

saveProperties

public void saveProperties(java.lang.String prefix,
                           java.util.Properties properties)
Description copied from interface: FloatDockFactory
Saves the properties of this float dock factory in the given properties object. The property names for this float dock factory should start with the given prefix.

Specified by:
saveProperties in interface FloatDockFactory
Parameters:
prefix - The prefix for the property names.
properties - The properties object to which the properties should be added.

getChildDockFactory

public DockFactory getChildDockFactory()
Gets the factory that will create child docks for the float docks created by this factory. If this factory is null, the default factory of the float dock will be used.

Returns:
The factory that will create child docks for the float docks created by this factory.

setChildDockFactory

public void setChildDockFactory(DockFactory childDockFactory)
Sets the factory that will create child docks for the float docks created by this factory.

Parameters:
childDockFactory - The factory that will create child docks for the float docks created by this factory.