@ColorCodes(value={"paint.line","paint.divider","paint.insertion","paint.removal"}) public class BasicStationPaint extends Object implements StationPaint
StationPaint. This paint uses
one color to draw various elements.| Constructor and Description |
|---|
BasicStationPaint() |
| Modifier and Type | Method and Description |
|---|---|
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 |
@Deprecated public Color getColor()
setColor(Color)@Deprecated public void setColor(Color color)
ColorManager with keys
paint.line, paint.divider, paint.insertioncolor - the color or null to use the default-colorpublic void drawDivider(Graphics g, DockStation station, Rectangle bounds)
StationPaintdrawDivider in interface StationPaintg - the graphics context used for paintingstation - the station on which to paintbounds - the rectangle which marks the whole dividerpublic void drawInsertion(Graphics g, DockStation station, Rectangle stationBounds, Rectangle dockableBounds)
StationPaintDockable is added to a DockStation.drawInsertion in interface StationPaintg - the graphics context used for paintingstation - the station on which to paintstationBounds - the area on the station which will be affected by the insertiondockableBounds - the bounds that the new child will havepublic void drawRemoval(Graphics g, DockStation station, Rectangle stationBounds, Rectangle dockableBounds)
StationPaintDockable is removed from a DockStation.drawRemoval in interface StationPaintg - the graphics context used for paintingstation - the station on which to paintstationBounds - the area on the station which will be affected by the removaldockableBounds - the bounds that the old child currently haspublic void drawInsertionLine(Graphics g, DockStation station, int x1, int x2, int y1, int y2)
StationPaintdrawInsertionLine in interface StationPaintg - the graphics context used for paintingstation - the station on which to paintx1 - the x-coordinate of the first end of the linex2 - the y-coordinate of the first end of the liney1 - the x-coordinate of the second end of the liney2 - the y-coordinate of the second end of the lineCopyright © 2017 Docking Frames. All rights reserved.