com.javadocking.component
Interface SwComponentFactory

All Known Implementing Classes:
DefaultSwComponentFactory

public interface SwComponentFactory

This factory creates the graphical components that are used by the docking library to build the docking UI. With this factory the components used by the library can be customized.

Information on using the component factory is in How to Use the Component Factory in The Sanaware Developer Guide.

The implementation of this interface should be given to the docking manager with DockingManager.setComponentFactory(SwComponentFactory). Otherwise the default implementation will be used.

Author:
Heidi Rakels.

Method Summary
 SelectableHeader createCompositeTabDockHeader(Dock childDock, int position)
          Creates the header for the given dock that will be displayed in a tab of a dock.
 DockHeader createDockHeader(LeafDock dock, int position)
           Creates the header for the specified dock with multiple dockables.
 ExternalizeDock createExternalizer()
          Creates a LeafDock in which a dockable can be externalized.
 javax.swing.border.Border createFloatingBorder()
          Creates a border for a floating window.
 java.awt.Component createIconButton(javax.swing.Action action)
          Creates a small icon component to perform the given action.
 javax.swing.JDialog createJDialog(java.awt.Window owner)
          Creates a non-modal dialog.
 javax.swing.JLabel createJLabel()
          Creates a label.
 javax.swing.JSplitPane createJSplitPane()
          Creates a split pane.
 javax.swing.JTabbedPane createJTabbedPane()
          Creates a tabbed pane.
 Header createMaximizeHeader(Dockable dockable, int position)
          Creates the header for the specified dockable in a maximize panel.
 SelectableHeader createMinimizeHeader(Dockable dockable, int position)
          Creates the header for the specified dockable in a minimize panel.
 javax.swing.JPopupMenu createPopupMenu(Dockable selectedDockable, CompositeDockable compositeDockable)
          Creates a popup menu for the selected dockable and the other dockables in the dock of the selected dockable.
 DockHeader createSingleDockHeader(LeafDock dock, int position)
          Creates the header for the specified dock with one dockable.
 SelectableHeader createTabDockHeader(Dockable dockable, int position)
          Creates the header for the given dockable that will be displayed in a tab of a dock.
 java.awt.Window createWindow(java.awt.Window owner)
          Creates a window.
 

Method Detail

createJTabbedPane

javax.swing.JTabbedPane createJTabbedPane()
Creates a tabbed pane.

Returns:
The created tabbed pane.

createJSplitPane

javax.swing.JSplitPane createJSplitPane()
Creates a split pane.

Returns:
The created split pane.

createJDialog

javax.swing.JDialog createJDialog(java.awt.Window owner)
Creates a non-modal dialog.

Parameters:
owner - The owner of the dialog.
Returns:
The created non-modal dialog.

createWindow

java.awt.Window createWindow(java.awt.Window owner)
Creates a window.

Parameters:
owner - The owner of the window.
Returns:
The created window.

createFloatingBorder

javax.swing.border.Border createFloatingBorder()
Creates a border for a floating window.

Returns:
The created border.

createJLabel

javax.swing.JLabel createJLabel()
Creates a label.

Returns:
The created label.

createIconButton

java.awt.Component createIconButton(javax.swing.Action action)
Creates a small icon component to perform the given action.

Parameters:
action - The action that will be performed when the button is clicked.
Returns:
The created small icon component to perform the given action.

createTabDockHeader

SelectableHeader createTabDockHeader(Dockable dockable,
                                     int position)
Creates the header for the given dockable that will be displayed in a tab of a dock.

Parameters:
dockable - The dockable that will be represented in the tab.
position - Possible values are constants defined by the class Position: Position.LEFT, Position.RIGHT, Position.TOP or Position.BOTTOM.
Returns:
A header for the dockable in the tab.

createCompositeTabDockHeader

SelectableHeader createCompositeTabDockHeader(Dock childDock,
                                              int position)
Creates the header for the given dock that will be displayed in a tab of a dock.

Parameters:
childDock - The child dock that will be represented in the tab.
position - Possible values are constants defined by the class Position: Position.LEFT, Position.RIGHT, Position.TOP or Position.BOTTOM.
Returns:
A header for the dockable in the tab.

createSingleDockHeader

DockHeader createSingleDockHeader(LeafDock dock,
                                  int position)
Creates the header for the specified dock with one dockable.

Parameters:
dock - The dock of the header.
position - Possible values are constants defined by the class Position: Position.LEFT, Position.RIGHT, Position.TOP or Position.BOTTOM.
Returns:
A header for a dock with one dockable.

createDockHeader

DockHeader createDockHeader(LeafDock dock,
                            int position)

Creates the header for the specified dock with multiple dockables.

Parameters:
dock - The dock of the header.
position - The position of this header. Possible values are constants defined by the class Position, i.e.:
Returns:
The header for a dock with multiple dockables.

createMaximizeHeader

Header createMaximizeHeader(Dockable dockable,
                            int position)
Creates the header for the specified dockable in a maximize panel.

Parameters:
dockable - The dockable of the header.
position - The position of this header. Possible values are constants defined by the class Position, i.e.:
Returns:
A header for a dockable.

createMinimizeHeader

SelectableHeader createMinimizeHeader(Dockable dockable,
                                      int position)
Creates the header for the specified dockable in a minimize panel.

Parameters:
dockable - The dockable of the header.
position - The position of this header. Possible values are constants defined by the class Position, i.e.:
Returns:
A header for a dockable.

createExternalizer

ExternalizeDock createExternalizer()
Creates a LeafDock in which a dockable can be externalized.

Returns:
A dock in which a dockable can be externalized.

createPopupMenu

javax.swing.JPopupMenu createPopupMenu(Dockable selectedDockable,
                                       CompositeDockable compositeDockable)
Creates a popup menu for the selected dockable and the other dockables in the dock of the selected dockable. If the selected dockable is null, a popup menu for the composite dockable is created.

Parameters:
selectedDockable - The selected dockable.
compositeDockable - The dockables in the selected dock.
Returns:
A popup menu for the selected dockable and the other dockables in the dock.