Package com.iizigo.swt
Class ThinBorder
java.lang.Object
javax.swing.border.AbstractBorder
com.iizigo.swt.ThinBorder
- All Implemented Interfaces:
- Serializable,- Border
A class which implements three different kinds of borders:
- The raised bevel border,
- The lowered bevel border,
- The line border.
- The raised bevel border,
- The lowered bevel border,
- The line border.
- Author:
- Christopher Mindus
- See Also:
- Field SummaryFields
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescriptionReturns the insets of the border.- getBorderInsets- (Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.- void- paintBorder- (Component c, 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.- Methods inherited from class javax.swing.border.AbstractBorder- getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
- Field Details- RAISEDpublic static final int RAISEDRaised bevel type.- See Also:
 
- LOWEREDpublic static final int LOWEREDLowered bevel type.- See Also:
 
- LINEpublic static final int LINELine border type.- See Also:
 
 
- Constructor Details- ThinBorderpublic ThinBorder- (int borderType) Creates a bevel border with the specified type. Depending on the type, the correct top and bottom colors will be used.- Parameters:
- borderType- the type of bevel for the border.
 
 
- Method Details- setHorzMarginpublic void setHorzMargin- (int margin) Sets the horizontal margin.
- paintBorderPaints the border for the specified component with the specified position and size.- Specified by:
- paintBorderin interface- Border
- Overrides:
- paintBorderin class- 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
 
- getBorderInsetsReturns the insets of the border.- Specified by:
- getBorderInsetsin interface- Border
- Overrides:
- getBorderInsetsin class- AbstractBorder
- Parameters:
- c- the component for which this border insets value applies
 
- getBorderInsetsReinitialize the insets parameter with this Border's current Insets.- Overrides:
- getBorderInsetsin class- AbstractBorder
- Parameters:
- c- the component for which this border insets value applies.
- insets- the object to be reinitialized.