bibliothek.extension.gui.dock.theme.eclipse.stack.tab
Interface TabComponent

All Superinterfaces:
DockElementRepresentative
All Known Implementing Classes:
ArchGradientPainter, BaseTabComponent, DockTitleTab, RectGradientPainter

public interface TabComponent
extends DockElementRepresentative

A TabComponent paints the content of an EclipseTab. This component is informed about the change of properties that are often needed to paint properly.


Method Summary
 void bind()
          Informs this tab that it will be shown soon
 java.awt.Component getComponent()
          Gets the internal representation of this TabComponent, this method must always return the same value.
 java.awt.Dimension getMinimumSize(TabComponent[] tabs)
          Gets the minimum size of this tab under the assumption that this tab is displayed together with tabs.
 java.awt.Insets getOverlap(TabComponent other)
          Gets the number of pixels which should be covered at the sides of this component by other tabs.
 java.awt.Dimension getPreferredSize(TabComponent[] tabs)
          Gets the preferred size of this tab under the assumption that this tab is displayed together with tabs.
 void setFocused(boolean focused)
          Tells this component that its Dockable gained or lost focus.
 void setIcon(javax.swing.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(java.lang.String text)
          Sets the text that should be displayed on this tab.
 void setTooltip(java.lang.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
 
Methods inherited from interface bibliothek.gui.dock.DockElementRepresentative
addMouseInputListener, getElement, getPopupLocation, isUsedAsTitle, removeMouseInputListener, shouldFocus, shouldTransfersFocus
 

Method Detail

getComponent

java.awt.Component getComponent()
Gets the internal representation of this TabComponent, this method must always return the same value.

Specified by:
getComponent in interface DockElementRepresentative
Returns:
the internal representation, not null

setSelected

void setSelected(boolean selected)
Tells this component whether it has to be painted selected or not.

Parameters:
selected - the selection state of this tab

setFocused

void setFocused(boolean focused)
Tells this component that its Dockable gained or lost focus.

Parameters:
focused - the state of its dockable.

setPaintIconWhenInactive

void setPaintIconWhenInactive(boolean paint)
Tells this component whether to paint an Icon if not selected.

Parameters:
paint - true if an icon is always to be painted, false if icons should only appear on selected tabs.

setOrientation

void setOrientation(TabPlacement orientation)
Sets the placement of the tabs and as a result the orientation of this component.

Parameters:
orientation - the orientation, not null

setTab

void setTab(EclipseTab tab)
Informs this TabComponent by which tab is is used.

Parameters:
tab - the owner of this TabComponent

getOverlap

java.awt.Insets getOverlap(TabComponent other)
Gets the number of pixels which should be covered at the sides of this component by other tabs.

Parameters:
other - the component which may overlap this component
Returns:
the number of overlapped pixels

bind

void bind()
Informs this tab that it will be shown soon


unbind

void unbind()
Informs this tab that it is invisible and must not have any connections to other resources


getMinimumSize

java.awt.Dimension getMinimumSize(TabComponent[] tabs)
Gets the minimum size of this tab under the assumption that this tab is displayed together with tabs.

Parameters:
tabs - the displayed tabs, exactly one entry is this and may contain null entries.
Returns:
the minimum size of this tab

getPreferredSize

java.awt.Dimension getPreferredSize(TabComponent[] tabs)
Gets the preferred size of this tab under the assumption that this tab is displayed together with tabs.

Parameters:
tabs - the displayed tabs, exactly one entry is this and may contain null entries.
Returns:
the preferred size of this tab

setText

void setText(java.lang.String text)
Sets the text that should be displayed on this tab.

Parameters:
text - the new text

setTooltip

void setTooltip(java.lang.String tooltip)
Sets the tooltip that should be displayed on this tab.

Parameters:
tooltip - the new tooltip, can be null

setIcon

void setIcon(javax.swing.Icon icon)
Sets the icon that should be painted on this tab.

Parameters:
icon - the icon, can be null