All Packages Class Hierarchy This Package Previous Next Index
Class ChaosDemos.sliderControls
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----ChaosDemos.sliderControls
- public class sliderControls
- extends Panel
Class for ntext labelled text fields updated by slider controls. Text
field for controls is (ntext+1)th textfield.
- Version:
- 2 August, 1997
- Author:
- Michael Cross
-
sliderControls(dynamicGraph, String[], String[], int, double)
-
Adds n text fields of default size 8 with values text[]
labelled by l[]
-
sliderControls(dynamicGraph, String[], String[], int, int)
-
Adds n text fields of size length with values text[]
labelled by l[]
-
sliderControls(dynamicGraph, String[], String[], int, int, boolean)
-
Adds n text fields of size length with values text[]
labelled by l[]
-
sliderControls(dynamicGraph, String[], String[], int, int, double)
-
Adds n text fields of size length with values text[]
labelled by l[]
-
sliderControls(dynamicGraph, String[], String[], int, int, double, boolean)
-
Adds n text fields of size length with values text[]
labelled by l[]
-
action(Event, Object)
- Event handler: responds to slider events
Calls respondToSliderButtons() and respondToSliderText()
methods in parent.
-
disable(int)
- Disables ith textbox (i
enable(int)
- Enables ith textbox (i
getCheckState(int)
- Gets state of ith checkbox
-
getText(int)
- Gets value of ith textbox
-
ncontrols()
- Method to give number of controls
-
parseTextField(int, double)
- Parses text field known to be double.
-
parseTextField(int, double, double, double)
- Parses text field known to be double and in known range
Resets old value of corresponding variable if input format
is incorrect or out of range and brings up alertDialog warning box.
-
parseTextField(int, int)
- Parses text field known to be integer.
-
parseTextField(int, int, boolean)
- Parses text field known to be integer of known sign.
-
parseTextField(int, int, int, int)
- Parses text field known to be integer in known range.
-
setLabelText(String)
- Sets label of increment buttons
-
setText(int, String)
- Sets value of ith textbox
sliderControls
public sliderControls(dynamicGraph target,
String text[],
String l[],
int n,
int length,
boolean showButtons)
- Adds n text fields of size length with values text[]
labelled by l[]
- Parameters:
- target - parent class of type dynamicGraph
- text - vector of fields of textboxes
- l - vector of labels of textboxes
- n - number of textboxes
- length - length of textboxes
- showButtons - true if show buttons
sliderControls
public sliderControls(dynamicGraph target,
String text[],
String l[],
int n,
int length)
- Adds n text fields of size length with values text[]
labelled by l[]
- Parameters:
- target - parent class of type dynamicGraph
- text - vector of fields of textboxes
- l - vector of labels of textboxes
- n - number of textboxes
- length - length of textboxes
sliderControls
public sliderControls(dynamicGraph target,
String text[],
String l[],
int n,
int length,
double inInc)
- Adds n text fields of size length with values text[]
labelled by l[]
- Parameters:
- target - parent class of type dynamicGraph
- text - vector of fields of textboxes
- l - vector of labels of textboxes
- n - number of textboxes
- length - length of textboxes
- inInc - value of increment applied by sliders
sliderControls
public sliderControls(dynamicGraph target,
String text[],
String l[],
int n,
int length,
double inInc,
boolean showButtons)
- Adds n text fields of size length with values text[]
labelled by l[]
- Parameters:
- target - parent class of type dynamicGraph
- text - vector of fields of textboxes
- l - vector of labels of textboxes
- n - number of textboxes
- length - length of textboxes
- inInc - value of increment applied by sliders
- showButtons - true if show buttons
sliderControls
sliderControls(dynamicGraph target,
String text[],
String l[],
int n,
double inInc)
- Adds n text fields of default size 8 with values text[]
labelled by l[]
- Parameters:
- target - parent class of type dynamicGraph
- text - vector of fields of textboxes
- l - vector of labels of textboxes
- n - number of textboxes
- inInc - value of increment applied by sliders
action
public boolean action(Event evt,
Object arg)
- Event handler: responds to slider events
Calls respondToSliderButtons() and respondToSliderText()
methods in parent.
- Overrides:
- action in class Component
- See Also:
- dynamicGraph
ncontrols
public int ncontrols()
- Method to give number of controls
- Returns:
- number of controls
parseTextField
public int parseTextField(int n,
int i)
- Parses text field known to be integer.
Resets old value of corresponding variable if input format
is incorrect and brings up alertDialog warning box.
- Parameters:
- n - index of textbox to read
- i - old value of variable
- Returns:
- new value of parameter if textbox format is correct,
otherwise old value.
- See Also:
- alertDialog
parseTextField
public int parseTextField(int n,
int i,
boolean positive)
- Parses text field known to be integer of known sign.
Resets old value of corresponding variable if input format
is incorrect or wrong sign and brings up alertDialog warning box.
- Parameters:
- n - index of textbox to read
- i - old value of variable
- positive - true if value should be positive
- Returns:
- new value of parameter if textbox format is correct,
and value of correct sign, otherwise old value.
- See Also:
- alertDialog
parseTextField
public int parseTextField(int n,
int i,
int min,
int max)
- Parses text field known to be integer in known range.
Resets old value of corresponding variable if input format
is incorrect orout of range and brings up alertDialog warning box.
- Parameters:
- n - index of textbox to read
- i - old value of variable
- min - minimum value of allowed range
- max - maximum value of allowed range
- Returns:
- new value of parameter if textbox format is correct,
and value in of range, otherwise old value.
- See Also:
- alertDialog
parseTextField
public double parseTextField(int n,
double d)
- Parses text field known to be double.
Resets old value of corresponding variable if input format
is incorrect and brings up alertDialog warning box.
- Parameters:
- n - index of textbox to read
- d - old value of variable
- Returns:
- new value of parameter if textbox format is correct,
otherwise old value.
- See Also:
- alertDialog
parseTextField
public double parseTextField(int n,
double d,
double min,
double max)
- Parses text field known to be double and in known range
Resets old value of corresponding variable if input format
is incorrect or out of range and brings up alertDialog warning box.
- Parameters:
- n - index of textbox to read
- d - old value of variable
- min - minimum value of allowed range
- max - maximum value of allowed range
- Returns:
- new value of parameter if textbox format is correct,
and value in range, otherwise old value .
- See Also:
- alertDialog
setText
public void setText(int i,
String text)
- Sets value of ith textbox
- Parameters:
- i - index of textbox
- text - value to be set
getText
public String getText(int i)
- Gets value of ith textbox
- Parameters:
- i - index of textbox
- Returns:
- content of textbox
disable
public void disable(int i)
- Disables ith textbox (i
- Parameters:
- i - index to be disabled
enable
public void enable(int i)
- Enables ith textbox (i
- Parameters:
- i - index to be enabled
getCheckState
public boolean getCheckState(int i)
- Gets state of ith checkbox
- Parameters:
- i - index of checkbox
- Returns:
- true or false
setLabelText
public void setLabelText(String text)
- Sets label of increment buttons
- Parameters:
- text - text to be shown
All Packages Class Hierarchy This Package Previous Next Index