|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.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(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 |
bind()
Adds observers to parent and DockController to keep the
user interface up to date. |
java.awt.Component |
getComponent()
Gets the Component which is wrapped into this
AbstractTabPaneComponent. |
DockElement |
getElement()
Gets the element which is represented by this. |
java.awt.Dimension |
getMinimumSize(Tab[] tabs)
Gets the minimum size of this tab under the assumption that this tab is displayed together with tabs. |
java.awt.Insets |
getOverlap(TabPaneComponent other)
Tells how much of this component may be overlapped by another component other. |
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(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. |
void |
removeMouseInputListener(javax.swing.event.MouseInputListener listener)
Removes a listener from this representative. |
void |
setIcon(javax.swing.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(java.lang.String text)
Sets the text of this tab. |
void |
setTooltip(java.lang.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. |
java.lang.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 java.awt.Component getComponent()
AbstractTabPaneComponentComponent which is wrapped into this
AbstractTabPaneComponent. This method is not called from the
constructor.
getComponent in interface DockElementRepresentativegetComponent in interface CombinedTabgetComponent in class AbstractTabPaneComponentComponent, not nullpublic TabComponent getTabComponent()
TabComponent which is shown on this tab.
public void setPaneVisible(boolean visible)
TabPaneComponent
setPaneVisible in interface TabPaneComponentvisible - the new statepublic boolean isPaneVisible()
TabPaneComponent
isPaneVisible in interface TabPaneComponenttrue if visible, false otherwisepublic void setZOrder(int order)
TabPaneComponentTabPaneComponents
on the parent TabPane. The implementation may increase or
decrease z-orders to prevent collisions between components with the same
order.
setZOrder in interface TabPaneComponentorder - the order, can be any integer.public int getZOrder()
TabPaneComponent
getZOrder in interface TabPaneComponentTabPaneComponent.setZOrder(int)public void setIcon(javax.swing.Icon icon)
CombinedTab
setIcon in interface CombinedTabicon - an icon that should be shown, can be nullpublic void setText(java.lang.String text)
CombinedTab
setText in interface CombinedTabtext - the text to displaypublic void setTooltip(java.lang.String tooltip)
CombinedTab
setTooltip in interface CombinedTabtooltip - the tooltip text, can be nullpublic void setOrientation(TabPlacement orientation)
TabPaneComponent
setOrientation in interface TabPaneComponentsetOrientation in class AbstractTabPaneComponentorientation - the orientation, not nullpublic void addMouseInputListener(javax.swing.event.MouseInputListener listener)
DockElementRepresentativecomponent. It is valid to do nothing.
addMouseInputListener in interface DockElementRepresentativelistener - the new listenerpublic java.awt.Dimension getMinimumSize(Tab[] tabs)
Tabtabs.
getMinimumSize in interface TabgetMinimumSize in class AbstractTabtabs - the displayed tabs, exactly one entry is this
and no entry is null
public java.awt.Dimension getPreferredSize(Tab[] tabs)
Tabtabs.
getPreferredSize in interface TabgetPreferredSize in class AbstractTabtabs - the displayed tabs, exactly one entry is this
and no entry is null
public DockElement getElement()
DockElementRepresentativethis.
The result of this method must not change.
getElement in interface DockElementRepresentativenull
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 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 shouldFocus()
DockElementRepresentativeDockable.
shouldFocus in interface DockElementRepresentativetrue if clicking this component should influence focuspublic 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 void removeMouseInputListener(javax.swing.event.MouseInputListener listener)
DockElementRepresentative
removeMouseInputListener in interface DockElementRepresentativelistener - the listener to removepublic void bind()
DockController to keep the
user interface up to date.
bind in class AbstractTabpublic void unbind()
DockController.
unbind in class AbstractTabpublic java.awt.Insets getOverlap(TabPaneComponent other)
TabPaneComponentother.
getOverlap in interface TabPaneComponentgetOverlap in class AbstractTabPaneComponentother - another component which may be painted over this component
nullpublic void setPaintIconWhenInactive(boolean paint)
paint - whether to paint the iconsprotected void informFocusChanged(boolean focused)
AbstractTab
informFocusChanged in class AbstractTabfocused - the new focus stateprotected void informSelectionChanged(boolean selected)
AbstractTab
informSelectionChanged in class AbstractTabselected - the new selection statepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||