net.infonode.docking

Class FloatingWindow

public class FloatingWindow extends DockingWindow

A window that is floating on-top of the root window and containing another docking window.

A window can be maximized inside the floating window just as in a root window.

After a floating window has been closed it shouldn't be reused again.

Floating window inherits its component properties and shaped panel properties from the root window's window area. It is possible to set specific component and shaped panel properties for a floating window in the FloatingWindowProperties, see getFloatingWindowProperties.

A floating window is created by calling the RootWindow method or indirectly created by calling the undock method.

It's possible to add a menu bar to the floating window. Just call:

   myFloatingWindow.getRootPane().setJMenuBar(myMenuBar);
 

The floating window is placed as the BorderLayout.CENTER component of the content pane of the root pane. You can add additional components in the other BorderLayout positions. Example, add a status label at the bottom:

   myFloatingWindow.getRootPane().getContentPane().add(myStstusLabel, BroderLayout.SOUTH);
 

Since: IDW 1.4.0

Version: $Revision: 1.51 $

Author: $Author: jesper $

Method Summary
protected DropActionacceptInteriorDrop(Point p, DockingWindow window)
protected booleanacceptsSplitWith(DockingWindow window)
protected voidafterWindowRemoved(DockingWindow window)
voidclose()
protected PropertyMapcreatePropertyObject()
protected DropActiondoAcceptDrop(Point p, DockingWindow window)
protected voiddoRemoveWindow(DockingWindow window)
protected voiddoReplace(DockingWindow oldWindow, DockingWindow newWindow)
protected voidfireTitleChanged()
DockingWindowgetChildWindow(int index)
intgetChildWindowCount()
FloatingWindowPropertiesgetFloatingWindowProperties()

Returns the property values for this floating window.

IcongetIcon()
DockingWindowgetMaximizedWindow()
Returns the maximized window in this floating window.
protected PropertyMapgetPropertyObject()
DockingWindowgetWindow()
Returns the top level docking window inside this floating window.
DockingWindowPropertiesgetWindowProperties()

Returns the properties for this window.

booleanisDockable()
booleanisMaximizable()
booleanisMinimizable()
booleanisRestorable()
booleanisUndockable()
booleanisUndocked()
voidminimize()
Floating window cannot be minimized
voidminimize(Direction direction)
Floating window cannot be minimized
protected DockingWindowread(ObjectInputStream in, ReadContext context, ViewReader viewReader)
voidsetMaximizedWindow(DockingWindow window)
Sets the maximized window in this floating window.
voidsetWindow(DockingWindow newWindow)
Sets the top level docking window inside this floating window.
protected voidshowChildWindow(DockingWindow window)
protected voidupdate()
protected voidwrite(ObjectOutputStream out, WriteContext context, ViewWriter viewWriter)

Method Detail

acceptInteriorDrop

protected DropAction acceptInteriorDrop(Point p, DockingWindow window)

acceptsSplitWith

protected boolean acceptsSplitWith(DockingWindow window)

afterWindowRemoved

protected void afterWindowRemoved(DockingWindow window)

close

public void close()

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)

fireTitleChanged

protected void fireTitleChanged()

getChildWindow

public DockingWindow getChildWindow(int index)

getChildWindowCount

public int getChildWindowCount()

getFloatingWindowProperties

public FloatingWindowProperties getFloatingWindowProperties()

Returns the property values for this floating window.

Floating window inherits its component properties and shaped panel properties from the root window's window area. It is possible to set specific component and shaped panel properties for a floating window in the FloatingWindowProperties.

Returns: the property values for this floating window

getIcon

public Icon getIcon()

getMaximizedWindow

public DockingWindow getMaximizedWindow()
Returns the maximized window in this floating window.

Returns: maximized window or null if no window is maximized

getPropertyObject

protected PropertyMap getPropertyObject()

getWindow

public DockingWindow getWindow()
Returns the top level docking window inside this floating window.

Returns: the top level docking window inside this floating window

getWindowProperties

public DockingWindowProperties getWindowProperties()

Returns the properties for this window.

Note: A floating window only uses the close enabled and title provider properties of the docking window properties.

Returns: the properties for this window

isDockable

public boolean isDockable()

isMaximizable

public boolean isMaximizable()

isMinimizable

public boolean isMinimizable()

isRestorable

public boolean isRestorable()

isUndockable

public boolean isUndockable()

isUndocked

public boolean isUndocked()

minimize

public void minimize()
Floating window cannot be minimized

minimize

public void minimize(Direction direction)
Floating window cannot be minimized

Parameters: direction

read

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

setMaximizedWindow

public void setMaximizedWindow(DockingWindow window)
Sets the maximized window in this floating window.

Parameters: window the window to maximize, must be a member of the window tree inside this floating window

setWindow

public void setWindow(DockingWindow newWindow)
Sets the top level docking window inside this floating window.

Parameters: newWindow the top level docking window, null for no window i.e. empty floating window

showChildWindow

protected void showChildWindow(DockingWindow window)

update

protected void update()

write

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