net.infonode.docking

Class View

public class View extends DockingWindow

A view is a docking window containing a component.

A view can also contain a title bar that can be shown on either side of the view component. The title bar is made visible by setting the visible property in the ViewTitleBarProperties in the ViewProperties for this view. The title bar automatically inherits the view's title and icon but it's possible to specify a specific title and icon for the title bar in the ViewTitleBarProperties in the ViewProperties for this view.

Version: $Revision: 1.66 $

Author: $Author: jesper $

See Also: ViewProperties ViewTitleBarProperties

Constructor Summary
View(String title, Icon icon, Component component)
Constructor.
Method Summary
protected DropActionacceptInteriorDrop(Point p, DockingWindow window)
protected PropertyMapcreatePropertyObject()
protected DropActiondoAcceptDrop(Point p, DockingWindow window)
protected voiddoRemoveWindow(DockingWindow window)
protected voiddoReplace(DockingWindow oldWindow, DockingWindow newWindow)
DockingWindowgetChildWindow(int index)
intgetChildWindowCount()
ComponentgetComponent()
Gets the component inside the view.
ListgetCustomTabComponents()

Returns a list containing the custom window tab components.

ListgetCustomTitleBarComponents()

Returns a list containing the custom view title bar components.

IcongetIcon()
protected PropertyMapgetPropertyObject()
ViewPropertiesgetViewProperties()
Returns the property values for this view.
booleanisFocusCycleRoot()
protected booleanneedsTitleWindow()
voidrestoreFocus()
Restores focus to the last focused child component or, if no child component has had focus, the first focusable component inside the view.
protected voidrootChanged(RootWindow oldRoot, RootWindow newRoot)
voidsetComponent(Component component)
Sets the component inside the view.
protected voidsetFocused(boolean focused)
StringtoString()
protected voidupdate()
protected voidupdateButtonVisibility()
protected voidwrite(ObjectOutputStream out, WriteContext context)
protected voidwrite(ObjectOutputStream out, WriteContext context, ViewWriter viewWriter)

Constructor Detail

View

public View(String title, Icon icon, Component component)
Constructor.

Parameters: title the title of the view icon the icon for the view component the component to place inside the view

Method Detail

acceptInteriorDrop

protected DropAction acceptInteriorDrop(Point p, DockingWindow window)

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)

getChildWindow

public DockingWindow getChildWindow(int index)

getChildWindowCount

public int getChildWindowCount()

getComponent

public Component getComponent()
Gets the component inside the view.

Returns: the component inside the view

Since: IDW 1.1.0

getCustomTabComponents

public List getCustomTabComponents()

Returns a list containing the custom window tab components. Changes to the list will be propagated to the tab.

The custom tab components will be shown after the window title when the window tab is highlighted. The components are shown in the same order as they appear in the list. The custom tab components container layout is rotated with the tab direction.

Returns: a list containing the custom tab components, list elements are of type JComponent

Since: IDW 1.3.0

getCustomTitleBarComponents

public List getCustomTitleBarComponents()

Returns a list containing the custom view title bar components. Changes to the list will be propagated to the title bar.

The custom title bar components will be shown after the view title in the title bar but before the close, minimize and restore buttons. The components are shown in the same order as they appear in the list. The custom title bar components container layout is rotated with the title bar direction.

Note: The components are only shon if the title bar is visible, see ViewTitleBarProperties.

Returns: a list containing the custom title bar components, list elements are of type JComponent

Since: IDW 1.4.0

getIcon

public Icon getIcon()

getPropertyObject

protected PropertyMap getPropertyObject()

getViewProperties

public ViewProperties getViewProperties()
Returns the property values for this view.

Returns: the property values for this view

isFocusCycleRoot

public boolean isFocusCycleRoot()

needsTitleWindow

protected boolean needsTitleWindow()

restoreFocus

public void restoreFocus()
Restores focus to the last focused child component or, if no child component has had focus, the first focusable component inside the view.

Since: IDW 1.1.0

rootChanged

protected void rootChanged(RootWindow oldRoot, RootWindow newRoot)

setComponent

public void setComponent(Component component)
Sets the component inside the view.

Parameters: component the component to place inside the view

Since: IDW 1.1.0

setFocused

protected void setFocused(boolean focused)

toString

public String toString()

update

protected void update()

updateButtonVisibility

protected void updateButtonVisibility()

write

protected void write(ObjectOutputStream out, WriteContext context)

write

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