mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Styling: renamed "update" methods
This commit is contained in:
@@ -58,7 +58,7 @@ public class FlatArrowButton
|
||||
Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground )
|
||||
{
|
||||
super( direction, Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE );
|
||||
update( type, foreground, disabledForeground, hoverForeground, hoverBackground,
|
||||
updateStyle( type, foreground, disabledForeground, hoverForeground, hoverBackground,
|
||||
pressedForeground, pressedBackground );
|
||||
|
||||
setOpaque( false );
|
||||
@@ -98,7 +98,7 @@ public class FlatArrowButton
|
||||
/**
|
||||
* @since TODO
|
||||
*/
|
||||
public void update( String type, Color foreground, Color disabledForeground,
|
||||
public void updateStyle( String type, Color foreground, Color disabledForeground,
|
||||
Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground )
|
||||
{
|
||||
this.chevron = FlatUIUtils.isChevron( type );
|
||||
|
||||
@@ -222,9 +222,9 @@ public class FlatScrollBarUI
|
||||
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
|
||||
|
||||
if( incrButton instanceof FlatScrollBarButton )
|
||||
((FlatScrollBarButton)incrButton).update();
|
||||
((FlatScrollBarButton)incrButton).updateStyle();
|
||||
if( decrButton instanceof FlatScrollBarButton )
|
||||
((FlatScrollBarButton)decrButton).update();
|
||||
((FlatScrollBarButton)decrButton).updateStyle();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -424,8 +424,8 @@ public class FlatScrollBarUI
|
||||
setRequestFocusEnabled( false );
|
||||
}
|
||||
|
||||
protected void update() {
|
||||
update( arrowType, buttonArrowColor, buttonDisabledArrowColor,
|
||||
protected void updateStyle() {
|
||||
updateStyle( arrowType, buttonArrowColor, buttonDisabledArrowColor,
|
||||
null, hoverButtonBackground, null, pressedButtonBackground );
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ public class FlatSpinnerUI
|
||||
*/
|
||||
protected void applyStyle( Object style ) {
|
||||
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
|
||||
updateArrowButtons();
|
||||
updateArrowButtonsStyle();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,10 +309,10 @@ public class FlatSpinnerUI
|
||||
return button;
|
||||
}
|
||||
|
||||
private void updateArrowButtons() {
|
||||
private void updateArrowButtonsStyle() {
|
||||
for( Component c : spinner.getComponents() ) {
|
||||
if( c instanceof FlatArrowButton ) {
|
||||
((FlatArrowButton)c).update( arrowType, buttonArrowColor,
|
||||
((FlatArrowButton)c).updateStyle( arrowType, buttonArrowColor,
|
||||
buttonDisabledArrowColor, buttonHoverArrowColor, null, buttonPressedArrowColor, null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class FlatSplitPaneUI
|
||||
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
|
||||
|
||||
if( divider instanceof FlatSplitPaneDivider )
|
||||
((FlatSplitPaneDivider)divider).updateButtons();
|
||||
((FlatSplitPaneDivider)divider).updateStyle();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,11 +180,11 @@ public class FlatSplitPaneUI
|
||||
return FlatStyleSupport.applyToAnnotatedObject( this, key, value );
|
||||
}
|
||||
|
||||
void updateButtons() {
|
||||
void updateStyle() {
|
||||
if( leftButton instanceof FlatOneTouchButton )
|
||||
((FlatOneTouchButton)leftButton).update();
|
||||
((FlatOneTouchButton)leftButton).updateStyle();
|
||||
if( rightButton instanceof FlatOneTouchButton )
|
||||
((FlatOneTouchButton)rightButton).update();
|
||||
((FlatOneTouchButton)rightButton).updateStyle();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -267,8 +267,8 @@ public class FlatSplitPaneUI
|
||||
this.left = left;
|
||||
}
|
||||
|
||||
protected void update() {
|
||||
update( arrowType, oneTouchArrowColor, null,
|
||||
protected void updateStyle() {
|
||||
updateStyle( arrowType, oneTouchArrowColor, null,
|
||||
oneTouchHoverArrowColor, null, oneTouchPressedArrowColor, null );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user