bibliothek.extension.gui.dock.theme.eclipse.stack.tab
Class DockTitleTab

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.stack.tab.DockTitleTab
All Implemented Interfaces:
TabComponent, DockElementRepresentative

Deprecated. Using a custom TabPainter is the preferred way to modify the tabs

@Deprecated
public class DockTitleTab
extends Object
implements TabComponent

A DockTitleTab is a wrapper around an ordinary DockTitle to get a TabComponent.
This 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.

Author:
Benjamin Sigg

Field Summary
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 Summary
DockTitleTab(DockStation station, Dockable dockable, DockTitleVersion title)
          Deprecated. Creates a new tab.
 
Method Summary
 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. Creates a new factory which uses fallback to create a TabComponent when no DockTitle is available.
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.
 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY

public static final 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 Detail

DockTitleTab

public DockTitleTab(DockStation station,
                    Dockable dockable,
                    DockTitleVersion title)
Deprecated. 
Creates a new tab.

Parameters:
station - the station which uses the tabbed pane, might be null
dockable - the element for which this tab is shown
title - the title which represents the tab
Method Detail

createFactory

public static final TabPainter createFactory(TabPainter fallback)
Deprecated. 
Creates a new factory which uses fallback to create a TabComponent when no DockTitle is available.

Parameters:
fallback - the backup-factory
Returns:
a new TabPainter

setConfiguration

public void setConfiguration(TabConfiguration configuration)
Deprecated. 
Description copied from interface: TabComponent
Fine tunes the look and behavior of this tab.

Specified by:
setConfiguration in interface TabComponent
Parameters:
configuration - the new configuration to use, not null

setOrientation

public void setOrientation(TabPlacement orientation)
Deprecated. 
Description copied from interface: TabComponent
Sets the placement of the tabs and as a result the orientation of this component.

Specified by:
setOrientation in interface TabComponent
Parameters:
orientation - the orientation, not null

setTab

public void setTab(EclipseTab tab)
Deprecated. 
Description copied from interface: TabComponent
Informs this TabComponent by which tab is is used.

Specified by:
setTab in interface TabComponent
Parameters:
tab - the owner of this TabComponent

bind

public void bind()
Deprecated. 
Description copied from interface: TabComponent
Informs this tab that it will be shown soon

Specified by:
bind in interface TabComponent

unbind

public void unbind()
Deprecated. 
Description copied from interface: TabComponent
Informs this tab that it is invisible and must not have any connections to other resources

Specified by:
unbind in interface TabComponent

addMouseListener

public void addMouseListener(MouseListener listener)
Deprecated. 

addMouseMotionListener

public void addMouseMotionListener(MouseMotionListener listener)
Deprecated. 

getComponent

public Component getComponent()
Deprecated. 
Description copied from interface: TabComponent
Gets the internal representation of this TabComponent, this method must always return the same value.

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

getMinimumSize

public Dimension getMinimumSize(TabComponent[] tabs)
Deprecated. 
Description copied from interface: TabComponent
Gets the minimum size of this tab under the assumption that this tab is displayed together with tabs.

Specified by:
getMinimumSize in interface TabComponent
Parameters:
tabs - the displayed tabs, exactly one entry is this and may contain null entries.
Returns:
the minimum size of this tab

getPreferredSize

public Dimension getPreferredSize(TabComponent[] tabs)
Deprecated. 
Description copied from interface: TabComponent
Gets the preferred size of this tab under the assumption that this tab is displayed together with tabs.

Specified by:
getPreferredSize in interface TabComponent
Parameters:
tabs - the displayed tabs, exactly one entry is this and may contain null entries.
Returns:
the preferred size of this tab

getElement

public DockElement getElement()
Deprecated. 
Description copied from interface: DockElementRepresentative
Gets the element which is represented by this. The result of this method must not change.

Specified by:
getElement in interface DockElementRepresentative
Returns:
the element, never null

isUsedAsTitle

public boolean isUsedAsTitle()
Deprecated. 
Description copied from interface: DockElementRepresentative
Tells whether this DockElementRepresentative is used as title.
Some modules grant more rights to titles than to non-titles, i.e. a DockRelocator can allow drag & drop only for titles.
Normally a Dockable should have only one element that is a title, so if in doubt return false.

Specified by:
isUsedAsTitle in interface DockElementRepresentative
Returns:
true if this representative should be seen as title

shouldTransfersFocus

public boolean shouldTransfersFocus()
Deprecated. 
Description copied from interface: DockElementRepresentative
Tells whether a click onto this component should transfer the focus to the Dockable 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.

Specified by:
shouldTransfersFocus in interface DockElementRepresentative
Returns:
whether to change the focused component or not

shouldFocus

public boolean shouldFocus()
Deprecated. 
Description copied from interface: DockElementRepresentative
Tells whether a click onto this component should transfer the focus either to this component or to the Dockable.

Specified by:
shouldFocus in interface DockElementRepresentative
Returns:
true if clicking this component should influence focus

setEnabled

public 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.

Specified by:
setEnabled in interface TabComponent
Parameters:
enabled - whether this component is enabled or not

getPopupLocation

public Point getPopupLocation(Point click,
                              boolean popupTrigger)
Deprecated. 
Description copied from interface: DockElementRepresentative
Tells whether a popup menu should be opened when the user clicks at click with the mouse. If yes, then the top left edge of the popup should be returned, otherwise null should be returned.

Specified by:
getPopupLocation in interface DockElementRepresentative
Parameters:
click - the location where the user clicked with the mouse
popupTrigger - 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 false
Returns:
the preferred location of a popup or null if no popup-menu should be opened

addMouseInputListener

public void addMouseInputListener(MouseInputListener listener)
Deprecated. 
Description copied from interface: DockElementRepresentative
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. It is valid to do nothing.

Specified by:
addMouseInputListener in interface DockElementRepresentative
Parameters:
listener - the new listener

removeMouseInputListener

public void removeMouseInputListener(MouseInputListener listener)
Deprecated. 
Description copied from interface: DockElementRepresentative
Removes a listener from this representative.

Specified by:
removeMouseInputListener in interface DockElementRepresentative
Parameters:
listener - the listener to remove

getOverlap

public Insets getOverlap(TabComponent other)
Deprecated. 
Description copied from interface: TabComponent
Gets the number of pixels which should be covered at the sides of this component by other tabs.

Specified by:
getOverlap in interface TabComponent
Parameters:
other - the component which may overlap this component
Returns:
the number of overlapped pixels

removeMouseListener

public void removeMouseListener(MouseListener listener)
Deprecated. 

removeMouseMotionListener

public void removeMouseMotionListener(MouseMotionListener listener)
Deprecated. 

setFocused

public void setFocused(boolean focused)
Deprecated. 
Description copied from interface: TabComponent
Tells this component that its Dockable gained or lost focus.

Specified by:
setFocused in interface TabComponent
Parameters:
focused - the state of its dockable.

setPaintIconWhenInactive

public void setPaintIconWhenInactive(boolean paint)
Deprecated. 
Description copied from interface: TabComponent
Tells this component whether to paint an Icon if not selected.

Specified by:
setPaintIconWhenInactive in interface TabComponent
Parameters:
paint - true if an icon is always to be painted, false if icons should only appear on selected tabs.

setSelected

public void setSelected(boolean selected)
Deprecated. 
Description copied from interface: TabComponent
Tells this component whether it has to be painted selected or not.

Specified by:
setSelected in interface TabComponent
Parameters:
selected - the selection state of this tab

setIcon

public void setIcon(Icon icon)
Deprecated. 
Description copied from interface: TabComponent
Sets the icon that should be painted on this tab.

Specified by:
setIcon in interface TabComponent
Parameters:
icon - the icon, can be null

setText

public void setText(String text)
Deprecated. 
Description copied from interface: TabComponent
Sets the text that should be displayed on this tab.

Specified by:
setText in interface TabComponent
Parameters:
text - the new text

setTooltip

public void setTooltip(String tooltip)
Deprecated. 
Description copied from interface: TabComponent
Sets the tooltip that should be displayed on this tab.

Specified by:
setTooltip in interface TabComponent
Parameters:
tooltip - the new tooltip, can be null

update

public void update()
Deprecated. 
Updates the selection and focus state of the title of this tab.


fire

protected void fire()
Deprecated. 
Fires an event to the DockTitle of this DockTitleTab.