com.javadocking.dock.factory
Interface DockFactory

All Known Subinterfaces:
CompositeDockFactory
All Known Implementing Classes:
CompositeToolBarDockFactory, LeafDockFactory, SingleDockFactory, SplitDockFactory, TabDockFactory, ToolBarDockFactory

public interface DockFactory

This is a factory that creates a Dock for a given Dockable and a given docking mode.

Information on using the dock factory is in How to Use Composite Docks in The Sanaware Developer Guide.

Author:
Heidi Rakels.

Method Summary
 Dock createDock(Dockable dockable, int dockingMode)
          Creates a dock for the given dockable.
 java.awt.Dimension getDockPreferredSize(Dockable dockable, int dockingMode)
          Gets the preferred size for the dock that will be created by this factory.
 void loadProperties(java.lang.String prefix, java.util.Properties properties)
          Sets the properties for this dock factory.
 void saveProperties(java.lang.String prefix, java.util.Properties properties)
          Saves the properties of this dock factory in the given properties object.
 

Method Detail

createDock

Dock createDock(Dockable dockable,
                int dockingMode)
Creates a dock for the given dockable.

Parameters:
dockable - The dockable for which the dock is created.
dockingMode - The docking mode that is used for docking the dockable. This integer should be a constant defined by DockingMode.
Returns:
A dock for the given dockable.

getDockPreferredSize

java.awt.Dimension getDockPreferredSize(Dockable dockable,
                                        int dockingMode)
Gets the preferred size for the dock that will be created by this factory.

Parameters:
dockable - The dockable for which the dock is created.
dockingMode - The docking mode that is used for docking the dockable. This integer should be a constant defined by DockingMode.
Returns:
A dock for the given dockable.

saveProperties

void saveProperties(java.lang.String prefix,
                    java.util.Properties properties)
Saves the properties of this dock factory in the given properties object. The property names for this dock factory should start with the given prefix.

Parameters:
prefix - The prefix for the property names.
properties - The properties object to which the properties should be added.

loadProperties

void loadProperties(java.lang.String prefix,
                    java.util.Properties properties)
Sets the properties for this dock factory. The properties can be found in the given properties object and the property names for this dock factory start with the given prefix.

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