com.vlsolutions.swing.docking

Class SplitContainer

Implemented Interfaces:
DockDropReceiver

public class SplitContainer
extends JSplitPane
implements DockDropReceiver

A Specialized JSplitPane which accepts drag and drop of DockableContainer.

The split container should be used only by the DockingDesktop.

It is a SplitPane with bug workarounds and a custom UI (in fact : no UI painting at all, by default).

Constructor Summary

SplitContainer()
Constructs a vertically splitted SplitContainer
SplitContainer(int orientation)
Constructs a SplitContainer with the given JSplitPane orientation.

Method Summary

String
getTabName()
Returns a suitable name for when this container is the main child of a Tab (TabbedDockableContainer)
String
getUIClassID()
Overriden for custom UI delegation
void
paint(Graphics g)
overriden for a bug workaround reason
void
processDockableDrag(DockDragEvent event)
void
processDockableDrop(DockDropEvent event)
void
resetToPreferredSizes()
Resest recursively the left and right components to their preferred size if possible.
void
setDividerLocation(double proportionalLocation)
Overriden for a bug workaround
void
setDividerLocation(int location)
void
split(Component newComp, Component child, DockingConstants.Split position)
Replaces the child component by a sub-split pane.
String
toString()
Returns a readable String representing this SplitContainer

Constructor Details

SplitContainer

public SplitContainer()
Constructs a vertically splitted SplitContainer

SplitContainer

public SplitContainer(int orientation)
Constructs a SplitContainer with the given JSplitPane orientation.

Method Details

getTabName

public String getTabName()
Returns a suitable name for when this container is the main child of a Tab (TabbedDockableContainer)

getUIClassID

public String getUIClassID()
Overriden for custom UI delegation

paint

public void paint(Graphics g)
overriden for a bug workaround reason

processDockableDrag

public void processDockableDrag(DockDragEvent event)
Specified by:
processDockableDrag in interface DockDropReceiver

processDockableDrop

public void processDockableDrop(DockDropEvent event)
Specified by:
processDockableDrop in interface DockDropReceiver

resetToPreferredSizes

public void resetToPreferredSizes()
Resest recursively the left and right components to their preferred size if possible. (same contract as JSplitPane's).

If contained components are SplitContainers, their are also reset to their preferredSize.


setDividerLocation

public void setDividerLocation(double proportionalLocation)
Overriden for a bug workaround

setDividerLocation

public void setDividerLocation(int location)

split

public void split(Component newComp,
                  Component child,
                  DockingConstants.Split position)
Replaces the child component by a sub-split pane.
Parameters:
newComp - the new component to add
child - one or the two components of this split pane
position - where to put comp / child (i.e if SPLIT_TOP, a vertical splitpane will be created and comp will be on top of it (and child at bottom).

toString

public String toString()
Returns a readable String representing this SplitContainer

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