Package org.sm.smtools.swing.util
Class JTriggeredButtonBorder
java.lang.Object
javax.swing.border.AbstractBorder
org.sm.smtools.swing.util.JTriggeredButtonBorder
- All Implemented Interfaces:
Serializable
,Border
The
JTriggeredButtonBorder
class provides a special border for the JTriggeredButton
class.
Note that this class cannot be subclassed!
- Version:
- 22/04/2002
- Author:
- Sven Maerivoet
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates aJTriggeredButtonBorder
with default dark gray and white border colors.JTriggeredButtonBorder
(boolean isBackgroundDark, boolean isSunk) Creates aJTriggeredButtonBorder
with specfied border colors. -
Method Summary
Modifier and TypeMethodDescriptionReturns the margins used by the borderboolean
This method always returnsfalse
because the border is made transparent.void
paintBorder
(Component component, Graphics gr, int x, int y, int width, int height) void
Sets the margins used by the border.Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
Constructor Details
-
JTriggeredButtonBorder
public JTriggeredButtonBorder()Creates aJTriggeredButtonBorder
with default dark gray and white border colors. -
JTriggeredButtonBorder
public JTriggeredButtonBorder(boolean isBackgroundDark, boolean isSunk) Creates aJTriggeredButtonBorder
with specfied border colors.- Parameters:
isBackgroundDark
- if the background is dark, this flag specifies the use of a light border colorisSunk
- specifies whether or not the border is sunk or raised- See Also:
-
-
Method Details
-
setInsets
Sets the margins used by the border.- Parameters:
insets
- the margins used by the border- See Also:
-
getBorderInsets
Returns the margins used by the borderNote that this method does not return the insets of the specified component!
- Specified by:
getBorderInsets
in interfaceBorder
- Overrides:
getBorderInsets
in classAbstractBorder
- Returns:
- the margins used by this border
- See Also:
-
paintBorder
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classAbstractBorder
-
isBorderOpaque
public boolean isBorderOpaque()This method always returnsfalse
because the border is made transparent.- Specified by:
isBorderOpaque
in interfaceBorder
- Overrides:
isBorderOpaque
in classAbstractBorder
- Returns:
- always
false
-