public class EclipseTab extends AbstractTab implements CombinedTab
| Constructor and Description |
|---|
EclipseTab(EclipseTabPane parent,
Dockable dockable,
TabComponent delegate)
Creates a new tab.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
EclipseTabStateInfo |
getEclipseTabStateInfo()
Gets information about the state of this tab.
|
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. |
getDockable, isFocused, isSelected, setControllergetBounds, getMaximumSize, getMinimumSize, getOrientation, getPreferredSize, getTabParent, setBoundsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDockablegetBounds, getMaximumSize, getMinimumSize, getPreferredSize, getTabParent, setBoundspublic EclipseTab(EclipseTabPane parent, Dockable dockable, TabComponent delegate)
parent - the owner of this tab.dockable - the element associated with this tab.delegate - the real TabComponentpublic EclipseTabStateInfo getEclipseTabStateInfo()
public void setConfiguration(TabConfiguration configuration)
CombinedTabsetConfiguration in interface CombinedTabconfiguration - the new configuration to useCombinedStackDockComponent.getConfiguration(bibliothek.gui.Dockable)public 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)
TabPaneComponentsetPaneVisible in interface TabPaneComponentvisible - the new statepublic boolean isPaneVisible()
TabPaneComponentisPaneVisible 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()
TabPaneComponentgetZOrder in interface TabPaneComponentTabPaneComponent.setZOrder(int)public void setIcon(Icon icon)
CombinedTabsetIcon in interface CombinedTabicon - an icon that should be shown, can be nullpublic void setText(String text)
CombinedTabsetText in interface CombinedTabtext - the text to displaypublic void setTooltip(String tooltip)
CombinedTabsetTooltip in interface CombinedTabtooltip - the tooltip text, can be nullpublic void setOrientation(TabPlacement orientation)
TabPaneComponentsetOrientation in interface TabPaneComponentsetOrientation in class AbstractTabPaneComponentorientation - the orientation, not nullpublic Dimension getMinimumSize(Tab[] tabs)
Tabtabs.getMinimumSize in interface TabgetMinimumSize in class AbstractTabtabs - the displayed tabs, exactly one entry is this
and no entry is nullpublic Dimension getPreferredSize(Tab[] tabs)
Tabtabs.getPreferredSize in interface TabgetPreferredSize in class AbstractTabtabs - the displayed tabs, exactly one entry is this
and no entry is nullpublic DockElement getElement()
DockElementRepresentativethis.
The result of this method must not change.getElement in interface DockElementRepresentativenullpublic Point getPopupLocation(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 falsenull 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 setEnabled(boolean enabled)
CombinedTabsetEnabled in interface CombinedTabenabled - whether to enable or disable this tabpublic void removeMouseInputListener(MouseInputListener listener)
DockElementRepresentativeremoveMouseInputListener in interface DockElementRepresentativelistener - the listener to removepublic void addMouseInputListener(MouseInputListener listener)
DockElementRepresentativecomponent. It is valid to do nothing.addMouseInputListener in interface DockElementRepresentativelistener - the new listenerpublic void bind()
DockController to keep the
user interface up to date.bind in class AbstractTabpublic void unbind()
DockController.unbind in class AbstractTabpublic Insets getOverlap(TabPaneComponent other)
TabPaneComponentother.getOverlap in interface TabPaneComponentgetOverlap in class AbstractTabPaneComponentother - another component which may be painted over this componentnullpublic void setPaintIconWhenInactive(boolean paint)
paint - whether to paint the iconsprotected void informFocusChanged(boolean focused)
AbstractTabinformFocusChanged in class AbstractTabfocused - the new focus stateprotected void informSelectionChanged(boolean selected)
AbstractTabinformSelectionChanged in class AbstractTabselected - the new selection stateCopyright © 2017 Docking Frames. All rights reserved.