|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--edu.princeton.toy.choosers.TStyleChooserPane
TStyleChooserPane manages a set of styles for various indices and allows the user to change the colors for those indices.
| Field Summary | |
static String |
CHANGE_COMMAND
The command that causes the TStyleChooserPane to open a color chooser dialog. |
static String |
UPDATE_COMMAND
The command that causes the TStyleChooserPane to update its components with the internal data. |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
TStyleChooserPane(String[] styleNames)
Creates a new TStyleChooserPane. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
Implement ActionListener to pay attention to changes in the boldCheckbox and changeButton. |
boolean |
doCommand(String command,
Object extraInfo)
Performs a command based on the argument. |
HighlightStyle |
getStyle(int index)
Gets the style for a given index. |
void |
setStyle(HighlightStyle style,
int index)
Sets the style for a given index. |
void |
valueChanged(ListSelectionEvent e)
Implement ListSelectionListener to pay attention to changes in the styleList. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String UPDATE_COMMAND
public static final String CHANGE_COMMAND
| Constructor Detail |
public TStyleChooserPane(String[] styleNames)
| Method Detail |
public HighlightStyle getStyle(int index)
index - The index of the requested style. An invalid value will result in an
ArrayIndexOutOfBoundsException.
public void setStyle(HighlightStyle style,
int index)
style - The new style for the given index. A null value will result in a
NullPointerException.index - The index of the style we're setting. An invalid value will result in an
ArrayIndexOutOfBoundsException.
public boolean doCommand(String command,
Object extraInfo)
command - A string representing the command. Note that pointer equality (not string
equality) is tested here, so it is important to use the string constants defined in this
class. An IllegalArgumentException will be thrown if the argument is invalid.
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||