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

added the possibility to customize TitleLabel

parent 41579162
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ import fr.soleil.lib.project.swing.text.DynamicForegroundLabel; ...@@ -44,7 +44,7 @@ import fr.soleil.lib.project.swing.text.DynamicForegroundLabel;
*/ */
public class ColoredLineTitledBorder extends AbstractBorder { public class ColoredLineTitledBorder extends AbstractBorder {
private static final long serialVersionUID = 3133459972889696986L; private static final long serialVersionUID = -4976572560413248949L;
/** The default border line color to use. */ /** The default border line color to use. */
protected static final Color DEFAULT_LINE_COLOR; protected static final Color DEFAULT_LINE_COLOR;
...@@ -165,10 +165,15 @@ public class ColoredLineTitledBorder extends AbstractBorder { ...@@ -165,10 +165,15 @@ public class ColoredLineTitledBorder extends AbstractBorder {
this.titleColor = titleColor; this.titleColor = titleColor;
this.lineColor = border.getLineColor(); this.lineColor = border.getLineColor();
label = new TitleLabel(); label = generateTitleLabel();
}
protected TitleLabel generateTitleLabel() {
TitleLabel label = new TitleLabel();
label.setForeground(titleColor); label.setForeground(titleColor);
label.setOpaque(false); label.setOpaque(false);
label.setFont(DEFAULT_TITLE_FONT); label.setFont(DEFAULT_TITLE_FONT);
return label;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment