com.quadrique.jbuildingblocks.gui
Class BorderSide

java.lang.Object
  extended by com.quadrique.jbuildingblocks.gui.BorderSide
All Implemented Interfaces:
Border

public class BorderSide
extends Object
implements Border

This class implements an etched border (can be raised or lowered) on any given side of a component

Author:
Hervé Rivere

Constructor Summary
BorderSide(boolean zIsRaised, boolean zDisplayNorth, boolean zDisplayWest, boolean zDisplaySouth, boolean zDisplayEast)
          constuctor
 
Method Summary
 Insets getBorderInsets(Component zComponent)
           
 boolean isBorderOpaque()
           
 void paintBorder(Component component, Graphics g, int x, int y, int w, int h)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorderSide

public BorderSide(boolean zIsRaised,
                  boolean zDisplayNorth,
                  boolean zDisplayWest,
                  boolean zDisplaySouth,
                  boolean zDisplayEast)
constuctor

Parameters:
zIsRaised - true if the border is to have a raised appearance, false if you want a lowered appearance
zDisplayNorth - true if the top border is to be displayed
zDisplayWest - true if the left border is to be displayed
zDisplaySouth - true if the bottom border is to be displayed
zDisplayEast - true if the right border is to be displayed
Method Detail

getBorderInsets

public Insets getBorderInsets(Component zComponent)
Specified by:
getBorderInsets in interface Border
Parameters:
zComponent - the component
Returns:
the Insets to use for the class
See Also:
Border, Insets

paintBorder

public void paintBorder(Component component,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Specified by:
paintBorder in interface Border
Parameters:
component - the component
g - the graphic context
x - the x location of the upper left corner
y - the y location of the upper left corner
w - the width of the component
h - the heigth of the component
See Also:
Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface Border
Returns:
true if the border is opaque


Copyright © 2001-2009 Quadrique Corporation. All Rights Reserved.