Styling: renamed client property JComponent.style to FlatLaf.style

This commit is contained in:
Karl Tauber
2021-06-19 11:14:33 +02:00
parent b4a9c9b7f5
commit ab4c9bdeda
11 changed files with 18 additions and 18 deletions

View File

@@ -134,7 +134,7 @@ public interface FlatClientProperties
*
* @since TODO
*/
String COMPONENT_STYLE = "JComponent.style";
String STYLE = "FlatLaf.style";
/**
* Specifies minimum width of a component.

View File

@@ -155,7 +155,7 @@ public class FlatEditorPaneUI
c.revalidate();
break;
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle.accept( e.getNewValue() );
c.revalidate();
c.repaint();

View File

@@ -102,7 +102,7 @@ public class FlatProgressBarUI
progressBar.repaint();
break;
case COMPONENT_STYLE:
case STYLE:
applyStyle( e.getNewValue() );
progressBar.revalidate();
progressBar.repaint();

View File

@@ -131,7 +131,7 @@ public class FlatRadioButtonUI
*/
protected void propertyChange( AbstractButton b, PropertyChangeEvent e ) {
switch( e.getPropertyName() ) {
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle( b, this, e.getNewValue() );
break;
}

View File

@@ -193,7 +193,7 @@ public class FlatScrollBarUI
scrollbar.repaint();
break;
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle( e.getNewValue() );
scrollbar.revalidate();
scrollbar.repaint();

View File

@@ -109,7 +109,7 @@ public class FlatSeparatorUI
propertyChangeListener = e -> {
switch( e.getPropertyName() ) {
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle( s, this, e.getNewValue() );
s.revalidate();
s.repaint();

View File

@@ -190,7 +190,7 @@ public class FlatSliderUI
superListener.propertyChange( e );
switch( e.getPropertyName() ) {
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle( e.getNewValue() );
slider.revalidate();
slider.repaint();

View File

@@ -119,7 +119,7 @@ public class FlatSplitPaneUI
propertyChangeListener = e -> {
switch( e.getPropertyName() ) {
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle( e.getNewValue() );
splitPane.revalidate();
splitPane.repaint();

View File

@@ -216,7 +216,7 @@ public class FlatStyleSupport
}
public static Object getStyle( JComponent c ) {
return c.getClientProperty( FlatClientProperties.COMPONENT_STYLE );
return c.getClientProperty( FlatClientProperties.STYLE );
}
static Border cloneBorder( Border border ) {

View File

@@ -182,7 +182,7 @@ public class FlatTextFieldUI
c.revalidate();
break;
case FlatClientProperties.COMPONENT_STYLE:
case FlatClientProperties.STYLE:
applyStyle.accept( e.getNewValue() );
c.revalidate();
c.repaint();