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
-
autoXValue
- Determines whether or not the x-values will be automatically generated or will be
based on user-input.
-
editor
- The cell editor for the table (based on MathTextField).
-
f
- A Graphable object that can be added to the table through the property list
-
firstColumn
- The first column of the table
-
function
- The vector used to hold the x-values that will be displayed when autoXValues if false.
-
g
- A Graphable object that can be added to the table through the property list
-
header
- The header for the table
-
mathField
- The MathTextField object used to construct the cell editor
-
mathModel
- The model used to manipulate the data for the table
-
renderer
- The cell renderer for the table (based on MathTextField).
-
table
- The table that is put on the ScrollPane
-
tableBorder
- The titled border for the table
-
tcm
- The table column model
-
title
- The title to be displayed at the top of the table
-
titledIndex
- The index of the column that will be used to determine the title to be displayed
-
xDelta
- The increment between x-values when autoXValue is true
-
xLabel
- The label displayed at the top of the first column (the "x" column).
-
xMin
- The minimum x-value displayed when autoXValues is true
-
xValue
- The vector used to hold the x-values that will be displayed when autoXValues if false.
-
yLabel
- The label to be used to to construct the labels for the y-columns
-
EDU.emporia.mathbeans.FunctionTable()
-
-
addGraph(Graphable)
- Adds a graph to be represented by the table
-
addPoint(double)
- Adds a point to the table.
-
addPoints(double[])
- Adds an array of points to the table.
-
adjustTable()
- Adjusts the editor and renderer to reflect the new column width.
-
clearTable()
- Clears the table of all data.
-
getF()
- Gets the current value of the f property
-
getG()
- Gets the current value of the f property
-
getXDelta()
- Gets the increment to be used to be determine the list of x-values to be used
when autoXValues is true
-
getXLabel()
- Gets the label to be displayed at the top of the first columns
-
getXMin()
- Gets the starting point to be used to determine the x-values when autoXValues is true.
-
getYLabel()
- Gets the label to be displayed at the top of the y-columns.
-
isAutoXValue()
- Returns true if the table is automatically generated-false otherwise
-
main(String[])
-
-
removePoint(double)
- Removes a point from the table.
-
setAutoXValue(boolean)
- Determines whether or not the table will be automatically generated or the user will
be permitted to enter in x-values.
-
setBounds(int, int, int, int)
- Overrides the setBounds method to adjust the editor and renderer in case the column
width should change
-
setF(Graphable)
- Sets the f property of the table which will display the function values for f on the
table
-
setG(Graphable)
- Sets the g property of the table which will display the function values for g on the
table
-
setSize(int, int)
- Overrides the setSize method to adjust the editor and renderer in case the column
width should change
-
setTitledIndex(int)
- Sets the column index that will determine the title to be displayed
-
setXDelta(double)
- Sets the increment to be used to be determine the list of x-values to be used
when autoXValues is true
-
setXLabel(String)
- Sets the label to be displayed at the top of the first column
-
setXMin(double)
- Sets the starting point to be used to determine the x-values when autoXValues is true.
-
setYLabel(String)
- Sets the label to be displayed at the top of the y-columns.
-
updateTable()
- Updates the table to reflect any changes made in the function that are represented/
autoXValue
protected boolean autoXValue
- Determines whether or not the x-values will be automatically generated or will be
based on user-input.
editor
protected javax.swing.DefaultCellEditor editor
- The cell editor for the table (based on MathTextField).
f
protected EDU.emporia.mathtools.Graphable f
- A Graphable object that can be added to the table through the property list
firstColumn
protected javax.swing.table.TableColumn firstColumn
- The first column of the table
function
protected java.util.Vector function
- The vector used to hold the x-values that will be displayed when autoXValues if false.
g
protected EDU.emporia.mathtools.Graphable g
- A Graphable object that can be added to the table through the property list
header
protected javax.swing.table.JTableHeader header
- The header for the table
mathField
protected EDU.emporia.mathbeans.MathTextField mathField
- The MathTextField object used to construct the cell editor
mathModel
protected EDU.emporia.mathbeans.FunctionTable.FunctionTableModel mathModel
- The model used to manipulate the data for the table
renderer
protected EDU.emporia.mathbeans.MathRenderer renderer
- The cell renderer for the table (based on MathTextField).
table
protected javax.swing.JTable table
- The table that is put on the ScrollPane
tableBorder
protected javax.swing.border.TitledBorder tableBorder
- The titled border for the table
tcm
protected javax.swing.table.TableColumnModel tcm
- The table column model
title
protected java.lang.String title
- The title to be displayed at the top of the table
titledIndex
protected int titledIndex
- The index of the column that will be used to determine the title to be displayed
xDelta
protected double xDelta
- The increment between x-values when autoXValue is true
xLabel
protected java.lang.String xLabel
- The label displayed at the top of the first column (the "x" column).
xMin
protected double xMin
- The minimum x-value displayed when autoXValues is true
xValue
protected java.util.Vector xValue
- The vector used to hold the x-values that will be displayed when autoXValues if false.
yLabel
protected java.lang.String yLabel
- The label to be used to to construct the labels for the y-columns
FunctionTable
public FunctionTable()
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
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
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
adjustTable
public void adjustTable()
- Adjusts the editor and renderer to reflect the new column width.
clearTable
public void clearTable()
- Clears the table of all data. (Only works if autoXValue is false.)
getF
public EDU.emporia.mathtools.Graphable getF()
- Gets the current value of the f property
- Returns:
- f
getG
public EDU.emporia.mathtools.Graphable getG()
- Gets the current value of the f property
- Returns:
- g
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
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
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.
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
isAutoXValue
public boolean isAutoXValue()
- Returns true if the table is automatically generated-false otherwise
- Returns:
- The value of autoXValue
main
public static void main(String[] argv)
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.
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.
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
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
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
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
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
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
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.
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.
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.
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