bibliothek.gui.dock.themes
Class DefaultStationPaintValue

java.lang.Object
  extended by bibliothek.gui.dock.themes.StationThemeItemValue<StationPaint>
      extended by bibliothek.gui.dock.themes.DefaultStationPaintValue
All Implemented Interfaces:
StationPaintValue, UIValue<StationPaint>

public class DefaultStationPaintValue
extends StationThemeItemValue<StationPaint>
implements StationPaintValue

A wrapper for a StationPaint. The wrapper can either use a delegate or installs itself as UIValue on the current ThemeManager.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.themes.StationPaintValue
KIND_STATION_PAINT
 
Constructor Summary
DefaultStationPaintValue(String id, DockStation station)
          Creates a new wrapper.
 
Method Summary
 void drawDivider(Graphics g, Rectangle bounds)
          Calls StationPaint.drawDivider(Graphics, DockStation, Rectangle)
 void drawInsertion(Graphics g, Rectangle stationBounds, Rectangle dockableBounds)
          Paints some markings when a Dockable is added to a DockStation.
 void drawInsertionLine(Graphics g, int x1, int y1, int x2, int y2)
          Paints a single line from x1/y1 to x2/y2.
 void drawRemoval(Graphics g, Rectangle stationBounds, Rectangle dockableBounds)
          Paints some markings when a Dockable is removed from a DockStation.
 
Methods inherited from class bibliothek.gui.dock.themes.StationThemeItemValue
get, getDelegate, getStation, set, setController, setDelegate
 
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.themes.StationPaintValue
getStation
 
Methods inherited from interface bibliothek.gui.dock.util.UIValue
set
 

Constructor Detail

DefaultStationPaintValue

public DefaultStationPaintValue(String id,
                                DockStation station)
Creates a new wrapper.

Parameters:
id - a unique identifier used on ThemeManager to get the current StationPaint
station - the station that is painted by this wrapper
Method Detail

drawDivider

public void drawDivider(Graphics g,
                        Rectangle bounds)
Calls StationPaint.drawDivider(Graphics, DockStation, Rectangle)

Parameters:
g - the graphics context
bounds - the boundaries of the divider

drawInsertion

public void drawInsertion(Graphics g,
                          Rectangle stationBounds,
                          Rectangle dockableBounds)
Paints some markings when a Dockable is added to a DockStation.

Parameters:
g - the graphics context used for painting
stationBounds - the area on the station which will be affected by the insertion
dockableBounds - the bounds that the new child will have

drawInsertionLine

public void drawInsertionLine(Graphics g,
                              int x1,
                              int y1,
                              int x2,
                              int y2)
Paints a single line from x1/y1 to x2/y2.

Parameters:
g - the graphics context used for painting
x1 - the x-coordinate of the first end of the line
y1 - the y-coordinate of the first end of the line
x2 - the x-coordinate of the second end of the line
y2 - the y-coordinate of the second end of the line

drawRemoval

public void drawRemoval(Graphics g,
                        Rectangle stationBounds,
                        Rectangle dockableBounds)
Paints some markings when a Dockable is removed from a DockStation.

Parameters:
g - the graphics context used for painting
stationBounds - the area on the station which will be affected by the removal
dockableBounds - the bounds that the old child currently has