com.vlsolutions.swing.docking

Class DockableContainerFactory

public abstract class DockableContainerFactory extends Object

An abstract factory used by the DockingDesktop to create instance of Dockable containers.

This factory enables API Extenders to change part of the behaviour on the DockingDesktop (mostly about look and feel issues) without modifying the code of that central class.

See Also: DockableContainer : the default implementation

UNKNOWN: 2007/01/08 Lilian Chamontin : updated to declare a new titlebar factory method

Field Summary
static intPARENT_DESKTOP
Constant used to describe the type of usage a SingleDockableContainer is for
static intPARENT_DETACHED_WINDOW
Constant used to describe the type of usage a SingleDockableContainer is for
static intPARENT_SPLIT_CONTAINER
Constant used to describe the type of usage a SingleDockableContainer is for
static intPARENT_TABBED_CONTAINER
Constant used to describe the type of usage a SingleDockableContainer is for
Method Summary
abstract SingleDockableContainercreateDockableContainer(Dockable dockable, int parentType)
This method is called by the DockingDesktop whenever a dockable is inserted in its containment hierachy.
SingleDockableContainercreateDockableContainer(Dockable dockable, boolean c)
abstract FloatingDockableContainercreateFloatingDockableContainer(Window owner)
This method is called when a dockable is detached from the DockingDesktop and put in the FLOATING state.
abstract TabbedDockableContainercreateTabbedDockableContainer()
This method is called when a tab insertion is requested by the DockingDesktop.
abstract DockViewTitleBarcreateTitleBar()
This method is invoked when a dockable container needs to install a title bar.
static DockableContainerFactorygetFactory()
Returns the current factory.
static voidsetFactory(DockableContainerFactory f)
Changes the factory to be used by DockingDesktop.

Field Detail

PARENT_DESKTOP

public static final int PARENT_DESKTOP
Constant used to describe the type of usage a SingleDockableContainer is for

PARENT_DETACHED_WINDOW

public static final int PARENT_DETACHED_WINDOW
Constant used to describe the type of usage a SingleDockableContainer is for

PARENT_SPLIT_CONTAINER

public static final int PARENT_SPLIT_CONTAINER
Constant used to describe the type of usage a SingleDockableContainer is for

PARENT_TABBED_CONTAINER

public static final int PARENT_TABBED_CONTAINER
Constant used to describe the type of usage a SingleDockableContainer is for

Method Detail

createDockableContainer

public abstract SingleDockableContainer createDockableContainer(Dockable dockable, int parentType)
This method is called by the DockingDesktop whenever a dockable is inserted in its containment hierachy.

createDockableContainer

public SingleDockableContainer createDockableContainer(Dockable dockable, boolean c)

Deprecated: use the other createDockableContainer method (DockableContainerFactory

createFloatingDockableContainer

public abstract FloatingDockableContainer createFloatingDockableContainer(Window owner)
This method is called when a dockable is detached from the DockingDesktop and put in the FLOATING state.

The floating container must be an instanceof Dialog or Window.

createTabbedDockableContainer

public abstract TabbedDockableContainer createTabbedDockableContainer()
This method is called when a tab insertion is requested by the DockingDesktop.

createTitleBar

public abstract DockViewTitleBar createTitleBar()
This method is invoked when a dockable container needs to install a title bar.

This method is used by the standard implementation of Docking (DockView, etc) but is optional for other implementations, as currently the titlebar isn't specified as a core component of the docking framework (i.e. it is not an interface).

Since: 2.1.3

getFactory

public static DockableContainerFactory getFactory()
Returns the current factory.

it no factory has been provided, it will fall back on DefaultDockableContainerFactory

setFactory

public static void setFactory(DockableContainerFactory f)
Changes the factory to be used by DockingDesktop.

Note that this change is not propagated to already docked components.

© Copyright 2004-2007 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications