public abstract class AbstractTab extends AbstractTabPaneComponent implements Tab
Tab based on a real Component. Clients
should call bind(), unbind() and setController(DockController) to
fully utilize this class.| Constructor and Description |
|---|
AbstractTab(TabPane parent,
Dockable dockable)
Creates a new abstract tab.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Connects this tab with its parent and the
DockController. |
Dockable |
getDockable()
Gets the element that is associated with this tab.
|
Dimension |
getMinimumSize(Tab[] tabs)
Gets the minimum size of this tab under the assumption that
this tab is displayed together with
tabs. |
Dimension |
getPreferredSize(Tab[] tabs)
Gets the preferred size of this tab under the assumption that
this tab is displayed together with
tabs. |
protected abstract void |
informFocusChanged(boolean focused)
Called when the focus state of this tab has been changed.
|
protected abstract void |
informSelectionChanged(boolean selected)
Called when the selection state of this tab has been changed.
|
boolean |
isFocused()
Tells whether this tab is focused.
|
boolean |
isSelected()
Tells whether this tab is selected.
|
void |
setController(DockController controller)
Sets the controller in whose realm this
AbstractTab works. |
void |
unbind()
Disconnects this tab from its parent and from the
DockController. |
getBounds, getComponent, getMaximumSize, getMinimumSize, getOrientation, getOverlap, getPreferredSize, getTabParent, setBounds, setOrientationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBounds, getMaximumSize, getMinimumSize, getOverlap, getPreferredSize, getTabParent, getZOrder, isPaneVisible, setBounds, setOrientation, setPaneVisible, setZOrderpublic Dockable getDockable()
TabgetDockable in interface Tabpublic Dimension getMinimumSize(Tab[] tabs)
Tabtabs.getMinimumSize in interface Tabtabs - the displayed tabs, exactly one entry is this
and no entry is nullpublic Dimension getPreferredSize(Tab[] tabs)
Tabtabs.getPreferredSize in interface Tabtabs - the displayed tabs, exactly one entry is this
and no entry is nullpublic void bind()
DockController.IllegalStateException - if this method has already been invokedpublic void unbind()
DockController.IllegalStateException - if this method has already been invoked.public boolean isSelected()
TabPaneListener
and might not be the correct value while a selection changes.protected abstract void informSelectionChanged(boolean selected)
selected - the new selection statepublic boolean isFocused()
Dockable is focused.
This property is updated by a DockableFocusListener, hence it
might not be accurate while the focus changes.protected abstract void informFocusChanged(boolean focused)
focused - the new focus statepublic void setController(DockController controller)
AbstractTab works.controller - the controllerCopyright © 2017 Docking Frames. All rights reserved.