|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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 EclipseDockTitleEvent
s
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(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(MouseListener listener)
|
void |
addMouseMotionListener(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 . |
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 . |
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. |
Point |
getPopupLocation(Point click,
boolean popupTrigger)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
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(MouseInputListener listener)
Removes a listener from this representative. |
void |
removeMouseListener(MouseListener listener)
|
void |
removeMouseMotionListener(MouseMotionListener listener)
|
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 |
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 |
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 null
dockable
- the element for which this tab is showntitle
- the title which represents the tabMethod Detail |
---|
public static final TabPainter createFactory(TabPainter fallback)
fallback
to create
a TabComponent
when no DockTitle
is available.
fallback
- the backup-factory
TabPainter
public void setOrientation(TabPlacement orientation)
TabComponent
setOrientation
in interface TabComponent
orientation
- the orientation, not null
public void bind()
TabComponent
bind
in interface TabComponent
public void unbind()
TabComponent
unbind
in interface TabComponent
public void addMouseListener(MouseListener listener)
public void addMouseMotionListener(MouseMotionListener listener)
public Component getComponent()
TabComponent
TabComponent
, this
method must always return the same value.
getComponent
in interface TabComponent
getComponent
in interface DockElementRepresentative
null
public Dimension getMinimumSize(TabComponent[] tabs)
TabComponent
tabs
.
getMinimumSize
in interface TabComponent
tabs
- the displayed tabs, exactly one entry is this
and may contain null
entries.
public Dimension getPreferredSize(TabComponent[] tabs)
TabComponent
tabs
.
getPreferredSize
in interface TabComponent
tabs
- the displayed tabs, exactly one entry is this
and may contain null
entries.
public DockElement getElement()
DockElementRepresentative
this
.
The result of this method must not change.
getElement
in interface DockElementRepresentative
null
public boolean isUsedAsTitle()
DockElementRepresentative
DockElementRepresentative
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 DockElementRepresentative
true
if this representative should be seen as titlepublic Point getPopupLocation(Point click, boolean popupTrigger)
DockElementRepresentative
click
with the mouse. If yes, then the top left edge
of the popup should be returned, otherwise null
should be
returned.
getPopupLocation
in interface DockElementRepresentative
click
- 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(MouseInputListener listener)
DockElementRepresentative
component
. It is valid to do nothing.
addMouseInputListener
in interface DockElementRepresentative
listener
- the new listenerpublic void removeMouseInputListener(MouseInputListener listener)
DockElementRepresentative
removeMouseInputListener
in interface DockElementRepresentative
listener
- the listener to removepublic Insets getOverlap(TabComponent other)
TabComponent
getOverlap
in interface TabComponent
other
- the component which may overlap this component
public void removeMouseListener(MouseListener listener)
public void removeMouseMotionListener(MouseMotionListener listener)
public void setFocused(boolean focused)
TabComponent
Dockable
gained or lost focus.
setFocused
in interface TabComponent
focused
- the state of its dockable.public void setPaintIconWhenInactive(boolean paint)
TabComponent
Icon
if not selected.
setPaintIconWhenInactive
in interface TabComponent
paint
- 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 TabComponent
selected
- the selection state of this tabpublic void setIcon(Icon icon)
TabComponent
setIcon
in interface TabComponent
icon
- the icon, can be null
public void setText(String text)
TabComponent
setText
in interface TabComponent
text
- the new textpublic void setTooltip(String tooltip)
TabComponent
setTooltip
in interface TabComponent
tooltip
- the new tooltip, can be null
public 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 |