Package com.iizigo.swt
Class ThinBorder
- java.lang.Object
- javax.swing.border.AbstractBorder
- com.iizigo.swt.ThinBorder
 
 
- All Implemented Interfaces:
- java.io.Serializable,- javax.swing.border.Border
 - public class ThinBorder extends javax.swing.border.AbstractBorderA class which implements three different kinds of borders:
 - The raised bevel border,
 - The lowered bevel border,
 - The line border.- Author:
- Christopher Mindus
- See Also:
- Serialized Form
 
- Constructor Summary- Constructors - Constructor - Description - ThinBorder(int borderType)Creates a bevel border with the specified type.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - java.awt.Insets- getBorderInsets(java.awt.Component c)Returns the insets of the border.- java.awt.Insets- getBorderInsets(java.awt.Component c, java.awt.Insets insets)Reinitialize the insets parameter with this Border's current Insets.- 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.- void- setHorzMargin(int margin)Sets the horizontal margin.
 
- Field Detail- RAISED- public static final int RAISED Raised bevel type.- See Also:
- Constant Field Values
 
 - LOWERED- public static final int LOWERED Lowered bevel type.- See Also:
- Constant Field Values
 
 - LINE- public static final int LINE Line border type.- See Also:
- Constant Field Values
 
 
 - Method Detail- setHorzMargin- public void setHorzMargin(int margin) Sets the horizontal margin.
 - 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:
- paintBorderin interface- javax.swing.border.Border
- Overrides:
- paintBorderin class- javax.swing.border.AbstractBorder
- 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
 
 - getBorderInsets- public java.awt.Insets getBorderInsets(java.awt.Component c) Returns the insets of the border.- Specified by:
- getBorderInsetsin interface- javax.swing.border.Border
- Overrides:
- getBorderInsetsin class- javax.swing.border.AbstractBorder
- Parameters:
- c- the component for which this border insets value applies
 
 - getBorderInsets- public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)Reinitialize the insets parameter with this Border's current Insets.- Overrides:
- getBorderInsetsin class- javax.swing.border.AbstractBorder
- Parameters:
- c- the component for which this border insets value applies.
- insets- the object to be reinitialized.