Pandora.xGui
Class DashedBorder

java.lang.Object
  extended by Pandora.xGui.DashedBorder
All Implemented Interfaces:
java.io.Serializable, javax.swing.border.Border

public class DashedBorder
extends java.lang.Object
implements javax.swing.border.Border, java.io.Serializable

Part of the extra Gui functions.
Implements the dashed border layout of a box.

See Also:
Serialized Form

Constructor Summary
DashedBorder()
          Creates a new DashedBorder.
DashedBorder(java.awt.Color c, int width, int height)
          Creates a new DashedBorder.
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
          Returns the insets of the border.
 boolean isBorderOpaque()
          The border is never opaque so this function returns false.
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashedBorder

public DashedBorder()
Creates a new DashedBorder.
Sets the colour and size of the dashes of the border to 2 (default).


DashedBorder

public DashedBorder(java.awt.Color c,
                    int width,
                    int height)
Creates a new DashedBorder.
Sets the colour and size of the dashes of the border.

Parameters:
c - the colour of the border
width - the size of the dashes
height - the size of the dashes
Method Detail

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.

Specified by:
paintBorder in interface javax.swing.border.Border
Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

isBorderOpaque

public boolean isBorderOpaque()
The border is never opaque so this function returns false.

Specified by:
isBorderOpaque in interface javax.swing.border.Border

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c)
Returns the insets of the border.

Specified by:
getBorderInsets in interface javax.swing.border.Border
Parameters:
c - the component for which this border insets value applies