bibliothek.extension.gui.dock.theme.eclipse.displayer
Class EclipseDockableDisplayer

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.tab.AbstractTabPane<T,M,I>
      extended by bibliothek.gui.dock.station.stack.CombinedStackDockComponent<EclipseTab,EclipseMenu,EclipseTabInfo>
          extended by bibliothek.extension.gui.dock.theme.eclipse.stack.EclipseTabPane
              extended by bibliothek.extension.gui.dock.theme.eclipse.displayer.EclipseDockableDisplayer
All Implemented Interfaces:
BorderedComponent, DockableDisplayer, StackDockComponent, TabPane

public class EclipseDockableDisplayer
extends EclipseTabPane
implements DockableDisplayer

This displayer paints a tab instead of a DockTitle (if the framework sets a title, then this title is ignored).

Author:
Janni Kovacs

Nested Class Summary
 
Nested classes/interfaces inherited from interface bibliothek.gui.dock.station.DockableDisplayer
DockableDisplayer.Location
 
Field Summary
 
Fields inherited from interface bibliothek.gui.dock.station.stack.tab.TabPane
LAYOUT_MANAGER
 
Constructor Summary
EclipseDockableDisplayer(EclipseTheme theme, DockStation station, Dockable dockable)
          Creates a new DockableDisplayer.
 
Method Summary
 void addDockableDisplayerListener(DockableDisplayerListener listener)
          Adds listener to this displayer.
protected  DockableDisplayerListener[] displayerListeners()
          Gets all DockableDisplayerListener known to this displayer.
 Dockable getDockable()
          Gets the Dockable which is shown on this displayer.
 Insets getDockableInsets()
          Gets an estimate of the insets around the Dockable of this displayer compared to the whole size of this displayer.
 Dimension getMinimumSize()
          Gets the minimal size that TabPane.getAvailableArea() should return.
 Dimension getPreferredSize()
          Gets the preferred size that TabPane.getAvailableArea() should return.
 DockStation getStation()
          Gets the station on which this pane lies.
 DockTitle getTitle()
          Gets the title which is shown on this displayer.
 DockableDisplayer.Location getTitleLocation()
          Gets the location of the title in respect to the Dockable.
 void removeDockableDisplayerListener(DockableDisplayerListener listener)
          Removes listener from this displayer.
 void setController(DockController controller)
          Connects this pane with controller.
 void setDockable(Dockable dockable)
          Sets the Dockable which should be shown on this displayer.
 void setStation(DockStation station)
          Sets the station on which this displayer is shown.
 void setTitle(DockTitle title)
          Sets the title of this displayer.
 void setTitleLocation(DockableDisplayer.Location location)
          Sets the location of the title in respect to the Dockable.
 boolean titleContains(int x, int y)
          Tells whether the point x/y is inside the title of this displayer or not.
 
Methods inherited from class bibliothek.extension.gui.dock.theme.eclipse.stack.EclipseTabPane
createContentPane, createLayerAt, getContentInsets, getLayerAt, getPainter, getTabPainter, getTheme, hasBorder, indexOfVisible, isSingleTabComponent, menuRemoved, newMenu, newTab, setContentBorderAt, setInfoComponent, setPainter, tabRemoved, updateFullBorder, updateTabPainter
 
Methods inherited from class bibliothek.gui.dock.station.stack.CombinedStackDockComponent
addChangeListener, addTab, addToMenu, createDefaultRepresentation, getAvailableArea, getBoundsAt, getComponent, getDockableAt, getInfoHandler, getMenuHandler, getSelectedBounds, getSelectedIndex, getTabCount, getTabHandler, getZOrder, insertTab, moveTab, putOnTab, remove, removeAll, removeChangeListener, removeFromMenu, repaint, revalidate, setComponentAt, setIconAt, setSelectedBounds, setSelectedDockable, setSelectedIndex, setTitleAt, setTooltipAt, setZOrder
 
Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabPane
addTabPaneListener, createMenu, destroyMenu, discardComponentsAndRebuild, doLayout, fireAdded, fireInfoComponentChanged, fireRemoved, fireSelectionChanged, getController, getDockable, getDockableCount, getDockables, getInfoComponent, getLayoutManager, getMenu, getMenuList, getMenus, getOnTab, getSelectedDockable, getTab, getTabPlacement, getTabs, getTabsList, getVisibleTab, getVisibleTabCount, indexOf, indexOfVisible, insert, listeners, move, putInMenu, removeTabPaneListener, setLayoutManager, setTabPlacement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.station.DockableDisplayer
getComponent, getController
 
Methods inherited from interface bibliothek.extension.gui.dock.theme.eclipse.stack.tab.BorderedComponent
getTabPlacement
 
Methods inherited from interface bibliothek.gui.dock.station.stack.StackDockComponent
setTabPlacement
 

Constructor Detail

EclipseDockableDisplayer

public EclipseDockableDisplayer(EclipseTheme theme,
                                DockStation station,
                                Dockable dockable)
Creates a new DockableDisplayer.

Parameters:
theme - the theme which creates this displayer, not null
station - the parent of this displayer, not null
dockable - the element shown on this displayer, may be null
Method Detail

getMinimumSize

public Dimension getMinimumSize()
Description copied from class: AbstractTabPane
Gets the minimal size that TabPane.getAvailableArea() should return.

Overrides:
getMinimumSize in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>
Returns:
the minimal size

getPreferredSize

public Dimension getPreferredSize()
Description copied from class: AbstractTabPane
Gets the preferred size that TabPane.getAvailableArea() should return.

Overrides:
getPreferredSize in class AbstractTabPane<EclipseTab,EclipseMenu,EclipseTabInfo>
Returns:
the preferred size

addDockableDisplayerListener

public void addDockableDisplayerListener(DockableDisplayerListener listener)
Description copied from interface: DockableDisplayer
Adds listener to this displayer.

Specified by:
addDockableDisplayerListener in interface DockableDisplayer
Parameters:
listener - the new listener, not null

removeDockableDisplayerListener

public void removeDockableDisplayerListener(DockableDisplayerListener listener)
Description copied from interface: DockableDisplayer
Removes listener from this displayer.

Specified by:
removeDockableDisplayerListener in interface DockableDisplayer
Parameters:
listener - the listener to remove

displayerListeners

protected DockableDisplayerListener[] displayerListeners()
Gets all DockableDisplayerListener known to this displayer.

Returns:
the list of listeners

setDockable

public void setDockable(Dockable dockable)
Description copied from interface: DockableDisplayer
Sets the Dockable which should be shown on this displayer. A value of null means that no Dockable should be visible at all.

Specified by:
setDockable in interface DockableDisplayer
Parameters:
dockable - the child, can be null

setController

public void setController(DockController controller)
Description copied from class: AbstractTabPane
Connects this pane with controller.

Specified by:
setController in interface DockableDisplayer
Specified by:
setController in interface StackDockComponent
Overrides:
setController in class EclipseTabPane
Parameters:
controller - the realm in which this pane works, may be null

titleContains

public boolean titleContains(int x,
                             int y)
Description copied from interface: DockableDisplayer
Tells whether the point x/y is inside the title of this displayer or not.

Specified by:
titleContains in interface DockableDisplayer
Parameters:
x - the x-coordinate, relatively to this component
y - the y-coordinate, relatively to this component
Returns:
true if the title contains the point

getDockableInsets

public Insets getDockableInsets()
Description copied from interface: DockableDisplayer
Gets an estimate of the insets around the Dockable of this displayer compared to the whole size of this displayer.

Specified by:
getDockableInsets in interface DockableDisplayer
Returns:
the estimate of the insets

getDockable

public Dockable getDockable()
Description copied from interface: DockableDisplayer
Gets the Dockable which is shown on this displayer.

Specified by:
getDockable in interface DockableDisplayer
Returns:
the child, can be null

getStation

public DockStation getStation()
Description copied from class: EclipseTabPane
Gets the station on which this pane lies.

Specified by:
getStation in interface DockableDisplayer
Overrides:
getStation in class EclipseTabPane
Returns:
the station

getTitle

public DockTitle getTitle()
Description copied from interface: DockableDisplayer
Gets the title which is shown on this displayer.

Specified by:
getTitle in interface DockableDisplayer
Returns:
the title, can be null

getTitleLocation

public DockableDisplayer.Location getTitleLocation()
Description copied from interface: DockableDisplayer
Gets the location of the title in respect to the Dockable.

Specified by:
getTitleLocation in interface DockableDisplayer
Returns:
the location

setStation

public void setStation(DockStation station)
Description copied from interface: DockableDisplayer
Sets the station on which this displayer is shown. That property must be set by the station itself. Note that there is no guarantee, that a station sets this property.

Specified by:
setStation in interface DockableDisplayer
Parameters:
station - the station or null

setTitle

public void setTitle(DockTitle title)
Description copied from interface: DockableDisplayer
Sets the title of this displayer. If the title is set to null, no title is visible. The displayer will change the orientation of the title.

Specified by:
setTitle in interface DockableDisplayer
Parameters:
title - the title or null

setTitleLocation

public void setTitleLocation(DockableDisplayer.Location location)
Description copied from interface: DockableDisplayer
Sets the location of the title in respect to the Dockable.

Specified by:
setTitleLocation in interface DockableDisplayer
Parameters:
location - the location, a value of null is transformed into the default-value