TabPainter is the preferred way to modify the tabs@Deprecated public class DockTitleTab extends Object implements TabComponent, EclipseTabStateInfo
DockTitleTab is a wrapper around an ordinary DockTitle
to get a TabComponent.DockTitleTab will use EclipseDockTitleEvents
to inform its DockTitle when a property has changed, the
method DockTitle.changed(bibliothek.gui.dock.title.DockTitleEvent)
is called for that purpose.| Modifier and Type | Field and Description |
|---|---|
static TabPainter |
FACTORY
Deprecated.
A
TabPainter that uses the id EclipseTheme.TAB_DOCK_TITLE
to get a DockTitleVersion from the DockTitleManager
and create a new DockTitle which is then wrapped by a
DockTitleTab. |
| Constructor and Description |
|---|
DockTitleTab(DockStation station,
Dockable dockable,
DockTitleVersion title,
EclipseTheme theme)
Deprecated.
Creates a new tab.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMouseInputListener(MouseInputListener listener)
Deprecated.
Adds a listener to this representative, it is not defined what to do
with that listener, but most subclasses would just add the listener
to their
component. |
void |
addMouseListener(MouseListener listener)
Deprecated.
|
void |
addMouseMotionListener(MouseMotionListener listener)
Deprecated.
|
void |
bind()
Deprecated.
Informs this tab that it will be shown soon
|
static TabPainter |
createFactory(TabPainter fallback)
Deprecated.
|
protected void |
fire()
Deprecated.
Fires an event to the
DockTitle of this DockTitleTab. |
Component |
getComponent()
Deprecated.
Gets the internal representation of this
TabComponent, this
method must always return the same value. |
Dockable |
getDockable()
Deprecated.
Gets the
Dockable which is represented by this tab. |
EclipseTabStateInfo |
getEclipseTabStateInfo()
Deprecated.
Gets information about the state of this tab.
|
DockElement |
getElement()
Deprecated.
Gets the element which is represented by
this. |
Dimension |
getMinimumSize(TabComponent[] tabs)
Deprecated.
Gets the minimum size of this tab under the assumption that
this tab is displayed together with
tabs. |
Insets |
getOverlap(TabComponent other)
Deprecated.
Gets the number of pixels which should be covered at the sides
of this component by other tabs.
|
Point |
getPopupLocation(Point click,
boolean popupTrigger)
Deprecated.
Tells whether a popup menu should be opened when the user clicks
at
click with the mouse. |
Dimension |
getPreferredSize(TabComponent[] tabs)
Deprecated.
Gets the preferred size of this tab under the assumption that
this tab is displayed together with
tabs. |
boolean |
isFocused()
Deprecated.
Whether the tab is currently focused.
|
boolean |
isSelected()
Deprecated.
Whether the tab is currently selected.
|
boolean |
isUsedAsTitle()
Deprecated.
Tells whether this
DockElementRepresentative is used as title.Some modules grant more rights to titles than to non-titles, i.e. |
void |
removeMouseInputListener(MouseInputListener listener)
Deprecated.
Removes a listener from this representative.
|
void |
removeMouseListener(MouseListener listener)
Deprecated.
|
void |
removeMouseMotionListener(MouseMotionListener listener)
Deprecated.
|
void |
setConfiguration(TabConfiguration configuration)
Deprecated.
Fine tunes the look and behavior of this tab.
|
void |
setEnabled(boolean enabled)
Deprecated.
Calling this method has no effect, as this tab shows a
DockTitle which has its own
mechanism to disable itself. |
void |
setFocused(boolean focused)
Deprecated.
Tells this component that its
Dockable gained or lost focus. |
void |
setIcon(Icon icon)
Deprecated.
Sets the icon that should be painted on this tab.
|
void |
setOrientation(TabPlacement orientation)
Deprecated.
Sets the placement of the tabs and as a result the orientation of this
component.
|
void |
setPaintIconWhenInactive(boolean paint)
Deprecated.
Tells this component whether to paint an
Icon if not selected. |
void |
setSelected(boolean selected)
Deprecated.
Tells this component whether it has to be painted selected or not.
|
void |
setTab(EclipseTab tab)
Deprecated.
Informs this
TabComponent by which tab is is used. |
void |
setText(String text)
Deprecated.
Sets the text that should be displayed on this tab.
|
void |
setTooltip(String tooltip)
Deprecated.
Sets the tooltip that should be displayed on this tab.
|
boolean |
shouldFocus()
Deprecated.
Tells whether a click onto this component should transfer the focus either to this component or to the
Dockable. |
boolean |
shouldTransfersFocus()
Deprecated.
Tells whether a click onto this component should transfer the focus to the
Dockable or not. |
void |
unbind()
Deprecated.
Informs this tab that it is invisible and must not have any connections to other resources
|
void |
update()
Deprecated.
Updates the selection and focus state of the title of this tab.
|
public static final TabPainter FACTORY
TabPainter that uses the id EclipseTheme.TAB_DOCK_TITLE
to get a DockTitleVersion from the DockTitleManager
and create a new DockTitle which is then wrapped by a
DockTitleTab.public DockTitleTab(DockStation station, Dockable dockable, DockTitleVersion title, EclipseTheme theme)
station - the station which uses the tabbed pane, might be nulldockable - the element for which this tab is showntitle - the title which represents the tabtheme - the theme which uses this tabpublic static final TabPainter createFactory(TabPainter fallback)
fallback - the backup-factoryTabPainterpublic EclipseTabStateInfo getEclipseTabStateInfo()
TabComponentgetEclipseTabStateInfo in interface TabComponentpublic void setConfiguration(TabConfiguration configuration)
TabComponentsetConfiguration in interface TabComponentconfiguration - the new configuration to use, not nullpublic void setOrientation(TabPlacement orientation)
TabComponentsetOrientation in interface TabComponentorientation - the orientation, not nullpublic void setTab(EclipseTab tab)
TabComponentTabComponent by which tab is is used.setTab in interface TabComponenttab - the owner of this TabComponentpublic void bind()
TabComponentbind in interface TabComponentpublic void unbind()
TabComponentunbind in interface TabComponentpublic void addMouseListener(MouseListener listener)
public void addMouseMotionListener(MouseMotionListener listener)
public Component getComponent()
TabComponentTabComponent, this
method must always return the same value.getComponent in interface TabComponentgetComponent in interface DockElementRepresentativenullpublic Dimension getMinimumSize(TabComponent[] tabs)
TabComponenttabs.getMinimumSize in interface TabComponenttabs - the displayed tabs, exactly one entry is this
and may contain null entries.public Dimension getPreferredSize(TabComponent[] tabs)
TabComponenttabs.getPreferredSize in interface TabComponenttabs - the displayed tabs, exactly one entry is this
and may contain null entries.public DockElement getElement()
DockElementRepresentativethis.
The result of this method must not change.getElement in interface DockElementRepresentativenullpublic Dockable getDockable()
EclipseTabStateInfoDockable which is represented by this tab.getDockable in interface EclipseTabStateInfonullpublic boolean isUsedAsTitle()
DockElementRepresentativeDockElementRepresentative is used as title.DockRelocator can allow drag & drop only for titles.Dockable should have only one element that is a title,
so if in doubt return false.isUsedAsTitle in interface DockElementRepresentativetrue if this representative should be seen as titlepublic boolean shouldTransfersFocus()
DockElementRepresentativeDockable or not. If this
object is a Dockable, then a result of true might change the currently focused item
of itself. This property is ignored if DockElementRepresentative.shouldFocus() returns false.shouldTransfersFocus in interface DockElementRepresentativepublic boolean shouldFocus()
DockElementRepresentativeDockable.shouldFocus in interface DockElementRepresentativetrue if clicking this component should influence focuspublic void setEnabled(boolean enabled)
DockTitle which has its own
mechanism to disable itself.setEnabled in interface TabComponentenabled - whether this component is enabled or notpublic Point getPopupLocation(Point click, boolean popupTrigger)
DockElementRepresentativeclick with the mouse. If yes, then the top left edge
of the popup should be returned, otherwise null should be
returned.getPopupLocation in interface DockElementRepresentativeclick - the location where the user clicked with the mousepopupTrigger - whether the invocation is the systems popup trigger
or not. Many implementations of this method will return click
in case of true, and null in case of falsenull if no
popup-menu should be openedpublic void addMouseInputListener(MouseInputListener listener)
DockElementRepresentativecomponent. It is valid to do nothing.addMouseInputListener in interface DockElementRepresentativelistener - the new listenerpublic void removeMouseInputListener(MouseInputListener listener)
DockElementRepresentativeremoveMouseInputListener in interface DockElementRepresentativelistener - the listener to removepublic Insets getOverlap(TabComponent other)
TabComponentgetOverlap in interface TabComponentother - the component which may overlap this componentpublic void removeMouseListener(MouseListener listener)
public void removeMouseMotionListener(MouseMotionListener listener)
public void setFocused(boolean focused)
TabComponentDockable gained or lost focus.setFocused in interface TabComponentfocused - the state of its dockable.public boolean isFocused()
EclipseTabStateInfoisFocused in interface EclipseTabStateInfopublic void setPaintIconWhenInactive(boolean paint)
TabComponentIcon if not selected.setPaintIconWhenInactive in interface TabComponentpaint - true if an icon is always to be painted,
false if icons should only appear on selected tabs.public void setSelected(boolean selected)
TabComponentsetSelected in interface TabComponentselected - the selection state of this tabpublic boolean isSelected()
EclipseTabStateInfoisSelected in interface EclipseTabStateInfopublic void setIcon(Icon icon)
TabComponentsetIcon in interface TabComponenticon - the icon, can be nullpublic void setText(String text)
TabComponentsetText in interface TabComponenttext - the new textpublic void setTooltip(String tooltip)
TabComponentsetTooltip in interface TabComponenttooltip - the new tooltip, can be nullpublic void update()
protected void fire()
DockTitle of this DockTitleTab.Copyright © 2017 Docking Frames. All rights reserved.