public interface TabComponent extends DockElementRepresentative
TabComponent paints the content of an EclipseTab. This
component is informed about the change of properties that are often needed
to paint properly.| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Informs this tab that it will be shown soon
|
Component |
getComponent()
Gets the internal representation of this
TabComponent, this
method must always return the same value. |
EclipseTabStateInfo |
getEclipseTabStateInfo()
Gets information about the state of this tab.
|
Dimension |
getMinimumSize(TabComponent[] tabs)
Gets the minimum size of this tab under the assumption that
this tab is displayed together with
tabs. |
Insets |
getOverlap(TabComponent other)
Gets the number of pixels which should be covered at the sides
of this component by other tabs.
|
Dimension |
getPreferredSize(TabComponent[] tabs)
Gets the preferred size of this tab under the assumption that
this tab is displayed together with
tabs. |
void |
setConfiguration(TabConfiguration configuration)
Fine tunes the look and behavior of this tab.
|
void |
setEnabled(boolean enabled)
Enables or disables this component.
|
void |
setFocused(boolean focused)
Tells this component that its
Dockable gained or lost focus. |
void |
setIcon(Icon icon)
Sets the icon that should be painted on this tab.
|
void |
setOrientation(TabPlacement orientation)
Sets the placement of the tabs and as a result the orientation of this
component.
|
void |
setPaintIconWhenInactive(boolean paint)
Tells this component whether to paint an
Icon if not selected. |
void |
setSelected(boolean selected)
Tells this component whether it has to be painted selected or not.
|
void |
setTab(EclipseTab tab)
Informs this
TabComponent by which tab is is used. |
void |
setText(String text)
Sets the text that should be displayed on this tab.
|
void |
setTooltip(String tooltip)
Sets the tooltip that should be displayed on this tab.
|
void |
unbind()
Informs this tab that it is invisible and must not have any connections to other resources
|
addMouseInputListener, getElement, getPopupLocation, isUsedAsTitle, removeMouseInputListener, shouldFocus, shouldTransfersFocusComponent getComponent()
TabComponent, this
method must always return the same value.getComponent in interface DockElementRepresentativenullEclipseTabStateInfo getEclipseTabStateInfo()
void setSelected(boolean selected)
selected - the selection state of this tabvoid setFocused(boolean focused)
Dockable gained or lost focus.focused - the state of its dockable.void setEnabled(boolean enabled)
EclipseTab automatically removes all MouseInputListeners from a TabComponent that
is not enabled.enabled - whether this component is enabled or notvoid setPaintIconWhenInactive(boolean paint)
Icon if not selected.paint - true if an icon is always to be painted,
false if icons should only appear on selected tabs.void setOrientation(TabPlacement orientation)
orientation - the orientation, not nullvoid setTab(EclipseTab tab)
TabComponent by which tab is is used.tab - the owner of this TabComponentvoid setConfiguration(TabConfiguration configuration)
configuration - the new configuration to use, not nullInsets getOverlap(TabComponent other)
other - the component which may overlap this componentvoid bind()
void unbind()
Dimension getMinimumSize(TabComponent[] tabs)
tabs.tabs - the displayed tabs, exactly one entry is this
and may contain null entries.Dimension getPreferredSize(TabComponent[] tabs)
tabs.tabs - the displayed tabs, exactly one entry is this
and may contain null entries.void setText(String text)
text - the new textvoid setTooltip(String tooltip)
tooltip - the new tooltip, can be nullvoid setIcon(Icon icon)
icon - the icon, can be nullCopyright © 2017 Docking Frames. All rights reserved.