Skip to content
Snippets Groups Projects
Commit 632be170 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

Added the possibility to set line thickness

parent a4ddd048
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ import javax.swing.border.LineBorder;
*/
public class SettableColorLineBorder extends LineBorder {
private static final long serialVersionUID = -1893539307265995931L;
private static final long serialVersionUID = -954792311453371930L;
public SettableColorLineBorder(Color color, int thickness, boolean roundedCorners) {
super(color == null ? Color.BLACK : color, thickness, roundedCorners);
......@@ -34,4 +34,13 @@ public class SettableColorLineBorder extends LineBorder {
this.lineColor = color == null ? Color.BLACK : color;
}
/**
* Sets this {@link SettableColorLineBorder}'s line thickness.
*
* @param thickness The line thickness to set.
*/
public void setThickness(int thickness) {
this.thickness = thickness < 0 ? 0 : thickness;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment