com.numobjects.mathbeans
Class CalcGraphSet

com.numobjects.mathbeans.CalcGraphSet

public class CalcGraphSet
implements java.io.Serializable

Calc set with graphing capabilities. Contains a calc set with the plotter. The component provides the possibility to choose the independent variable, its range and which of the dependencies to plot. The chosen functions are then plotted together. The graph may be detached and resized as desired. Graphs can be printed. Expressions corresponding to the functions are set by the same rules as for the CalcSet.

See Also:
CalcSet, CalcSolveSet, Serialized Form

Constructor Summary
CalcGraphSet()
          Constructor (uses default formula and default base color)
CalcGraphSet(java.lang.String formulae, java.awt.Color c)
          Constructor
 
Method Summary
 CalcSet getCalculator()
          Gets calculator panel
 void getColors(java.awt.Color[] cc)
          Gets base colors from the calculator, plotter and control panels
 com.numobjects.mathbeans.PlotControlPanel getControl()
          Gets control panel
 java.lang.String getFormulae()
          Gets formulae
 com.numobjects.mathbeans.PlotSet getPlotter()
          Gets plotter panel
 int getPrecision()
          Gets precision
 int getRounding()
          Gets rounding
 void getValues(java.lang.String[][] s)
          Gets the values from the calculator, plotter and control panels
 void setColors(java.awt.Color[] cc)
          Sets base colors for the calculator, plotter and control panels
 void setFormulae(java.lang.String formulae)
          Sets formulae
 void setPrecision(int value)
          Sets precision (the number of significant digits in the calculation); range 1 - 15, default precision is 6
 void setRounding(int value)
          Sets rounding (the number of digits displayed after the decimal dot); range -1 - 15, default rounding is -1 (no rounding)
 void setValues(java.lang.String[][] s)
          Sets the values for the calculator, plotter and control panels
 void setVariable(int index)
          Sets index of the variable in the list of parameters
 

Constructor Detail

CalcGraphSet

public CalcGraphSet()
Constructor (uses default formula and default base color)

CalcGraphSet

public CalcGraphSet(java.lang.String formulae,
                    java.awt.Color c)
Constructor
Parameters:
formulae - a string representing a set of formulas
c - base color
Method Detail

setFormulae

public void setFormulae(java.lang.String formulae)
Sets formulae
Parameters:
formulae - a string representing a set of formulae (semicolon delimited)

getFormulae

public java.lang.String getFormulae()
Gets formulae
Returns:
a string representing the formulae

setPrecision

public void setPrecision(int value)
Sets precision (the number of significant digits in the calculation); range 1 - 15, default precision is 6
Parameters:
value - precision to set

getPrecision

public int getPrecision()
Gets precision
Returns:
precision value (the number of significant digits in the calculation)

setRounding

public void setRounding(int value)
Sets rounding (the number of digits displayed after the decimal dot); range -1 - 15, default rounding is -1 (no rounding)
Parameters:
value - rounding

getRounding

public int getRounding()
Gets rounding
Returns:
rounding value (the number of digits displayed after the decimal dot)

getCalculator

public CalcSet getCalculator()
Gets calculator panel
Returns:
calculator panel

getPlotter

public com.numobjects.mathbeans.PlotSet getPlotter()
Gets plotter panel
Returns:
plotter panel

getControl

public com.numobjects.mathbeans.PlotControlPanel getControl()
Gets control panel
Returns:
control panel

setColors

public void setColors(java.awt.Color[] cc)
Sets base colors for the calculator, plotter and control panels
Parameters:
cc - an array of colors (must have length at least 3)

getColors

public void getColors(java.awt.Color[] cc)
Gets base colors from the calculator, plotter and control panels
Parameters:
cc - an array of colors (must have length at least 3)

getValues

public void getValues(java.lang.String[][] s)
Gets the values from the calculator, plotter and control panels
Parameters:
s - a two-dimensional array consisting of 3 arrays of values

setValues

public void setValues(java.lang.String[][] s)
Sets the values for the calculator, plotter and control panels
Parameters:
s - a two-dimensional array consisting of 3 arrays of values

setVariable

public void setVariable(int index)
Sets index of the variable in the list of parameters
Parameters:
index - index to set