bibliothek.extension.gui.dock.theme.eclipse
Class EclipseBorder

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.EclipseBorder
All Implemented Interfaces:
Border
Direct Known Subclasses:
OwnedEclipseBorder

@ColorCodes(value="stack.border")
public class EclipseBorder
extends Object
implements Border

A border that has round edges.

Author:
Janni Kovacs, Benjamin Sigg

Field Summary
static int BOTTOM_LEFT
          constant indicating the bottom left edge has to be painted round
static int BOTTOM_RIGHT
          constant indicating the bottom right edge has to be painted round
static int TOP_LEFT
          constant indicating the top left edge has to be painted round
static int TOP_RIGHT
          constant indicating the top right edge has to be painted round
 
Constructor Summary
EclipseBorder(DockController controller, boolean fillEdges)
          Creates a new border
EclipseBorder(DockController controller, boolean fillEdges, int edges)
          Creates a new border
 
Method Summary
 Insets getBorderInsets(Component c)
           
 int getRoundEdges()
          Tells which edges are painted round.
 boolean isBorderOpaque()
           
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void setRoundEdges(int roundEdges)
          Sets which edges are painted round.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final int TOP_LEFT
constant indicating the top left edge has to be painted round

See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
constant indicating the top right edge has to be painted round

See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
constant indicating the bottom left edge has to be painted round

See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
constant indicating the bottom right edge has to be painted round

See Also:
Constant Field Values
Constructor Detail

EclipseBorder

public EclipseBorder(DockController controller,
                     boolean fillEdges)
Creates a new border

Parameters:
controller - the owner of this border
fillEdges - whether to paint over the edges

EclipseBorder

public EclipseBorder(DockController controller,
                     boolean fillEdges,
                     int edges)
Creates a new border

Parameters:
controller - the owner of this border
fillEdges - whether to paint over the edges
edges - the edges that are painted round, or-ed from TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT and BOTTOM_RIGHT
Method Detail

setRoundEdges

public void setRoundEdges(int roundEdges)
Sets which edges are painted round.

Parameters:
roundEdges - the edges to paint round

getRoundEdges

public int getRoundEdges()
Tells which edges are painted round.

Returns:
the round edges

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface Border

getBorderInsets

public Insets getBorderInsets(Component c)
Specified by:
getBorderInsets in interface Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface Border