repaint component when setting client property JComponent.outline (issue #480)

This commit is contained in:
Karl Tauber
2022-02-16 23:53:21 +01:00
parent df6256d989
commit 4174b065f3
7 changed files with 17 additions and 1 deletions

View File

@@ -1,6 +1,12 @@
FlatLaf Change Log FlatLaf Change Log
================== ==================
## 2.1-SNAPSHOT
- Repaint component when setting client property `JComponent.outline` (issue
#480).
## 2.0.1 ## 2.0.1
- Fixed memory leak in Panel, Separator and ToolBarSeparator. (issue #471; - Fixed memory leak in Panel, Separator and ToolBarSeparator. (issue #471;

View File

@@ -262,6 +262,10 @@ public class FlatButtonUI
b.repaint(); b.repaint();
break; break;
case OUTLINE:
b.repaint();
break;
case STYLE: case STYLE:
case STYLE_CLASS: case STYLE_CLASS:
if( shared && FlatStylingSupport.hasStyleProperty( b ) ) { if( shared && FlatStylingSupport.hasStyleProperty( b ) ) {

View File

@@ -354,6 +354,7 @@ public class FlatComboBoxUI
break; break;
case COMPONENT_ROUND_RECT: case COMPONENT_ROUND_RECT:
case OUTLINE:
comboBox.repaint(); comboBox.repaint();
break; break;

View File

@@ -291,6 +291,10 @@ public class FlatScrollPaneUI
} }
break; break;
case FlatClientProperties.OUTLINE:
scrollpane.repaint();
break;
case FlatClientProperties.STYLE: case FlatClientProperties.STYLE:
case FlatClientProperties.STYLE_CLASS: case FlatClientProperties.STYLE_CLASS:
installStyle(); installStyle();

View File

@@ -538,6 +538,7 @@ public class FlatSpinnerUI
break; break;
case FlatClientProperties.COMPONENT_ROUND_RECT: case FlatClientProperties.COMPONENT_ROUND_RECT:
case FlatClientProperties.OUTLINE:
spinner.repaint(); spinner.repaint();
break; break;

View File

@@ -232,6 +232,7 @@ public class FlatTextFieldUI
switch( e.getPropertyName() ) { switch( e.getPropertyName() ) {
case PLACEHOLDER_TEXT: case PLACEHOLDER_TEXT:
case COMPONENT_ROUND_RECT: case COMPONENT_ROUND_RECT:
case OUTLINE:
case TEXT_FIELD_PADDING: case TEXT_FIELD_PADDING:
c.repaint(); c.repaint();
break; break;

View File

@@ -162,7 +162,6 @@ public class FlatComponentsTest
((JComponent)c).putClientProperty( FlatClientProperties.OUTLINE, outline ); ((JComponent)c).putClientProperty( FlatClientProperties.OUTLINE, outline );
} ); } );
repaint();
textField1.requestFocusInWindow(); textField1.requestFocusInWindow();
} }