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.AbstractBorderA 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.InsetsgetBorderInsets(java.awt.Component c)java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets insets)intgetCap()float[]getDashArray()floatgetDashPhase()intgetJoin()floatgetPenSize()java.awt.ColorgetStrokeColor()voidpaintBorder(java.awt.Component c, java.awt.Graphics g1, int x, int y, int width, int height)voidsetCap(int cap)voidsetDashArray(float[] dashArray)Sets the dash array for the border; may be null for a solid line.voidsetDashPhase(float dashPhase)voidsetJoin(int join)voidsetPenSize(float penSize)voidsetStrokeColor(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:
getBorderInsetsin interfacejavax.swing.border.Border- Overrides:
getBorderInsetsin classjavax.swing.border.AbstractBorder
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)- Overrides:
getBorderInsetsin 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:
paintBorderin interfacejavax.swing.border.Border- Overrides:
paintBorderin classjavax.swing.border.AbstractBorder
-
-