|
||||||||||
| 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.TPerformanceChooserPane
TPerformanceChooserPane manages
| Field Summary | |
static String |
UPDATE_COMMAND
The command that causes the TPerformanceChooserPane to update the JTextFields in response to a change in the slider positions. |
| 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 | |
TPerformanceChooserPane(int[] clockPeriods,
int[] refreshRates)
Creates a new TPerformanceChooserPane which can only take the specified values for clock period and refresh rate. |
|
| Method Summary | |
boolean |
doCommand(String command,
Object extraInfo)
Performs a command based on the argument. |
int |
getClockPeriod()
Returns the clock period (in milliseconds) that the user selected. |
int |
getRefreshRate()
Returns the refresh rate (in steps per refresh) that the user selected. |
void |
setClockPeriod(int clockPeriod)
Sets the clock period (in milliseconds) which the TPerformanceChooserPane should display. |
void |
setRefreshRate(int refreshRate)
Sets the refresh rate (in steps per refresh) which the TPerformanceChooserPane should display. |
void |
stateChanged(ChangeEvent e)
Implement ChangeListener to listen to changes in the checkbox states. |
| 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
| Constructor Detail |
public TPerformanceChooserPane(int[] clockPeriods,
int[] refreshRates)
| Method Detail |
public int getClockPeriod()
public void setClockPeriod(int clockPeriod)
clockPeriod - The clock period (in milliseconds) which the TPerformanceChooserPane
should display. If the argument is not in the list of choosable clock periods, the nearest
valid clock period will be selected.public int getRefreshRate()
public void setRefreshRate(int refreshRate)
refreshRate - The refresh rate (in steps per refresh) which the TPerformanceChooserPane
should display. If the argument is not in the list of choosable clock periods, the nearest
valid clock period will be selected.
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 stateChanged(ChangeEvent e)
stateChanged in interface ChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||