Package org.sm.smtools.swing.util
Class JTriggeredButtonBorder
java.lang.Object
javax.swing.border.AbstractBorder
org.sm.smtools.swing.util.JTriggeredButtonBorder
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.border.Border
public final class JTriggeredButtonBorder
extends javax.swing.border.AbstractBorder
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:
JTriggeredButton
, Serialized Form
-
Constructor Summary
Constructors Constructor Description JTriggeredButtonBorder()
Creates aJTriggeredButtonBorder
with default dark gray and white border colors.JTriggeredButtonBorder(boolean isBackgroundDark, boolean isSunk)
Creates aJTriggeredButtonBorder
with specfied border colors. -
Method Summary
Modifier and Type Method Description java.awt.Insets
getBorderInsets(java.awt.Component c)
Returns the margins used by the borderboolean
isBorderOpaque()
This method always returnsfalse
because the border is made transparent.void
paintBorder(java.awt.Component component, java.awt.Graphics gr, int x, int y, int width, int height)
void
setInsets(java.awt.Insets insets)
Sets the margins used by the border.Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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:
JTriggeredButtonBorder()
,JTriggeredButton
-
-
Method Details
-
setInsets
public void setInsets(java.awt.Insets insets)Sets the margins used by the border.- Parameters:
insets
- the margins used by the border- See Also:
getBorderInsets(Component)
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)Returns the margins used by the borderNote that this method does not return the insets of the specified component!
- Specified by:
getBorderInsets
in interfacejavax.swing.border.Border
- Overrides:
getBorderInsets
in classjavax.swing.border.AbstractBorder
- Returns:
- the margins used by this border
- See Also:
setInsets(Insets)
-
paintBorder
public void paintBorder(java.awt.Component component, java.awt.Graphics gr, int x, int y, int width, int height)- Specified by:
paintBorder
in interfacejavax.swing.border.Border
- Overrides:
paintBorder
in classjavax.swing.border.AbstractBorder
-
isBorderOpaque
public boolean isBorderOpaque()This method always returnsfalse
because the border is made transparent.- Specified by:
isBorderOpaque
in interfacejavax.swing.border.Border
- Overrides:
isBorderOpaque
in classjavax.swing.border.AbstractBorder
- Returns:
- always
false
-