com.vlsolutions.swing.docking
public class DockView extends JPanel implements DockDropReceiver, SingleDockableContainer
A Dockview is the component responsible for displaying a single user component inside a DockingPanel.
The DockView contains a DockViewTitleBar, used as a header to display useful information and optional controls (close/maximize/hide/float)
UI : The user component is displayed with decorations provided by a DockViewUI delegate.
Here is an example (VLDocking 1.1 "shadow" style) :

Note : multiple user-components are not displayable by the dockview : the default implementation of TabbedDockableContainer is the DockTabbedPane.
UNKNOWN: 2005/12/09 Lilian Chamontin : added NPE safety check around uninstallDocking as sometimes uninstalling is done twice. 2007/01/08 Lilian Chamontin : delegated the creation of the titlebar to allow easy override.
| Field Summary | |
|---|---|
| protected DockingDesktop | desktop the desktop managing this view |
| protected Dockable | dockable the dockable managed by this view |
| protected Shape | lastDropGeneralPath remember the last drop position to cache the shape used for showing the drop position |
| protected Shape | lastDropShape remember the last drop position to cache the shape used for showing the drop position |
| protected DockViewTitleBar | title |
| Constructor Summary | |
|---|---|
| DockView() Constructs an empty DockView.
| |
| DockView(Dockable dockable) Constructs a new DockView for the given dockable.
| |
| DockView(Dockable dockable, boolean showTitle) Constructs a new DockView for the given dockable.
| |
| Method Summary | |
|---|---|
| protected GeneralPath | buildPathForTab(Rectangle bounds) Create a path used to display the drag shape of a tab container |
| Dockable | getDockable() Returns the contained component
{@inheritDoc }
|
| DockViewTitleBar | getTitleBar() Returns (or creates) the title bar of this dockview |
| String | getUIClassID() |
| void | installDocking(DockingDesktop desktop) |
| void | processDockableDrag(DockDragEvent event) {@inheritDoc }. |
| void | processDockableDrop(DockDropEvent event) {@inheritDoc }
Please note that a drag into a DockView can also lead to create a DockTabbedPane. |
| protected void | scanDrop(DockEvent event, boolean drop) |
| void | setDockable(Dockable dockable) Adds the dockable's component to this DockView.
|
| String | toString() |
| void | uninstallDocking(DockingDesktop desktop) |
A setDockable call is requiered for this constructor to be usefull.
Parameters: dockable the dockable to show
Parameters: dockable the dockable to show
Since: 2.0
Please note that a drag into a DockView can also lead to create a DockTabbedPane.
Parameters: dockable the user dockable