glass.eclipse.theme
Class CEclipseBorder

java.lang.Object
  extended by glass.eclipse.theme.CEclipseBorder
All Implemented Interfaces:
Border

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

A border that has round edges.

Author:
Thomas Hilbert

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
protected  int iCornerRadius
           
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
CEclipseBorder(bibliothek.gui.DockController controller, int cornerRadius, bibliothek.extension.gui.dock.theme.eclipse.stack.tab.BorderedComponent owner)
          Creates a new border
CEclipseBorder(bibliothek.gui.DockController controller, int cornerRadius, int edges)
          Creates a new border
 
Method Summary
protected  Path2D createShape(int x, int y, int w, int h)
           
 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 SetCornerRadius(int radius)
           
 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

iCornerRadius

protected int iCornerRadius
Constructor Detail

CEclipseBorder

public CEclipseBorder(bibliothek.gui.DockController controller,
                      int cornerRadius,
                      bibliothek.extension.gui.dock.theme.eclipse.stack.tab.BorderedComponent owner)
Creates a new border

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

CEclipseBorder

public CEclipseBorder(bibliothek.gui.DockController controller,
                      int cornerRadius,
                      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

SetCornerRadius

public void SetCornerRadius(int radius)

createShape

protected Path2D createShape(int x,
                             int y,
                             int w,
                             int h)

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