bibliothek.gui.dock.common.theme.eclipse
Class CommonEclipseThemeConnector

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.DefaultEclipseThemeConnector
      extended by bibliothek.gui.dock.common.theme.eclipse.CommonEclipseThemeConnector
All Implemented Interfaces:
EclipseThemeConnector

public class CommonEclipseThemeConnector
extends DefaultEclipseThemeConnector

This EclipseThemeConnector pays attention to features only present in CDockables.

Author:
Benjamin Sigg

Nested Class Summary
 
Nested classes/interfaces inherited from interface bibliothek.extension.gui.dock.theme.eclipse.EclipseThemeConnector
EclipseThemeConnector.TitleBar
 
Constructor Summary
CommonEclipseThemeConnector(CControl control)
          Creates a new connector.
 
Method Summary
 void addEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
          Adds listener to this connector.
protected  EclipseTabDockActionLocation getLocation(CAction action, EclipseTabStateInfo tab)
          Gets the location of action depending on the state of tab.
protected  EclipseTabDockActionLocation getLocation(DockAction action, EclipseTabStateInfo tab)
          Gets the location of action.
 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.
 void removeEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
          Removes listener from this connector.
 
Methods inherited from class bibliothek.extension.gui.dock.theme.eclipse.DefaultEclipseThemeConnector
getLocation, hasListeners, listeners, shouldShowOnSide, shouldShowOnTab
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonEclipseThemeConnector

public CommonEclipseThemeConnector(CControl control)
Creates a new connector.

Parameters:
control - the control in whose realm this connector works, not null
Method Detail

addEclipseThemeConnectorListener

public void addEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
Description copied from interface: EclipseThemeConnector
Adds listener to this connector.

Specified by:
addEclipseThemeConnectorListener in interface EclipseThemeConnector
Overrides:
addEclipseThemeConnectorListener in class DefaultEclipseThemeConnector
Parameters:
listener - the listener, not null

removeEclipseThemeConnectorListener

public void removeEclipseThemeConnectorListener(EclipseThemeConnectorListener listener)
Description copied from interface: EclipseThemeConnector
Removes listener from this connector.

Specified by:
removeEclipseThemeConnectorListener in interface EclipseThemeConnector
Overrides:
removeEclipseThemeConnectorListener in class DefaultEclipseThemeConnector
Parameters:
listener - the listener to remove

getLocation

protected EclipseTabDockActionLocation getLocation(DockAction action,
                                                   EclipseTabStateInfo tab)
Description copied from class: DefaultEclipseThemeConnector
Gets the location of action.

Overrides:
getLocation in class DefaultEclipseThemeConnector
Parameters:
action - the action whose location is searched
tab - the state of a tab
Returns:
the location of action, not null

getLocation

protected EclipseTabDockActionLocation getLocation(CAction action,
                                                   EclipseTabStateInfo tab)
Gets the location of action depending on the state of tab.

Parameters:
action - the action whose location is searched
tab - the state of a tab
Returns:
the location or null to select the default location

getTitleBarKind

public EclipseThemeConnector.TitleBar getTitleBarKind(DockStation parent,
                                                      Dockable dockable)
Description copied from interface: EclipseThemeConnector
Tells which kind of title and DockableDisplayer should be shown for dockable assuming everything can be chosen freely.

Specified by:
getTitleBarKind in interface EclipseThemeConnector
Overrides:
getTitleBarKind in class DefaultEclipseThemeConnector
Parameters:
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
Returns:
which kind of title and displayer should be used