com.vlsolutions.swing.docking

Class DockTabbedPane

public class DockTabbedPane extends JTabbedPane implements DockDropReceiver, DockableDragSource, TabbedDockableContainer

A JTabbedPane customized for integration with the docking framework.

Defaults :

This tabbed pane is not meant to be used outside of DockingDesktop because of their connected behaviour (drag/drop support, docking constraints, etc).

As of version 2.0 of the framework, the tabbed pane displays a close icon (other functions are available with a right click menu).

See Also:

UNKNOWN: 2005/11/01 Lilian Chamontin : enhanced shape painting (tries to avoid going outside the tab bounds) 2005/11/10 Lilian Chamontin : added support for DnD multiple tabs at once. 2005/12/08 Lilian Chamontin : removed a portion of code as its been refactored in BorderSplitter

Field Summary
protected DockingDesktopdesktop
protected JPopupMenupopup
The pop-up menu used to provide fast "close" shortcuts (close all, close others)
protected intpopupTab
the tab currently associated with the pop-up
protected intpreviousSelectedDockable
The tab that was selected before the current one
Constructor Summary
DockTabbedPane()
Method Summary
voidaddDockable(Dockable dockable, int tab)
Adds a new tab respecting the presentation and constraints of the component.
protected GeneralPathbuildPathAfterLastTab(Rectangle vbounds, Rectangle afterlast)
Creates a general path suitable for showing tab insertion after the last tab
protected GeneralPathbuildPathForCurrentTab(Rectangle vbounds, Rectangle tabbounds)
Creates a general path suitable for showing tab insertion before the currentTab
DockablegetDockable()
{@inheritDoc}
DockablegetDockableAt(int index)
{@inheritDoc}
ContainergetDockableContainer()
intgetDockableIndex(DockKey key)
Returns the tab index of the dockable corresponding to the given key
DockablegetSelectedDockable()
{@inheritDoc}
intindexOfDockable(Dockable dockable)
{@inheritDoc}
voidinstallDocking(DockingDesktop desktop)
{@inheritDoc}
voidprocessDockableDrag(DockDragEvent e)
voidprocessDockableDrop(DockDropEvent event)
{@inheritDoc}
voidremoveDockable(Dockable dockable)
{@inheritDoc}
voidremoveDockable(int index)
{@inheritDoc}
voidsetSelectedDockable(Dockable dockable)
{@inheritDoc}
booleanstartDragComponent(Point p)
{@inheritDoc}
StringtoString()
{@inheritDoc}
voiduninstallDocking(DockingDesktop desktop)
{@inheritDoc}

Field Detail

desktop

protected DockingDesktop desktop

popup

protected JPopupMenu popup
The pop-up menu used to provide fast "close" shortcuts (close all, close others)

popupTab

protected int popupTab
the tab currently associated with the pop-up

previousSelectedDockable

protected int previousSelectedDockable
The tab that was selected before the current one

Constructor Detail

DockTabbedPane

public DockTabbedPane()

Method Detail

addDockable

public void addDockable(Dockable dockable, int tab)
Adds a new tab respecting the presentation and constraints of the component. {@inheritDoc}

buildPathAfterLastTab

protected GeneralPath buildPathAfterLastTab(Rectangle vbounds, Rectangle afterlast)
Creates a general path suitable for showing tab insertion after the last tab

buildPathForCurrentTab

protected GeneralPath buildPathForCurrentTab(Rectangle vbounds, Rectangle tabbounds)
Creates a general path suitable for showing tab insertion before the currentTab

getDockable

public Dockable getDockable()
{@inheritDoc}

getDockableAt

public Dockable getDockableAt(int index)
{@inheritDoc}

getDockableContainer

public Container getDockableContainer()

getDockableIndex

public int getDockableIndex(DockKey key)
Returns the tab index of the dockable corresponding to the given key

getSelectedDockable

public Dockable getSelectedDockable()
{@inheritDoc}

indexOfDockable

public int indexOfDockable(Dockable dockable)
{@inheritDoc}

installDocking

public void installDocking(DockingDesktop desktop)
{@inheritDoc}

processDockableDrag

public void processDockableDrag(DockDragEvent e)

processDockableDrop

public void processDockableDrop(DockDropEvent event)
{@inheritDoc}

removeDockable

public void removeDockable(Dockable dockable)
{@inheritDoc}

removeDockable

public void removeDockable(int index)
{@inheritDoc}

setSelectedDockable

public void setSelectedDockable(Dockable dockable)
{@inheritDoc}

startDragComponent

public boolean startDragComponent(Point p)
{@inheritDoc}

toString

public String toString()
{@inheritDoc}

uninstallDocking

public void uninstallDocking(DockingDesktop desktop)
{@inheritDoc}
© Copyright 2004-2005 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications