bibliothek.gui.dock.station
Interface StationPaint

All Known Implementing Classes:
BasicStationPaint, BubbleStationPaint, EclipseStationPaint, FlatStationPaint, ThemeStationPaint

public interface StationPaint

A StationPaint draws some parts of DockStation. All the default-stations use a StationPaint to draw some markings when a Dockable is moved or dragged.

Author:
Benjamin Sigg

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 y1, int x2, 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.
 

Method Detail

drawInsertionLine

void drawInsertionLine(Graphics g,
                       DockStation station,
                       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
station - the station on which to paint
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

drawDivider

void drawDivider(Graphics g,
                 DockStation station,
                 Rectangle bounds)
Draws a divider between two elements.

Parameters:
g - the graphics context used for painting
station - the station on which to paint
bounds - the rectangle which marks the whole divider

drawInsertion

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

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

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

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