This commit is contained in:
Dmitry Avdeev
2012-03-06 16:47:51 +04:00
parent cd904178ec
commit ea8db4765e
@@ -27,7 +27,7 @@ import java.awt.*;
public class JBLabel extends JLabel implements AnchorableComponent {
private UIUtil.ComponentStyle myComponentStyle = UIUtil.ComponentStyle.REGULAR;
private UIUtil.FontColor myFontColor = UIUtil.FontColor.NORMAL;
private boolean fontColorSetted = false;
private boolean myFontColorSet = false;
private JComponent myAnchor = null;
public JBLabel() {
@@ -86,12 +86,12 @@ public class JBLabel extends JLabel implements AnchorableComponent {
public void setFontColor(@NotNull UIUtil.FontColor fontColor) {
myFontColor = fontColor;
setForeground(UIUtil.getLabelFontColor(myFontColor));
fontColorSetted = true;
myFontColorSet = true;
}
@Override
public void setForeground(Color fg) {
if (!fontColorSetted) super.setForeground(fg);
if (!myFontColorSet) super.setForeground(fg);
}
@Override