|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
bibliothek.gui.dock.DockableDisplayer
public class DockableDisplayer
A panel which shows one Dockable
and one DockTitle
. The location
of the DockTitle
is always at one of the four borders (left,
right, top, bottom). The title may be null
, in this case only
the Dockable is shown.
Clients using a displayer should try to set the controller
and the station
property.
Subclasses may override getComponent(Dockable)
, addDockable(Component)
,
removeDockable(Component)
, getComponent(DockTitle)
, addTitle(Component)
and/or removeTitle(Component)
if they want to introduce a completely
new layout needing more Containers
.
DisplayerCollection
,
DisplayerFactory
,
Serialized FormNested Class Summary | |
---|---|
static class |
DockableDisplayer.Location
The four possible locations of the title |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private DockController |
controller
the controller for which this displayer might be used |
private Dockable |
dockable
The content of this displayer |
private DockableDisplayer.Location |
location
the location of the title |
private DockStation |
station
the station on which this displayer might be shown |
private DockTitle |
title
The title on this displayer |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DockableDisplayer()
Creates a new displayer |
|
DockableDisplayer(Dockable dockable,
DockTitle title)
Creates a new displayer, sets the title and the content. |
|
DockableDisplayer(Dockable dockable,
DockTitle title,
DockableDisplayer.Location location)
Creates a new displayer, sets the title, its location and the content. |
Method Summary | |
---|---|
protected void |
addDockable(java.awt.Component component)
Inserts a component representing the current dockable
into the layout. |
protected void |
addTitle(java.awt.Component component)
Inserts a component representing the current title
into the layout. |
void |
doLayout()
|
protected java.awt.Component |
getComponent(Dockable dockable)
Gets the Component which should be used to layout the current Dockable. |
protected java.awt.Component |
getComponent(DockTitle title)
Gets the Component which should be used to layout the current DockTitle. |
DockController |
getController()
Gets the controller for which this displayer is used. |
Dockable |
getDockable()
Gets the Dockable which is shown on this displayer. |
java.awt.Dimension |
getMinimumSize()
|
DockStation |
getStation()
Gets the station on which this displayer might be shown. |
DockTitle |
getTitle()
Gets the title which is shown on this displayer. |
DockableDisplayer.Location |
getTitleLocation()
Gest the location of the title in respect to the Dockable. |
protected DockTitle.Orientation |
orientation(DockableDisplayer.Location location)
Determines the orientation of a DockTitle according to its
location on this displayer. |
protected void |
removeDockable(java.awt.Component component)
Removes the Component which represents the current dockable . |
protected void |
removeTitle(java.awt.Component component)
Removes the Component which represents the current title . |
void |
setController(DockController controller)
Sets the controller for which this displayer is used. |
void |
setDockable(Dockable dockable)
Sets the Dockable which should be shown on this displayer. |
void |
setStation(DockStation station)
Sets the station on which this displayer is shown. |
void |
setTitle(DockTitle title)
Sets the title of this displayer. |
void |
setTitleLocation(DockableDisplayer.Location location)
Sets the location of the title in respect to the Dockable. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Dockable dockable
private DockTitle title
private DockableDisplayer.Location location
private DockStation station
private DockController controller
Constructor Detail |
---|
public DockableDisplayer()
public DockableDisplayer(Dockable dockable, DockTitle title)
dockable
- the content, may be null
title
- the title, may be null
public DockableDisplayer(Dockable dockable, DockTitle title, DockableDisplayer.Location location)
dockable
- the content, may be null
title
- the title of dockable
, can be null
location
- the location of the title, can be null
Method Detail |
---|
public void setController(DockController controller)
controller
- the controller, can be null
public DockController getController()
null
public void setStation(DockStation station)
station
- the station or null
public DockStation getStation()
null
public Dockable getDockable()
null
public void setDockable(Dockable dockable)
null
means that no Dockable should be visible at all.
dockable
- the child, can be null
public DockableDisplayer.Location getTitleLocation()
public void setTitleLocation(DockableDisplayer.Location location)
location
- the location, a value of null
is transformed
into the default-valueprotected DockTitle.Orientation orientation(DockableDisplayer.Location location)
DockTitle
according to its
location on this displayer.
location
- the location on this displayer
public DockTitle getTitle()
null
public void setTitle(DockTitle title)
null
,
no title is visible. The displayer will change the
orientation
of the title.
title
- the title or null
protected void addDockable(java.awt.Component component)
dockable
into the layout. This method is never called twice unless
removeDockable(Component)
is called before. Note that
the name "add" is inspired by the method add
of Container
.
component
- the new Componentprotected void removeDockable(java.awt.Component component)
dockable
.
component
- the componentprotected java.awt.Component getComponent(Dockable dockable)
dockable
- the current Dockable, never null
dockable
protected void addTitle(java.awt.Component component)
title
into the layout. This method is never called twice unless
removeTitle(Component)
is called before. Note that
the name "add" is inspired by the method add
of Container
.
component
- the new Componentprotected void removeTitle(java.awt.Component component)
title
.
component
- the componentprotected java.awt.Component getComponent(DockTitle title)
title
- the current DockTitle, never null
title
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public void doLayout()
doLayout
in class java.awt.Container
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |