public interface ComponentStateSupport
ThemePainter
.
For components that implements this interface, you can use the methods to change its background or foreground for
different states such as rollover state, selected state or pressed state. JideButton and JideSplitButton are two
classes that support this.
Please note, not all L&Fs support this. Vsnet and Office 2003 style support it but Xerto and Eclipse style don't.Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackgroundOfState(int state)
Gets the background for different states.
|
java.awt.Color |
getForegroundOfState(int state)
Gets the foreground for different states.
|
void |
setBackgroundOfState(int state,
java.awt.Color color)
Sets the background for different states.
|
void |
setForegroundOfState(int state,
java.awt.Color color)
Sets the foreground for different states.
|
java.awt.Color getBackgroundOfState(int state)
state
- the button state. Valid values are ThemePainter.STATE_DEFAULT, ThemePainter.STATE_ROLLOVER,
ThemePainter.STATE_SELECTED and ThemePainter.STATE_PRESSED.void setBackgroundOfState(int state, java.awt.Color color)
state
- the button state. Valid values are ThemePainter.STATE_DEFAULT, ThemePainter.STATE_ROLLOVER,
ThemePainter.STATE_SELECTED and ThemePainter.STATE_PRESSED.color
- the new background for the state.java.awt.Color getForegroundOfState(int state)
state
- the button state. Valid values are ThemePainter.STATE_DEFAULT, ThemePainter.STATE_ROLLOVER,
ThemePainter.STATE_SELECTED and ThemePainter.STATE_PRESSED.void setForegroundOfState(int state, java.awt.Color color)
state
- the button state. Valid values are ThemePainter.STATE_DEFAULT, ThemePainter.STATE_ROLLOVER,
ThemePainter.STATE_SELECTED and ThemePainter.STATE_PRESSED.color
- the new foreground for the state.