Package ca.cgjennings.ui
Class StrokedBorder
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- ca.cgjennings.ui.StrokedBorder
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.border.Border
public class StrokedBorder extends javax.swing.border.AbstractBorder
A border that displays a dashed line around a component.- Author:
- Chris Jennings
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StrokedBorder()
StrokedBorder(java.awt.Color strokeColor, float penSize, int cap, int join, float[] dashArray, float dashPhase)
-
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
getCap()
float[]
getDashArray()
float
getDashPhase()
int
getJoin()
float
getPenSize()
java.awt.Color
getStrokeColor()
void
paintBorder(java.awt.Component c, java.awt.Graphics g1, int x, int y, int width, int height)
void
setCap(int cap)
void
setDashArray(float[] dashArray)
Sets the dash array for the border; may be null for a solid line.void
setDashPhase(float dashPhase)
void
setJoin(int join)
void
setPenSize(float penSize)
void
setStrokeColor(java.awt.Color strokeColor)
-
-
-
Method Detail
-
getDashArray
public float[] getDashArray()
-
setDashArray
public void setDashArray(float[] dashArray)
Sets the dash array for the border; may be null for a solid line.- Parameters:
dashArray
-
-
getDashPhase
public float getDashPhase()
-
setDashPhase
public void setDashPhase(float dashPhase)
-
getPenSize
public float getPenSize()
-
setPenSize
public void setPenSize(float penSize)
-
getCap
public int getCap()
-
setCap
public void setCap(int cap)
-
getJoin
public int getJoin()
-
setJoin
public void setJoin(int join)
-
getStrokeColor
public java.awt.Color getStrokeColor()
-
setStrokeColor
public void setStrokeColor(java.awt.Color strokeColor)
-
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.AbstractBorder
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g1, int x, int y, int width, int height)
- Specified by:
paintBorder
in interfacejavax.swing.border.Border
- Overrides:
paintBorder
in classjavax.swing.border.AbstractBorder
-
-