| com.jidesoft.swing.ComponentStateSupport
All known Subclasses: com.jidesoft.swing.JideSplitButton, com.jidesoft.swing.JideButton,
ComponentStateSupport | public interface ComponentStateSupport (Code) | | A component should implement this interface if it supports various background and foreground
for different states. Those states are defined in
com.jidesoft.plaf.basic.ThemePainter .
For components that implements this interface, you can use the methods to change its background
or foregound 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.
|
getBackgroundOfState | Color getBackgroundOfState(int state)(Code) | | Gets the background for different states. The states are defined in ThemePainter as constants.
Not all states are supported by all components. If the state is not supported or background is never set,
it will return null.
Please note, each L&F will have its own way to paint the different backgrounds. This method allows you to customize it
for each component to use a different background. So if you want the background to be used, don't use a ColorUIResource because
UIResource is considered as a setting set by the L&F and any L&F can choose to ignore it.
Parameters: state - the background for different states. |
getForegroundOfState | Color getForegroundOfState(int state)(Code) | | Gets the foreground for different states. The states are defined in ThemePainter as constants.
Not all states are supported by all components. If the state is not supported or foreground is never set,
it will return null.
Please note, each L&F will have its own way to paint the different foregrounds. This method allows you to customize it
for each component to use a different foreground. So if you want the foreground to be used, don't use a ColorUIResource because
UIResource is considered as a setting set by the L&F and any L&F can choose to ignore it.
Parameters: state - the foreground for different states. |
setBackgroundOfState | void setBackgroundOfState(int state, Color color)(Code) | | Sets the background for different states.
Parameters: state - Parameters: color - |
setForegroundOfState | void setForegroundOfState(int state, Color color)(Code) | | Sets the foreground for different states.
Parameters: state - Parameters: color - |
|
|