Class EDU.emporia.mathbeans.FunctionTable
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.emporia.mathbeans.FunctionTable

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----JComponent
                           |
                           +----JScrollPane
                                   |
                                   +----EDU.emporia.mathbeans.FunctionTable

public class FunctionTable
extends JScrollPane
A table to display the values of one or more functions at selected points.

Version:
1.0
Author:
Joe Yanik
Since:
7/5/00

Variable Index

 o autoXValue
Determines whether or not the x-values will be automatically generated or will be based on user-input.
 o editor
The cell editor for the table (based on MathTextField).
 o f
A Graphable object that can be added to the table through the property list
 o firstColumn
The first column of the table
 o function
The vector used to hold the x-values that will be displayed when autoXValues if false.
 o g
A Graphable object that can be added to the table through the property list
 o header
The header for the table
 o mathField
The MathTextField object used to construct the cell editor
 o mathModel
The model used to manipulate the data for the table
 o renderer
The cell renderer for the table (based on MathTextField).
 o table
The table that is put on the ScrollPane
 o tableBorder
The titled border for the table
 o tcm
The table column model
 o title
The title to be displayed at the top of the table
 o titledIndex
The index of the column that will be used to determine the title to be displayed
 o xDelta
The increment between x-values when autoXValue is true
 o xLabel
The label displayed at the top of the first column (the "x" column).
 o xMin
The minimum x-value displayed when autoXValues is true
 o xValue
The vector used to hold the x-values that will be displayed when autoXValues if false.
 o yLabel
The label to be used to to construct the labels for the y-columns

Constructor Index

 o EDU.emporia.mathbeans.FunctionTable()

Method Index

 o addGraph(Graphable)
Adds a graph to be represented by the table
 o addPoint(double)
Adds a point to the table.
 o addPoints(double[])
Adds an array of points to the table.
 o adjustTable()
Adjusts the editor and renderer to reflect the new column width.
 o clearTable()
Clears the table of all data.
 o getF()
Gets the current value of the f property
 o getG()
Gets the current value of the f property
 o getXDelta()
Gets the increment to be used to be determine the list of x-values to be used when autoXValues is true
 o getXLabel()
Gets the label to be displayed at the top of the first columns
 o getXMin()
Gets the starting point to be used to determine the x-values when autoXValues is true.
 o getYLabel()
Gets the label to be displayed at the top of the y-columns.
 o isAutoXValue()
Returns true if the table is automatically generated-false otherwise
 o main(String[])
 o removePoint(double)
Removes a point from the table.
 o setAutoXValue(boolean)
Determines whether or not the table will be automatically generated or the user will be permitted to enter in x-values.
 o setBounds(int, int, int, int)
Overrides the setBounds method to adjust the editor and renderer in case the column width should change
 o setF(Graphable)
Sets the f property of the table which will display the function values for f on the table
 o setG(Graphable)
Sets the g property of the table which will display the function values for g on the table
 o setSize(int, int)
Overrides the setSize method to adjust the editor and renderer in case the column width should change
 o setTitledIndex(int)
Sets the column index that will determine the title to be displayed
 o setXDelta(double)
Sets the increment to be used to be determine the list of x-values to be used when autoXValues is true
 o setXLabel(String)
Sets the label to be displayed at the top of the first column
 o setXMin(double)
Sets the starting point to be used to determine the x-values when autoXValues is true.
 o setYLabel(String)
Sets the label to be displayed at the top of the y-columns.
 o updateTable()
Updates the table to reflect any changes made in the function that are represented/

Variables

 o autoXValue
protected boolean autoXValue
Determines whether or not the x-values will be automatically generated or will be based on user-input.

 o editor
protected javax.swing.DefaultCellEditor editor
The cell editor for the table (based on MathTextField).

 o f
protected EDU.emporia.mathtools.Graphable f
A Graphable object that can be added to the table through the property list

 o firstColumn
protected javax.swing.table.TableColumn firstColumn
The first column of the table

 o function
protected java.util.Vector function
The vector used to hold the x-values that will be displayed when autoXValues if false.

 o g
protected EDU.emporia.mathtools.Graphable g
A Graphable object that can be added to the table through the property list

 o header
protected javax.swing.table.JTableHeader header
The header for the table

 o mathField
protected EDU.emporia.mathbeans.MathTextField mathField
The MathTextField object used to construct the cell editor

 o mathModel
protected EDU.emporia.mathbeans.FunctionTable.FunctionTableModel mathModel
The model used to manipulate the data for the table

 o renderer
protected EDU.emporia.mathbeans.MathRenderer renderer
The cell renderer for the table (based on MathTextField).

 o table
protected javax.swing.JTable table
The table that is put on the ScrollPane

 o tableBorder
protected javax.swing.border.TitledBorder tableBorder
The titled border for the table

 o tcm
protected javax.swing.table.TableColumnModel tcm
The table column model

 o title
protected java.lang.String title
The title to be displayed at the top of the table

 o titledIndex
protected int titledIndex
The index of the column that will be used to determine the title to be displayed

 o xDelta
protected double xDelta
The increment between x-values when autoXValue is true

 o xLabel
protected java.lang.String xLabel
The label displayed at the top of the first column (the "x" column).

 o xMin
protected double xMin
The minimum x-value displayed when autoXValues is true

 o xValue
protected java.util.Vector xValue
The vector used to hold the x-values that will be displayed when autoXValues if false.

 o yLabel
protected java.lang.String yLabel
The label to be used to to construct the labels for the y-columns

Constructors

 o FunctionTable
public FunctionTable()

Methods

 o addGraph
public void addGraph(Graphable f)
Adds a graph to be represented by the table

Parameters:
f - A graphable object representing a function to be displayed
 o addPoint
public void addPoint(double x)
Adds a point to the table. If the point is already there it won't be added. (Only works if autoXValue is false.)

Parameters:
x - The x-coordinate of the point
 o addPoints
public void addPoints(double[] xArray)
Adds an array of points to the table. Any points already there will not be added. (Only works if autoXValue is false.)

Parameters:
xArray - The array of points to be added
 o adjustTable
public void adjustTable()
Adjusts the editor and renderer to reflect the new column width.

 o clearTable
public void clearTable()
Clears the table of all data. (Only works if autoXValue is false.)

 o getF
public EDU.emporia.mathtools.Graphable getF()
Gets the current value of the f property

Returns:
f
 o getG
public EDU.emporia.mathtools.Graphable getG()
Gets the current value of the f property

Returns:
g
 o getXDelta
public double getXDelta()
Gets the increment to be used to be determine the list of x-values to be used when autoXValues is true

Returns:
The increment to be used to be determine the list of x-values to be used when autoXValues is true
 o getXLabel
public java.lang.String getXLabel()
Gets the label to be displayed at the top of the first columns

Returns:
The label to be displayed
 o getXMin
public double getXMin()
Gets the starting point to be used to determine the x-values when autoXValues is true.

Returns:
The starting point to be used to determine the x-values when autoXValues is true.
 o getYLabel
public java.lang.String getYLabel()
Gets the label to be displayed at the top of the y-columns. An index will be added to the label at the top of each one

Returns:
The label to be displayed
 o isAutoXValue
public boolean isAutoXValue()
Returns true if the table is automatically generated-false otherwise

Returns:
The value of autoXValue
 o main
public static void main(String[] argv)
 o removePoint
public void removePoint(double x)
Removes a point from the table. (Only works if autoXValue is false.)

Parameters:
x - The x-coordinate of the point to be removed.
 o setAutoXValue
public void setAutoXValue(boolean autoXValue)
Determines whether or not the table will be automatically generated or the user will be permitted to enter in x-values.

Parameters:
autoXValue - When true the table will be automatically generated.
 o setBounds
public void setBounds(int a,
                      int b,
                      int c,
                      int d)
Overrides the setBounds method to adjust the editor and renderer in case the column width should change

Parameters:
a - The x-coordinate of the table
b - The y-coordinate where the table is placed
c - The width of the table
d - The height of the table
Overrides:
setBounds in class Component
 o setF
public void setF(Graphable f)
Sets the f property of the table which will display the function values for f on the table

Parameters:
f - The function to be represented
 o setG
public void setG(Graphable g)
Sets the g property of the table which will display the function values for g on the table

Parameters:
g - The function to be represented
 o setSize
public void setSize(int a,
                    int b)
Overrides the setSize method to adjust the editor and renderer in case the column width should change

Parameters:
a - The width of the table
b - The height of the table
Overrides:
setSize in class Component
 o setTitledIndex
public void setTitledIndex(int j)
Sets the column index that will determine the title to be displayed

Parameters:
j - The index of the column whose title will be displayed
 o setXDelta
public void setXDelta(double xDelta)
Sets the increment to be used to be determine the list of x-values to be used when autoXValues is true

Parameters:
xDelta - The distance between subsequent x-values when autoXValues is true
 o setXLabel
public void setXLabel(String xLabel)
Sets the label to be displayed at the top of the first column

Parameters:
xLabel - The label to be displayed.
 o setXMin
public void setXMin(double xMin)
Sets the starting point to be used to determine the x-values when autoXValues is true.

Parameters:
xMin - Sets the starting point to be used to determine the x-values when autoXValues is true.
 o setYLabel
public void setYLabel(String yLabel)
Sets the label to be displayed at the top of the y-columns. An index will be added to the label

Parameters:
yLabel - the label to be used.
 o updateTable
public void updateTable()
Updates the table to reflect any changes made in the function that are represented/


All Packages  Class Hierarchy  This Package  Previous  Next  Index