|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.stack.tab.AbstractTabPaneComponent bibliothek.gui.dock.station.stack.tab.AbstractTab bibliothek.extension.gui.dock.theme.eclipse.stack.EclipseTab
public class EclipseTab
A wrapper around a TabComponent
allowing to use the TabComponent
also as CombinedTab
.
Constructor Summary | |
---|---|
EclipseTab(EclipseTabPane parent,
Dockable dockable,
TabComponent delegate)
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 |
bind()
Adds observers to parent and DockController to keep the
user interface up to date. |
Component |
getComponent()
Gets the Component which is wrapped into this
AbstractTabPaneComponent . |
DockElement |
getElement()
Gets the element which is represented by this . |
Dimension |
getMinimumSize(Tab[] tabs)
Gets the minimum size of this tab under the assumption that this tab is displayed together with tabs . |
Insets |
getOverlap(TabPaneComponent other)
Tells how much of this component may be overlapped by another component other . |
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(Tab[] tabs)
Gets the preferred size of this tab under the assumption that this tab is displayed together with tabs . |
TabComponent |
getTabComponent()
Gets the TabComponent which is shown on this tab. |
int |
getZOrder()
Gets the value of the z order. |
protected void |
informFocusChanged(boolean focused)
Called when the focus state of this tab has been changed. |
protected void |
informSelectionChanged(boolean selected)
Called when the selection state of this tab has been changed. |
boolean |
isPaneVisible()
Tells whether this component is visible or not. |
boolean |
isUsedAsTitle()
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)
Removes a listener from this representative. |
void |
setConfiguration(TabConfiguration configuration)
Fine tunes this tab. |
void |
setEnabled(boolean enabled)
Enables or disables this tab. |
void |
setIcon(Icon icon)
Sets the image of this tab. |
void |
setOrientation(TabPlacement orientation)
Tells this component how to paint itself. |
void |
setPaintIconWhenInactive(boolean paint)
Tells this tab to paint icons when not selected. |
void |
setPaneVisible(boolean visible)
Changes the visibility state of this component. |
void |
setText(String text)
Sets the text of this tab. |
void |
setTooltip(String tooltip)
Sets the tooltip of this tab. |
void |
setZOrder(int order)
Sets the z order of this component. |
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. |
String |
toString()
|
void |
unbind()
Removes observers from parent and DockController . |
Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTab |
---|
getDockable, isFocused, isSelected, setController |
Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabPaneComponent |
---|
getBounds, getMaximumSize, getMinimumSize, getOrientation, getPreferredSize, getTabParent, setBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.station.stack.tab.Tab |
---|
getDockable |
Methods inherited from interface bibliothek.gui.dock.station.stack.tab.TabPaneComponent |
---|
getBounds, getMaximumSize, getMinimumSize, getPreferredSize, getTabParent, setBounds |
Constructor Detail |
---|
public EclipseTab(EclipseTabPane parent, Dockable dockable, TabComponent delegate)
parent
- the owner of this tab.dockable
- the element associated with this tab.delegate
- the real TabComponent
Method Detail |
---|
public void setConfiguration(TabConfiguration configuration)
CombinedTab
setConfiguration
in interface CombinedTab
configuration
- the new configuration to useCombinedStackDockComponent.getConfiguration(bibliothek.gui.Dockable)
public Component getComponent()
AbstractTabPaneComponent
Component
which is wrapped into this
AbstractTabPaneComponent
. This method is not called from the
constructor.
getComponent
in interface DockElementRepresentative
getComponent
in interface CombinedTab
getComponent
in class AbstractTabPaneComponent
Component
, not null
public TabComponent getTabComponent()
TabComponent
which is shown on this tab.
public void setPaneVisible(boolean visible)
TabPaneComponent
setPaneVisible
in interface TabPaneComponent
visible
- the new statepublic boolean isPaneVisible()
TabPaneComponent
isPaneVisible
in interface TabPaneComponent
true
if visible, false
otherwisepublic void setZOrder(int order)
TabPaneComponent
TabPaneComponent
s
on the parent TabPane
. The implementation may increase or
decrease z-orders to prevent collisions between components with the same
order.
setZOrder
in interface TabPaneComponent
order
- the order, can be any integer.public int getZOrder()
TabPaneComponent
getZOrder
in interface TabPaneComponent
TabPaneComponent.setZOrder(int)
public void setIcon(Icon icon)
CombinedTab
setIcon
in interface CombinedTab
icon
- an icon that should be shown, can be null
public void setText(String text)
CombinedTab
setText
in interface CombinedTab
text
- the text to displaypublic void setTooltip(String tooltip)
CombinedTab
setTooltip
in interface CombinedTab
tooltip
- the tooltip text, can be null
public void setOrientation(TabPlacement orientation)
TabPaneComponent
setOrientation
in interface TabPaneComponent
setOrientation
in class AbstractTabPaneComponent
orientation
- the orientation, not null
public Dimension getMinimumSize(Tab[] tabs)
Tab
tabs
.
getMinimumSize
in interface Tab
getMinimumSize
in class AbstractTab
tabs
- the displayed tabs, exactly one entry is this
and no entry is null
public Dimension getPreferredSize(Tab[] tabs)
Tab
tabs
.
getPreferredSize
in interface Tab
getPreferredSize
in class AbstractTab
tabs
- the displayed tabs, exactly one entry is this
and no entry is null
public DockElement getElement()
DockElementRepresentative
this
.
The result of this method must not change.
getElement
in interface DockElementRepresentative
null
public 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 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 boolean shouldFocus()
DockElementRepresentative
Dockable
.
shouldFocus
in interface DockElementRepresentative
true
if clicking this component should influence focuspublic boolean shouldTransfersFocus()
DockElementRepresentative
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
.
shouldTransfersFocus
in interface DockElementRepresentative
public void setEnabled(boolean enabled)
CombinedTab
setEnabled
in interface CombinedTab
enabled
- whether to enable or disable this tabpublic void removeMouseInputListener(MouseInputListener listener)
DockElementRepresentative
removeMouseInputListener
in interface DockElementRepresentative
listener
- the listener to removepublic void addMouseInputListener(MouseInputListener listener)
DockElementRepresentative
component
. It is valid to do nothing.
addMouseInputListener
in interface DockElementRepresentative
listener
- the new listenerpublic void bind()
DockController
to keep the
user interface up to date.
bind
in class AbstractTab
public void unbind()
DockController
.
unbind
in class AbstractTab
public Insets getOverlap(TabPaneComponent other)
TabPaneComponent
other
.
getOverlap
in interface TabPaneComponent
getOverlap
in class AbstractTabPaneComponent
other
- another component which may be painted over this component
null
public void setPaintIconWhenInactive(boolean paint)
paint
- whether to paint the iconsprotected void informFocusChanged(boolean focused)
AbstractTab
informFocusChanged
in class AbstractTab
focused
- the new focus stateprotected void informSelectionChanged(boolean selected)
AbstractTab
informSelectionChanged
in class AbstractTab
selected
- the new selection statepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |