net.infonode.docking

Class SplitWindow

public class SplitWindow extends DockingWindow

A window with a split pane that contains two child windows.

Version: $Revision: 1.50 $

Author: $Author: jesper $

Constructor Summary
SplitWindow(boolean horizontal)
Creates a split window.
SplitWindow(boolean horizontal, DockingWindow leftWindow, DockingWindow rightWindow)
Creates a split window with with the given child windows.
SplitWindow(boolean horizontal, float dividerLocation, DockingWindow leftWindow, DockingWindow rightWindow)
Creates a split window with with the given child windows.
protected SplitWindow(boolean horizontal, float dividerLocation, DockingWindow leftWindow, DockingWindow rightWindow, SplitWindowItem windowItem)
Method Summary
protected PropertyMapcreatePropertyObject()
protected DropActiondoAcceptDrop(Point p, DockingWindow window)
protected voiddoRemoveWindow(DockingWindow window)
protected voiddoReplace(DockingWindow oldWindow, DockingWindow newWindow)
protected intgetChildEdgeDepth(DockingWindow window, Direction dir)
DockingWindowgetChildWindow(int index)
intgetChildWindowCount()
floatgetDividerLocation()
Returns the divider location as a fraction of this split window's size.
IcongetIcon()
DockingWindowgetLeftWindow()
Returns the left/upper child window.
protected PropertyMapgetPropertyObject()
DockingWindowgetRightWindow()
Returns the right/lower child window.
SplitWindowPropertiesgetSplitWindowProperties()
Returns the property values for this split window.
booleanisHorizontal()
Returns true if this SplitWindow is a horizontal split, otherwise it's vertical.
protected DockingWindownewRead(ObjectInputStream in, ReadContext context, ViewReader viewReader)
protected DockingWindowoldRead(ObjectInputStream in, ReadContext context)
protected voidoptimizeWindowLayout()
protected voidrootChanged(RootWindow oldRoot, RootWindow newRoot)
voidsetDividerLocation(float dividerLocation)
Sets the divider location as a fraction of this split window's size.
voidsetHorizontal(boolean horizontal)
Sets the split to horizontal or vertical.
voidsetWindows(DockingWindow leftWindow, DockingWindow rightWindow)
Sets the child windows of this split window.
protected voidupdate()
protected voidupdateWindowItem(RootWindow rootWindow)
protected voidwrite(ObjectOutputStream out, WriteContext context, ViewWriter viewWriter)

Constructor Detail

SplitWindow

public SplitWindow(boolean horizontal)
Creates a split window.

Parameters: horizontal true if the split is horizontal

SplitWindow

public SplitWindow(boolean horizontal, DockingWindow leftWindow, DockingWindow rightWindow)
Creates a split window with with the given child windows.

Parameters: horizontal true if the split is horizontal leftWindow the left/upper window rightWindow the right/lower window

SplitWindow

public SplitWindow(boolean horizontal, float dividerLocation, DockingWindow leftWindow, DockingWindow rightWindow)
Creates a split window with with the given child windows.

Parameters: horizontal true if the split is horizontal dividerLocation the divider location, 0 - 1 leftWindow the left/upper window rightWindow the right/lower window

SplitWindow

protected SplitWindow(boolean horizontal, float dividerLocation, DockingWindow leftWindow, DockingWindow rightWindow, SplitWindowItem windowItem)

Method Detail

createPropertyObject

protected PropertyMap createPropertyObject()

doAcceptDrop

protected DropAction doAcceptDrop(Point p, DockingWindow window)

doRemoveWindow

protected void doRemoveWindow(DockingWindow window)

doReplace

protected void doReplace(DockingWindow oldWindow, DockingWindow newWindow)

getChildEdgeDepth

protected int getChildEdgeDepth(DockingWindow window, Direction dir)

getChildWindow

public DockingWindow getChildWindow(int index)

getChildWindowCount

public int getChildWindowCount()

getDividerLocation

public float getDividerLocation()
Returns the divider location as a fraction of this split window's size.

Returns: the divider location as a fraction of this split window's size

getIcon

public Icon getIcon()

getLeftWindow

public DockingWindow getLeftWindow()
Returns the left/upper child window.

Returns: the left/upper child window

getPropertyObject

protected PropertyMap getPropertyObject()

getRightWindow

public DockingWindow getRightWindow()
Returns the right/lower child window.

Returns: the right/lower child window

getSplitWindowProperties

public SplitWindowProperties getSplitWindowProperties()
Returns the property values for this split window.

Returns: the property values for this split window

isHorizontal

public boolean isHorizontal()
Returns true if this SplitWindow is a horizontal split, otherwise it's vertical.

Returns: true if this SplitWindow is a horizontal split, otherwise it's vertical

Since: IDW 1.2.0

newRead

protected DockingWindow newRead(ObjectInputStream in, ReadContext context, ViewReader viewReader)

oldRead

protected DockingWindow oldRead(ObjectInputStream in, ReadContext context)

optimizeWindowLayout

protected void optimizeWindowLayout()

rootChanged

protected void rootChanged(RootWindow oldRoot, RootWindow newRoot)

setDividerLocation

public void setDividerLocation(float dividerLocation)
Sets the divider location as a fraction of this split window's size.

Parameters: dividerLocation the divider location as a fraction of this split window's size

setHorizontal

public void setHorizontal(boolean horizontal)
Sets the split to horizontal or vertical.

Parameters: horizontal if true the split is set to horizontal, otherwise vertical

Since: IDW 1.2.0

setWindows

public void setWindows(DockingWindow leftWindow, DockingWindow rightWindow)
Sets the child windows of this split window.

Parameters: leftWindow the left/upper child window rightWindow the right/lower child window

update

protected void update()

updateWindowItem

protected void updateWindowItem(RootWindow rootWindow)

write

protected void write(ObjectOutputStream out, WriteContext context, ViewWriter viewWriter)