Extension SDK

oracle.ide.controls
Interface LabelColorScheme

All Known Implementing Classes:
DefaultLabelColorScheme

public interface LabelColorScheme

This interface defines methods that are used by the JSelectableLabel class. The implementation must not return null for any of these methods. Additionally, the implementation should be sure to respond to the updateUI() method so that the look-and-feel of the color scheme changes property when requested.

A separate class for the color scheme is necessary so that the JLabeledCheckBox class can be reused in parts of the UI that are not CustomJTrees. The color scheme used by the JSelectableLabel is the only part of its implementation that ties it to a particular Swing component, so by abstracting out the color scheme into a separate class, the JLabeledCheckBox and JSelectableLabel classes are more easily reused.


Method Summary
 java.awt.Color getBackgroundNonSelectionColor()
          Returns the Color to be used for the background when the label is not selected.
 java.awt.Color getBackgroundSelectionColor()
          Returns the Color to be used for the background when the label is selected.
 java.awt.Color getBorderSelectionColor()
          Returns the Color to be used for the border around the selection when the label is selected.
 java.awt.Color getTextNonSelectionColor()
          Returns the Color to be used for text when the label is not selected.
 java.awt.Color getTextSelectionColor()
          Returns the Color to be used for text when the label is selected.
 void updateUI()
          The JComponent subclass that uses the LabelColorScheme should call this updateUI() method when its own updateUI() method is called.
 

Method Detail

getTextSelectionColor

public java.awt.Color getTextSelectionColor()
Returns the Color to be used for text when the label is selected.


getTextNonSelectionColor

public java.awt.Color getTextNonSelectionColor()
Returns the Color to be used for text when the label is not selected.


getBackgroundSelectionColor

public java.awt.Color getBackgroundSelectionColor()
Returns the Color to be used for the background when the label is selected.


getBackgroundNonSelectionColor

public java.awt.Color getBackgroundNonSelectionColor()
Returns the Color to be used for the background when the label is not selected.


getBorderSelectionColor

public java.awt.Color getBorderSelectionColor()
Returns the Color to be used for the border around the selection when the label is selected.


updateUI

public void updateUI()
The JComponent subclass that uses the LabelColorScheme should call this updateUI() method when its own updateUI() method is called. This is so that the color scheme can be updated when the user changes the look-and-feel.


Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.