Package org.jdesktop.swingx.plaf
Class SafeBorder
java.lang.Object
javax.swing.border.AbstractBorder
org.jdesktop.swingx.plaf.SafeBorder
- All Implemented Interfaces:
Serializable
,Border
,UIResource
Wrapper around a delegate with the same behaviour as the delegate except that
it catches null insets (hack around Issue 1297-swingx which is core bug
6739738)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getBaseline
(Component c, int width, int height) getBorderInsets
(Component c, Insets insets) getInteriorRectangle
(Component c, int x, int y, int width, int height) boolean
void
paintBorder
(Component c, Graphics g, int x, int y, int width, int height) private Insets
safeInsets
(Insets insets) Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle
-
Field Details
-
delegate
-
-
Constructor Details
-
SafeBorder
-
-
Method Details
-
getBaseline
- Overrides:
getBaseline
in classAbstractBorder
-
getBaselineResizeBehavior
- Overrides:
getBaselineResizeBehavior
in classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsets
in classAbstractBorder
-
safeInsets
- Parameters:
insets
- the insets to query- Returns:
- the insets supplied or an empty insets if the value is
null
-
getBorderInsets
- Specified by:
getBorderInsets
in interfaceBorder
- Overrides:
getBorderInsets
in classAbstractBorder
-
getInteriorRectangle
- Overrides:
getInteriorRectangle
in classAbstractBorder
-
isBorderOpaque
public boolean isBorderOpaque()- Specified by:
isBorderOpaque
in interfaceBorder
- Overrides:
isBorderOpaque
in classAbstractBorder
-
paintBorder
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classAbstractBorder
-