org.openbp.swing.components.wizard
Class EdgeBorder

java.lang.Object
  extended by org.openbp.swing.components.wizard.EdgeBorder
All Implemented Interfaces:
javax.swing.border.Border, javax.swing.SwingConstants

public class EdgeBorder
extends java.lang.Object
implements javax.swing.border.Border, javax.swing.SwingConstants

Edge border.

Author:
Heiko Erhardt

Field Summary
protected  int edgePosition
          Edge position (SwingConstants.NORTH/SwingConstants.SOUTH/SwingConstants.EAST/SwingConstants.WEST)
static int LOWERED
          Lowered border
static int RAISED
          Raised border
protected  int style
          Border style (RAISED/LOWERED)
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
EdgeBorder()
          Constructor.
EdgeBorder(int edgePosition)
          Constructor.
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component comp)
          Gets the border insets according to the edge position.
 boolean isBorderOpaque()
          Determines if the border is opaque.
 void paintBorder(java.awt.Component component, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the border.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RAISED

public static final int RAISED
Raised border

See Also:
Constant Field Values

LOWERED

public static final int LOWERED
Lowered border

See Also:
Constant Field Values

edgePosition

protected int edgePosition
Edge position (SwingConstants.NORTH/SwingConstants.SOUTH/SwingConstants.EAST/SwingConstants.WEST)


style

protected int style
Border style (RAISED/LOWERED)

Constructor Detail

EdgeBorder

public EdgeBorder()
Constructor.


EdgeBorder

public EdgeBorder(int edgePosition)
Constructor.

Parameters:
edgePosition - Edge position (SwingConstants.NORTH/SwingConstants.SOUTH/SwingConstants.EAST/SwingConstants.WEST)
Method Detail

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component comp)
Gets the border insets according to the edge position.

Specified by:
getBorderInsets in interface javax.swing.border.Border
Parameters:
comp - Not used
Returns:
The insets

isBorderOpaque

public boolean isBorderOpaque()
Determines if the border is opaque.

Specified by:
isBorderOpaque in interface javax.swing.border.Border
Returns:
Always true

paintBorder

public void paintBorder(java.awt.Component component,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Paints the border.

Specified by:
paintBorder in interface javax.swing.border.Border
Parameters:
component - Component
g - Graphics context
x - X position
y - Y position
w - Width
h - Height


Copyright © 2011. All Rights Reserved.