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

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.RectEclipseBorder
All Implemented Interfaces:
javax.swing.border.Border
Direct Known Subclasses:
OwnedRectEclipseBorder

public class RectEclipseBorder
extends java.lang.Object
implements javax.swing.border.Border

This border paints a thin line. The edges are either painted as little curve or as hard edge, depending on the arguments used on setRoundEdges(int).

Author:
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
RectEclipseBorder(DockController controller, boolean fillEdges)
          Creates a new border.
RectEclipseBorder(DockController controller, boolean fillEdges, int roundEdges)
          Creates a new border.
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
           
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
           
 void setRoundEdges(int roundEdges)
          Sets the edges which have to be painted round, see TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT and BOTTOM_RIGHT.
 
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

RectEclipseBorder

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

Parameters:
controller - the controller for which this border will be used
fillEdges - whether the top edges should be filled with the background color or let empty.

RectEclipseBorder

public RectEclipseBorder(DockController controller,
                         boolean fillEdges,
                         int roundEdges)
Creates a new border.

Parameters:
controller - the controller for which this border will be used
fillEdges - whether the top edges should be filled with the background color or let empty.
roundEdges - which edges to paint round
Method Detail

setRoundEdges

public void setRoundEdges(int roundEdges)
Sets the edges which have to be painted round, see TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT and BOTTOM_RIGHT.

Parameters:
roundEdges - the round edges

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface javax.swing.border.Border

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c)
Specified by:
getBorderInsets in interface javax.swing.border.Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface javax.swing.border.Border