GrapherGUI
Class SliderMatrix

java.lang.Object
  |
  +--GrapherGUI.SliderMatrix

public class SliderMatrix
extends java.lang.Object

Container object for ParameterPanels. Contains a method to easily access the current value of every parameter.

See Also:
ParameterPanel

Constructor Summary
SliderMatrix(int capacity)
          Constructor
 
Method Summary
 boolean add(double min, double max, double start, int numticks, java.lang.String imagefile, java.lang.String name)
          Add a parameter to the array.
 int capacity()
          Maximum capacity of this object.
 javax.swing.JPanel getAllSliders()
          Creates a JPanel of ParameterPanels.
 javax.swing.JSlider[] getJSliderArray()
          Returns an array of pointers to the JSlider objects in the ParameterPanels.
 int size()
          Current number of parameters entered.
 double val(java.lang.String param)
          Return the value of a certain parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliderMatrix

public SliderMatrix(int capacity)
Constructor

Parameters:
capacity - maximum number of parameters this object will hold
Method Detail

add

public boolean add(double min,
                   double max,
                   double start,
                   int numticks,
                   java.lang.String imagefile,
                   java.lang.String name)
Add a parameter to the array.

Parameters:
min - minimum value the parameter can take
max - maximum value the parameter can take
start - starting value of the parameter
numticks - number of marks on the slider
imagefile - the JPEF or GIF image of this parameter. If none, set to null.
name - string identifier for this parameter
Returns:
true if parameter added successfully

getAllSliders

public javax.swing.JPanel getAllSliders()
Creates a JPanel of ParameterPanels.

Returns:
JPanel

getJSliderArray

public javax.swing.JSlider[] getJSliderArray()
Returns an array of pointers to the JSlider objects in the ParameterPanels.

Returns:
array of JSlider objects
See Also:
JSlider

size

public int size()
Current number of parameters entered.

Returns:
size

capacity

public int capacity()
Maximum capacity of this object.

Returns:
capacity

val

public double val(java.lang.String param)
           throws java.lang.Error
Return the value of a certain parameter.

Parameters:
param - string identifier (entered as name in method add()
Returns:
current value of the parameter
Throws:
java.lang.Error - If a non-existing parameter is requested, this method will throw and instance of Error.
See Also:
Error