org.tbee.swing
Class LineBorder

java.lang.Object
  extended by org.tbee.swing.LineBorder
All Implemented Interfaces:
Border

public class LineBorder
extends Object
implements Border

A line border, which allows for: - custom sizes per side of the border (top, left, bottom, right) - custom margins between the visual border and the component per side of the border (top, left, bottom, right)

Version:
$Revision: 1.1 $

Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
LineBorder()
          JLabel's forground, 1 pixel, no margin
LineBorder(Color color)
          1 pixel, no margin
LineBorder(Color color, int top, int right, int bottom, int left)
          no margin
LineBorder(Color color, int top, int right, int bottom, int left, int topMargin, int rightMargin, int bottomMargin, int leftMargin)
           
 
Method Summary
 Insets getBorderInsets(Component c)
           
 int getBottom()
           
 int getBottomMargin()
           
 Color getColor()
           
 int getLeft()
           
 int getLeftMargin()
           
 int getRight()
           
 int getRightMargin()
           
 int getTop()
           
 int getTopMargin()
           
 boolean isBorderOpaque()
           
 void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void setBottom(int value)
           
 void setBottomMargin(int value)
           
 void setColor(Color value)
           
 void setLeft(int value)
           
 void setLeftMargin(int value)
           
 void setRight(int value)
           
 void setRightMargin(int value)
           
 void setTop(int value)
           
 void setTopMargin(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

LineBorder

public LineBorder()
JLabel's forground, 1 pixel, no margin


LineBorder

public LineBorder(Color color)
1 pixel, no margin

Parameters:
color -

LineBorder

public LineBorder(Color color,
                  int top,
                  int right,
                  int bottom,
                  int left)
no margin

Parameters:
color -
top -
right -
bottom -
left -

LineBorder

public LineBorder(Color color,
                  int top,
                  int right,
                  int bottom,
                  int left,
                  int topMargin,
                  int rightMargin,
                  int bottomMargin,
                  int leftMargin)
Parameters:
color -
top -
right -
bottom -
left -
topMargin -
rightMargin -
bottomMargin -
leftMargin -
Method Detail

getColor

public Color getColor()

setColor

public void setColor(Color value)

getTop

public int getTop()

setTop

public void setTop(int value)

getRight

public int getRight()

setRight

public void setRight(int value)

getBottom

public int getBottom()

setBottom

public void setBottom(int value)

getLeft

public int getLeft()

setLeft

public void setLeft(int value)

getTopMargin

public int getTopMargin()

setTopMargin

public void setTopMargin(int value)

getRightMargin

public int getRightMargin()

setRightMargin

public void setRightMargin(int value)

getBottomMargin

public int getBottomMargin()

setBottomMargin

public void setBottomMargin(int value)

getLeftMargin

public int getLeftMargin()

setLeftMargin

public void setLeftMargin(int value)

getBorderInsets

public Insets getBorderInsets(Component c)
Specified by:
getBorderInsets in interface Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface Border

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int w,
                        int h)
Specified by:
paintBorder in interface Border


Copyright © 2012 KnowledgePlaza. All Rights Reserved.