|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.extension.gui.dock.theme.eclipse.stack.tab.DockTitleTab
public class DockTitleTab
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.event.DockTitleEvent)
is called for that purpose.
| Field Summary | |
|---|---|
static TabPainter |
FACTORY
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)
Creates a new tab. |
|
| Method Summary | |
|---|---|
void |
addMouseInputListener(javax.swing.event.MouseInputListener listener)
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(java.awt.event.MouseListener listener)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener listener)
|
void |
bind()
Informs this tab that it will be shown soon |
static TabPainter |
createFactory(TabPainter fallback)
Creates a new factory which uses fallback to create
a TabComponent when no DockTitle is available. |
protected void |
fire()
Fires an event to the DockTitle of this DockTitleTab. |
java.awt.Component |
getComponent()
Gets the internal representation of this TabComponent, this
method must always return the same value. |
DockElement |
getElement()
Gets the element which is represented by this. |
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.Point |
getPopupLocation(java.awt.Point click,
boolean popupTrigger)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
java.awt.Dimension |
getPreferredSize(TabComponent[] tabs)
Gets the preferred size of this tab under the assumption that this tab is displayed together with tabs. |
boolean |
isUsedAsTitle()
Tells whether this DockElementRepresentative is used as title. |
void |
removeMouseInputListener(javax.swing.event.MouseInputListener listener)
Removes a listener from this representative. |
void |
removeMouseListener(java.awt.event.MouseListener listener)
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
|
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. |
boolean |
shouldFocus()
Tells whether a click onto this component should transfer the focus either to this component or to the Dockable. |
boolean |
shouldTransfersFocus()
Tells whether a click onto this component should transfer the focus to the Dockable or not. |
void |
unbind()
Informs this tab that it is invisible and must not have any connections to other resources |
void |
update()
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 |
|---|
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.
| Constructor Detail |
|---|
public DockTitleTab(DockStation station,
Dockable dockable,
DockTitleVersion title)
station - the station which uses the tabbed pane, might be nulldockable - the element for which this tab is showntitle - the title which represents the tab| Method Detail |
|---|
public static final TabPainter createFactory(TabPainter fallback)
fallback to create
a TabComponent when no DockTitle is available.
fallback - the backup-factory
TabPainterpublic void setOrientation(TabPlacement orientation)
TabComponent
setOrientation 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()
TabComponent
bind in interface TabComponentpublic void unbind()
TabComponent
unbind in interface TabComponentpublic void addMouseListener(java.awt.event.MouseListener listener)
public void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
public java.awt.Component getComponent()
TabComponentTabComponent, this
method must always return the same value.
getComponent in interface TabComponentgetComponent in interface DockElementRepresentativenullpublic java.awt.Dimension getMinimumSize(TabComponent[] tabs)
TabComponenttabs.
getMinimumSize in interface TabComponenttabs - the displayed tabs, exactly one entry is this
and may contain null entries.
public java.awt.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 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 focus
public java.awt.Point getPopupLocation(java.awt.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 false
null if no
popup-menu should be openedpublic void addMouseInputListener(javax.swing.event.MouseInputListener listener)
DockElementRepresentativecomponent. It is valid to do nothing.
addMouseInputListener in interface DockElementRepresentativelistener - the new listenerpublic void removeMouseInputListener(javax.swing.event.MouseInputListener listener)
DockElementRepresentative
removeMouseInputListener in interface DockElementRepresentativelistener - the listener to removepublic java.awt.Insets getOverlap(TabComponent other)
TabComponent
getOverlap in interface TabComponentother - the component which may overlap this component
public void removeMouseListener(java.awt.event.MouseListener listener)
public void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
public void setFocused(boolean focused)
TabComponentDockable gained or lost focus.
setFocused in interface TabComponentfocused - the state of its dockable.public 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)
TabComponent
setSelected in interface TabComponentselected - the selection state of this tabpublic void setIcon(javax.swing.Icon icon)
TabComponent
setIcon in interface TabComponenticon - the icon, can be nullpublic void setText(java.lang.String text)
TabComponent
setText in interface TabComponenttext - the new textpublic void setTooltip(java.lang.String tooltip)
TabComponent
setTooltip in interface TabComponenttooltip - the new tooltip, can be nullpublic void update()
protected void fire()
DockTitle of this DockTitleTab.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||