|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.dockable.AbstractDockable
bibliothek.gui.dock.DefaultDockable
public class DefaultDockable
A Dockable which consists only of one Component called
"content pane". It's possible to add or remove components from the
content pane at any time.
| Constructor Summary | |
|---|---|
DefaultDockable()
Constructs a new DefaultDockable |
|
DefaultDockable(Component component)
Constructs a new DefaultDockable and places one component onto the content pane. |
|
DefaultDockable(Component component,
Icon icon)
Constructs a new DefaultDockable, sets an icon and places one component. |
|
DefaultDockable(Component component,
String title)
Constructs a new DefaultDockable, sets the title and places one component. |
|
DefaultDockable(Component component,
String title,
Icon icon)
Constructs a new DefaultDockable, sets the icon and the title, and places a component. |
|
DefaultDockable(Component component,
String title,
Icon icon,
IconHandling handling)
Constructs a new DefaultDockable, sets the icon and the title, and places a component. |
|
DefaultDockable(Icon icon)
Constructs a new DefaultDockable and sets the icon. |
|
DefaultDockable(String title)
Constructs a new DefaultDockable and sets the title. |
|
| Method Summary | |
|---|---|
void |
add(Component component)
Adds component to the content pane. |
void |
add(Component component,
Object constraints)
Adds component to the content pane. |
DockStation |
asDockStation()
Returns this if this is an instance of
DockStation. |
protected DockComponentRootHandler |
createRootHandler()
Creates the DockComponentRootHandler which configures the Components of this dockable. |
protected DockIcon |
createTitleIcon()
Creates the DockIcon which represents this Dockable or this DockStation. |
Component |
getClientComponent()
Gets the Component which was given to this DefaultDockable through the constructor. |
Component |
getComponent()
Gets the Component which represents this Dockable. |
Component |
getComponent(int index)
Gets the index'th child of this Dockable, this is equivalent of calling
getContentPane().getComponent( index ). |
int |
getComponentCount()
Gets the number of Components on this dockable, this is equivalent of calling
getContentPane().getComponentCount(). |
Container |
getContentPane()
Gets a panel for children of this Dockable. |
String |
getFactoryID()
Gets the unique name of the DockFactory which can read
and write elements of this type. |
void |
remove(Component component)
Removes component from the content pane. |
void |
setController(DockController controller)
Sets the controller in whose realm this Dockable is. |
void |
setFactoryID(String factoryId)
Sets the id for the DockFactory which will be used to store
and load this dockable. |
void |
setLayout(LayoutManager layout)
Sets the layout of the content pane. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultDockable()
public DefaultDockable(Icon icon)
icon - the icon, to be shown at various placespublic DefaultDockable(String title)
title - the title, to be shown at various placespublic DefaultDockable(Component component)
component - the only child of the content pane
public DefaultDockable(Component component,
Icon icon)
component - the only child of the content paneicon - the icon, to be shown at various places
public DefaultDockable(Component component,
String title)
component - the only child of the content panetitle - the title, to be shown at various places
public DefaultDockable(Component component,
String title,
Icon icon)
component - the only child of the content panetitle - the title, to be shown at various placesicon - the icon, to be shown at various places
public DefaultDockable(Component component,
String title,
Icon icon,
IconHandling handling)
component - the only child of the content panetitle - the title, to be shown at various placesicon - the icon, to be shown at various placeshandling - how to understand the icon parameter| Method Detail |
|---|
protected DockIcon createTitleIcon()
AbstractDockableDockIcon which represents this Dockable or this DockStation. The
icon must call AbstractDockable.fireTitleIconChanged(Icon, Icon) if the icon changes.
createTitleIcon in class AbstractDockableprotected DockComponentRootHandler createRootHandler()
AbstractDockableDockComponentRootHandler which configures the Components of this dockable.
createRootHandler in class AbstractDockablenullpublic String getFactoryID()
DockElementDockFactory which can read
and write elements of this type.
public void setFactoryID(String factoryId)
DockFactory which will be used to store
and load this dockable.
factoryId - the id of the factorypublic Component getComponent()
DockableComponent which represents this Dockable. Note that
the component should be a focus cycle root
public DockStation asDockStation()
DockElementthis if this is an instance of
DockStation. Otherwise null is returned.
this or null. Must not return null if DockElement.asDockable()
already returns nullpublic int getComponentCount()
Components on this dockable, this is equivalent of calling
getContentPane().getComponentCount().
getContentPane(),
Container.getComponentCount()public Component getComponent(int index)
Dockable, this is equivalent of calling
getContentPane().getComponent( index ).
index - the index of the child
getContentPane(),
Container.getComponent(int)public Component getClientComponent()
Component which was given to this DefaultDockable through the constructor. If the client
ever removes and the client component from the content-pane, and then adds the component
again, then the result of this method gets unspecified.
null if that component
was removed from the content-panepublic Container getContentPane()
public void add(Component component)
component to the content pane.
component - the new child
public void add(Component component,
Object constraints)
component to the content pane.
component - the new childconstraints - information for th LayoutManagerpublic void remove(Component component)
component from the content pane.
component - the child to removepublic void setLayout(LayoutManager layout)
FlowLayout, except the constructor has added a component to the
layout. In that case, the layout is a GridLayout.
layout - the new layout of the content panepublic void setController(DockController controller)
Dockablenull
means that this Dockable is not managed by a controller.DockHierarchyListeners about the change.DockHierarchyObserver, invoke
DockHierarchyObserver.controllerChanged(DockController)
setController in interface DockablesetController in class AbstractDockablecontroller - the owner, may be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||