Package com.jidesoft.swing
Class PartialLineBorder
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- javax.swing.border.LineBorder
-
- com.jidesoft.swing.PartialLineBorder
-
- All Implemented Interfaces:
PartialSide
,java.io.Serializable
,javax.swing.border.Border
public class PartialLineBorder extends javax.swing.border.LineBorder implements PartialSide
This is a better version of LineBorder which allows you to show line only at one side or several sides and supports rounded corner.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.jidesoft.swing.PartialSide
ALL, EAST, HORIZONTAL, NORTH, SOUTH, VERTICAL, WEST
-
-
Constructor Summary
Constructors Constructor Description PartialLineBorder(java.awt.Color color)
PartialLineBorder(java.awt.Color color, int thickness)
PartialLineBorder(java.awt.Color color, int thickness, boolean roundedCorners)
PartialLineBorder(java.awt.Color color, int thickness, boolean roundedCorners, int roundedCornerSize)
PartialLineBorder(java.awt.Color color, int thickness, int side)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Insets
getBorderInsets(java.awt.Component c)
java.awt.Insets
getBorderInsets(java.awt.Component c, java.awt.Insets insets)
int
getRoundedCornerSize()
int
getSides()
void
paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
void
setRoundedCornerSize(int roundedCornerSize)
void
setSides(int sides)
-
Methods inherited from class javax.swing.border.LineBorder
createBlackLineBorder, createGrayLineBorder, getLineColor, getRoundedCorners, getThickness, isBorderOpaque
-
-
-
-
Constructor Detail
-
PartialLineBorder
public PartialLineBorder(java.awt.Color color)
-
PartialLineBorder
public PartialLineBorder(java.awt.Color color, int thickness)
-
PartialLineBorder
public PartialLineBorder(java.awt.Color color, int thickness, boolean roundedCorners)
-
PartialLineBorder
public PartialLineBorder(java.awt.Color color, int thickness, boolean roundedCorners, int roundedCornerSize)
-
PartialLineBorder
public PartialLineBorder(java.awt.Color color, int thickness, int side)
-
-
Method Detail
-
getSides
public int getSides()
-
setSides
public void setSides(int sides)
-
getRoundedCornerSize
public int getRoundedCornerSize()
-
setRoundedCornerSize
public void setRoundedCornerSize(int roundedCornerSize)
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
- Specified by:
paintBorder
in interfacejavax.swing.border.Border
- Overrides:
paintBorder
in classjavax.swing.border.LineBorder
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Specified by:
getBorderInsets
in interfacejavax.swing.border.Border
- Overrides:
getBorderInsets
in classjavax.swing.border.AbstractBorder
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
- Overrides:
getBorderInsets
in classjavax.swing.border.LineBorder
-
-