public class DefaultEclipseThemeConnector extends Object implements EclipseThemeConnector
EclipseThemeConnector
draws the typical eclipse-header over Dockable
s
and neither border nor title over DockStation
s. It checks each DockAction
for
the annotation EclipseTabDockAction
and the actions with the annotation are painted
on tabs.EclipseThemeConnector.TitleBar
Constructor and Description |
---|
DefaultEclipseThemeConnector() |
Modifier and Type | Method and Description |
---|---|
void |
addEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
Adds
listener to this connector. |
protected EclipseTabDockActionLocation |
getLocation(DockAction action,
EclipseTabStateInfo tab)
Gets the location of
action . |
protected EclipseTabDockActionLocation |
getLocation(EclipseTabDockAction annotation,
EclipseTabStateInfo tab)
Gets the location encoded in
annotation . |
EclipseThemeConnector.TitleBar |
getTitleBarKind(DockStation parent,
Dockable dockable)
Tells which kind of title and
DockableDisplayer should be
shown for dockable assuming everything can be chosen
freely. |
protected boolean |
hasListeners()
Tells whether
this has any registered listeners. |
protected EclipseThemeConnectorListener[] |
listeners()
Gets all listeners that are currently registered at this connector.
|
void |
removeEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
Removes
listener from this connector. |
boolean |
shouldShowOnSide(DockAction action,
EclipseTabStateInfo tab)
Tells whether
action should be shown on the right side of the
tab of dockable .Note that EclipseThemeConnector.shouldShowOnSide(DockAction, EclipseTabStateInfo) and EclipseThemeConnector.shouldShowOnTab(DockAction, EclipseTabStateInfo)
are independent of each other. |
boolean |
shouldShowOnTab(DockAction action,
EclipseTabStateInfo tab)
Tells whether
action should be shown on the tab of dockable .Note that EclipseThemeConnector.shouldShowOnSide(DockAction, EclipseTabStateInfo) and EclipseThemeConnector.shouldShowOnTab(DockAction, EclipseTabStateInfo)
are independent of each other. |
public void addEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
EclipseThemeConnector
listener
to this connector.addEclipseThemeConnectorListener
in interface EclipseThemeConnector
listener
- the listener, not null
public void removeEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
EclipseThemeConnector
listener
from this connector.removeEclipseThemeConnectorListener
in interface EclipseThemeConnector
listener
- the listener to removeprotected EclipseThemeConnectorListener[] listeners()
protected boolean hasListeners()
this
has any registered listeners.true
if there is at least one listener registered.public EclipseThemeConnector.TitleBar getTitleBarKind(DockStation parent, Dockable dockable)
EclipseThemeConnector
DockableDisplayer
should be
shown for dockable
assuming everything can be chosen
freely.getTitleBarKind
in interface EclipseThemeConnector
parent
- the future or current parent of dockable
that will
show the DockableDisplayer
. May be null
.dockable
- the element that stands alone on a DockStation
public boolean shouldShowOnSide(DockAction action, EclipseTabStateInfo tab)
EclipseThemeConnector
action
should be shown on the right side of the
tab of dockable
.EclipseThemeConnector.shouldShowOnSide(DockAction, EclipseTabStateInfo)
and EclipseThemeConnector.shouldShowOnTab(DockAction, EclipseTabStateInfo)
are independent of each other.shouldShowOnSide
in interface EclipseThemeConnector
action
- the action to showtab
- information about the tab that shows the Dockable
action
should be shown on the right sidepublic boolean shouldShowOnTab(DockAction action, EclipseTabStateInfo tab)
EclipseThemeConnector
action
should be shown on the tab of dockable
.EclipseThemeConnector.shouldShowOnSide(DockAction, EclipseTabStateInfo)
and EclipseThemeConnector.shouldShowOnTab(DockAction, EclipseTabStateInfo)
are independent of each other.shouldShowOnTab
in interface EclipseThemeConnector
action
- the action to showtab
- information about the tab that shows the Dockable
action
should be shown on the tabprotected EclipseTabDockActionLocation getLocation(DockAction action, EclipseTabStateInfo tab)
action
.action
- the action whose location is searchedtab
- the state of a tabaction
, not null
protected EclipseTabDockActionLocation getLocation(EclipseTabDockAction annotation, EclipseTabStateInfo tab)
annotation
.annotation
- an annotation, can be null
tab
- the state of a tabDockAction
should have according to annotation