bibliothek.gui.dock.themes.basic
Class BasicStationPaint

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.BasicStationPaint
All Implemented Interfaces:
StationPaint

@ColorCodes(value={"paint.line","paint.divider","paint.insertion","paint.removal"})
public class BasicStationPaint
extends Object
implements StationPaint

A simple implementation of StationPaint. This paint uses one color to draw various elements.

Author:
Benjamin Sigg

Constructor Summary
BasicStationPaint()
           
 
Method Summary
 void drawDivider(Graphics g, DockStation station, Rectangle bounds)
          Draws a divider between two elements.
 void drawInsertion(Graphics g, DockStation station, Rectangle stationBounds, Rectangle dockableBounds)
          Paints some markings when a Dockable is added to a DockStation.
 void drawInsertionLine(Graphics g, DockStation station, int x1, int x2, int y1, int y2)
          Paints a single line from x1/y1 to x2/y2.
 void drawRemoval(Graphics g, DockStation station, Rectangle stationBounds, Rectangle dockableBounds)
          Paints some markings when a Dockable is removed from a DockStation.
 Color getColor()
          Deprecated. see setColor(Color)
 void setColor(Color color)
          Deprecated. better use the ColorManager with keys paint.line, paint.divider, paint.insertion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicStationPaint

public BasicStationPaint()
Method Detail

getColor

@Deprecated
public Color getColor()
Deprecated. see setColor(Color)

Gets the color that is used in this paint.

Returns:
the color

setColor

@Deprecated
public void setColor(Color color)
Deprecated. better use the ColorManager with keys paint.line, paint.divider, paint.insertion

Sets the color which is used in this paint.

Parameters:
color - the color or null to use the default-color

drawDivider

public void drawDivider(Graphics g,
                        DockStation station,
                        Rectangle bounds)
Description copied from interface: StationPaint
Draws a divider between two elements.

Specified by:
drawDivider in interface StationPaint
Parameters:
g - the graphics context used for painting
station - the station on which to paint
bounds - the rectangle which marks the whole divider

drawInsertion

public void drawInsertion(Graphics g,
                          DockStation station,
                          Rectangle stationBounds,
                          Rectangle dockableBounds)
Description copied from interface: StationPaint
Paints some markings when a Dockable is added to a DockStation.

Specified by:
drawInsertion in interface StationPaint
Parameters:
g - the graphics context used for painting
station - the station on which to paint
stationBounds - the area on the station which will be affected by the insertion
dockableBounds - the bounds that the new child will have

drawRemoval

public void drawRemoval(Graphics g,
                        DockStation station,
                        Rectangle stationBounds,
                        Rectangle dockableBounds)
Description copied from interface: StationPaint
Paints some markings when a Dockable is removed from a DockStation.

Specified by:
drawRemoval in interface StationPaint
Parameters:
g - the graphics context used for painting
station - the station on which to paint
stationBounds - the area on the station which will be affected by the removal
dockableBounds - the bounds that the old child currently has

drawInsertionLine

public void drawInsertionLine(Graphics g,
                              DockStation station,
                              int x1,
                              int x2,
                              int y1,
                              int y2)
Description copied from interface: StationPaint
Paints a single line from x1/y1 to x2/y2.

Specified by:
drawInsertionLine in interface StationPaint
Parameters:
g - the graphics context used for painting
station - the station on which to paint
x1 - the x-coordinate of the first end of the line
x2 - the y-coordinate of the first end of the line
y1 - the x-coordinate of the second end of the line
y2 - the y-coordinate of the second end of the line