Class EDU.emporia.mathbeans.MathTable
All Packages Class Hierarchy This Package Previous Next Index
Class EDU.emporia.mathbeans.MathTable
Object
|
+----Component
|
+----Container
|
+----JComponent
|
+----JScrollPane
|
+----EDU.emporia.mathbeans.MathTable
- public class MathTable
- extends JScrollPane
MathTable creates a table designed to allow the user to create a list of 2-dimensional
points.
- Version:
- 1.0
- Author:
- Joe Yanik
- Since:
- 7/3/00
-
xLabel
- The label that will be displayed at the top of the first column
-
yLabel
- The label that will be displayed at the top of the second column
-
EDU.emporia.mathbeans.MathTable()
-
-
addPoint(Point2D.Double)
- Adds a point to the table
-
addPoints(Point2D.Double[])
- Adds an array of points to the table
-
adjustTable()
- Sets up the table so that the columns will fit properly.
-
clearTable()
- Clears out all data from the table.
-
getPoints()
- Returns the data entered into the table in the form of points
-
getXLabel()
- Gets the label that is displayed at the top of the first column
-
getYLabel()
- Gets the label to be displayed at the top of the second column.
-
main(String[])
-
-
removePoint(Point2D.Double)
- Removes the point.
-
removePoint(double, double)
- Removes the point with indicated coordinates from the table (if it is there)
-
setBounds(int, int, int, int)
- Overridden to adjust the column size whenever it is called
-
setBounds(Rectangle)
- Overridded to adjust the column size when it is called
-
setSize(int, int)
- Overridden to adjust the column size when it is called
-
setSize(Dimension)
- Overridden to adjust the column size when it is called
-
setXLabel(String)
- Sets the label that will be displayed at the top of the first column
-
setYLabel(String)
- Sets the label that will appear at the top of the second column.
xLabel
protected java.lang.String xLabel
- The label that will be displayed at the top of the first column
yLabel
protected java.lang.String yLabel
- The label that will be displayed at the top of the second column
MathTable
public MathTable()
addPoint
public void addPoint(EDU.emporia.mathtools.Point2D.Double p)
- Adds a point to the table
- Parameters:
- p - The point to be added
addPoints
public void addPoints(EDU.emporia.mathtools.Point2D.Double[] pointArray)
- Adds an array of points to the table
- Parameters:
- pointArray - The array to be added
adjustTable
public void adjustTable()
- Sets up the table so that the columns will fit properly.
clearTable
public void clearTable()
- Clears out all data from the table.
getPoints
public EDU.emporia.mathtools.Point2D.Double[] getPoints()
- Returns the data entered into the table in the form of points
- Returns:
- An array of Point2D.Double objects corresponding to the data that has been
entered in.
getXLabel
public java.lang.String getXLabel()
- Gets the label that is displayed at the top of the first column
getYLabel
public java.lang.String getYLabel()
- Gets the label to be displayed at the top of the second column.
main
public static void main(String[] argv)
removePoint
public void removePoint(EDU.emporia.mathtools.Point2D.Double p)
- Removes the point. (Uses the "equals" method to determine the point that matches)
- Parameters:
- p - The point to be removed
removePoint
public void removePoint(double x,
double y)
- Removes the point with indicated coordinates from the table (if it is there)
- Parameters:
- x - The x-coordinate of the point to be removed
- y - The y-coorindate of the point to be removed.
setBounds
public void setBounds(int x,
int y,
int width,
int height)
- Overridden to adjust the column size whenever it is called
- Overrides:
- setBounds in class Component
setBounds
public void setBounds(Rectangle a)
- Overridded to adjust the column size when it is called
- Overrides:
- setBounds in class Component
setSize
public void setSize(int width,
int height)
- Overridden to adjust the column size when it is called
- Overrides:
- setSize in class Component
setSize
public void setSize(Dimension a)
- Overridden to adjust the column size when it is called
- Overrides:
- setSize in class Component
setXLabel
public void setXLabel(String xLabel)
- Sets the label that will be displayed at the top of the first column
- Parameters:
- xLabel - The label to be displayed
setYLabel
public void setYLabel(String yLabel)
- Sets the label that will appear at the top of the second column.
- Parameters:
- yLabel - The label to be displayed
All Packages Class Hierarchy This Package Previous Next Index