All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class figPac.fPolygon

java.lang.Object
   |
   +----figPac.fPolygon

public class fPolygon
extends Object
implements fElement, fInteractive, MouseListener, MouseMotionListener, ItemListener, ActionListener

Variable Index

 o CLOSED
 o defaultFillColor
The default color used to fill the polygon on the screen.
 o defaultPsFillColor
The default PostScript command used to color in the polygon in PostScript when the fEnv variable useColorPs is "true".
 o defaultPsFillGray
Controls the default density used to fill the polygon in postscript.
 o DOT
 o fillColor
The color used to fill the polygon on the screen.
 o FILLED
 o lin_reg_from
 o lin_reg_to
 o OPEN
 o psDotFont
In the postcsript image, when fPolygon.DOT is included in the type of the fPolygon, character number psDotSymbol of the font psDotFont is printed at each vertex.
 o psDotSymbol
In the postcsript image, when fPolygon.DOT is included in the type of the fPolygon, character number psDotSymbol of the font psDotFont is printed at each vertex.
 o psFillColor
The PostScript command used to color in the polygon in PostScript when the fEnv variable useColorPs is "true".
 o psFillGray
Controls the density used to fill the polygon in postscript.
 o REGRESSION
 o type
The type determines whether the polygon is plotted as an open or closed path, whether or not it is filled and so on.
 o x
 o y

Constructor Index

 o fPolygon()
 o fPolygon(double[], double[], int)
 o fPolygon(double[], double[], int, long)
 o fPolygon(double[], double[], int, long, Color)
 o fPolygon(double[][])
Creates the fPolygon whose vertices are taken from the array list.
 o fPolygon(double[][], int)
Creates the fPolygon whose vertices are the first nopoints of the array list.
 o fPolygon(double[][], int, long)
 o fPolygon(double[][], int, long, Color)
 o fPolygon(double[][], long)
Creates the fPolygon whose vertices are taken from the array list and also sets its type.
 o fPolygon(PointList)
Creates the fPolygon whose vertices are listed in the PointList.
 o fPolygon(PointList, int)
Creates the fPolygon whose vertices are the first nopoints of the PointList.
 o fPolygon(PointList, int, long)
 o fPolygon(PointList, int, long, Color)
 o fPolygon(PointList, long)
Creates the fPolygon whose vertices are listed in the PointList and also sets its type.
 o fPolygon(PointList, long, Color)
Creates the fPolygon whose vertices are listed in the PointList and also sets its type and fillColor.

Method Index

 o actionPerformed(ActionEvent)
 o append(double, double)
 o configure(String, double)
Sets the value of the property specified by the first argument to the second argument.
 o configure(String, double[])
Sets the value of the property specified by the first argument to the second argument.
 o configure(String, String)
 o delete(int)
 o drawgfx(Figure, Hashtable, V2V)
 o drawps(Figure, Hashtable, V2V)
 o endEdit()
 o endEditAndDelete()
 o insert(double, double, int)
 o itemStateChanged(ItemEvent)
 o linear_regression(double, double)
 o mouseClicked(MouseEvent)
 o mouseDragged(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mouseMoved(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o startEdit(figEdit)
 o toString()

Variables

 o x
 public double x[]
 o y
 public double y[]
 o OPEN
 public static long OPEN
 o CLOSED
 public static long CLOSED
 o DOT
 public static long DOT
 o FILLED
 public static long FILLED
 o REGRESSION
 public static long REGRESSION
 o type
 public long type
The type determines whether the polygon is plotted as an open or closed path, whether or not it is filled and so on. To determine the value of type, start with type=0. If you wish to have the polygon itself plotted add either fPolygon.OPEN or fPolygon.CLOSED. In the latter case, a line segment from the last vertex to the first vertex is plotted in addition to the polygon itself. If you wish to fill the polygon add fPolygon.FILLED. If you wish to plot the vertices of the polygon add fPolygon.DOT. (On the screen, a small square will be centered on each vertex. In postscript, the character number psDotSymbol of font psDotFont will be placed as a label at each vertex.) If you wish to draw the straight line which best fits the vertices of the polygon add fPolygon.REGRESSION.

 o defaultFillColor
 public Color defaultFillColor
The default color used to fill the polygon on the screen.

 o fillColor
 public Color fillColor
The color used to fill the polygon on the screen.

 o defaultPsFillGray
 public double defaultPsFillGray
Controls the default density used to fill the polygon in postscript. Black=0, white=1.

 o psFillGray
 public double psFillGray
Controls the density used to fill the polygon in postscript. Black=0, white=1.

 o defaultPsFillColor
 public String defaultPsFillColor
The default PostScript command used to color in the polygon in PostScript when the fEnv variable useColorPs is "true".

 o psFillColor
 public String psFillColor
The PostScript command used to color in the polygon in PostScript when the fEnv variable useColorPs is "true".

 o psDotFont
 public String psDotFont
In the postcsript image, when fPolygon.DOT is included in the type of the fPolygon, character number psDotSymbol of the font psDotFont is printed at each vertex.

 o psDotSymbol
 public int psDotSymbol
In the postcsript image, when fPolygon.DOT is included in the type of the fPolygon, character number psDotSymbol of the font psDotFont is printed at each vertex.

 o lin_reg_from
 public double lin_reg_from[]
 o lin_reg_to
 public double lin_reg_to[]

Constructors

 o fPolygon
 public fPolygon(PointList p)
Creates the fPolygon whose vertices are listed in the PointList.

 o fPolygon
 public fPolygon(PointList p,
                 long type)
Creates the fPolygon whose vertices are listed in the PointList and also sets its type.

Parameters:
type - The type determines whether the polygon is plotted as an open or closed path, whether or not it is filled and so on. To determine the value of type, start with type=0. If you wish to have the polygon itself plotted add either fPolygon.OPEN or fPolygon.CLOSED. In the latter case, a line segment from the last vertex to the first vertex is plotted in addition to the polygon itself. If you wish to fill the polygon add fPolygon.FILLED. If you wish to plot the vertices of the polygon add fPolygon.DOT. (On the screen, a small square will be centered on each vertex. In postscript, the character number psDotSymbol of font psDotFont will be placed as a label at each vertex.) If you wish to draw the straight line which best fits the vertices of the polygon add fPolygon.REGRESSION.
p - The list of vertices of the polygon.
 o fPolygon
 public fPolygon(PointList p,
                 long type,
                 Color color)
Creates the fPolygon whose vertices are listed in the PointList and also sets its type and fillColor.

 o fPolygon
 public fPolygon(PointList p,
                 int nopoints)
Creates the fPolygon whose vertices are the first nopoints of the PointList.

 o fPolygon
 public fPolygon(PointList p,
                 int nopoints,
                 long type)
 o fPolygon
 public fPolygon(PointList p,
                 int nopoints,
                 long type,
                 Color color)
 o fPolygon
 public fPolygon(double list[][])
Creates the fPolygon whose vertices are taken from the array list.

 o fPolygon
 public fPolygon(double list[][],
                 long type)
Creates the fPolygon whose vertices are taken from the array list and also sets its type.

Parameters:
type - The type determines whether the polygon is plotted as an open or closed path, whether or not it is filled and so on. To determine the value of type, start with type=0. If you wish to have the polygon itself plotted add either fPolygon.OPEN or fPolygon.CLOSED. In the latter case, a line segment from the last vertex to the first vertex is plotted in addition to the polygon itself. If you wish to fill the polygon add fPolygon.FILLED. If you wish to plot the vertices of the polygon add fPolygon.DOT. (On the screen, a small square will be centered on each vertex. In postscript, the character number psDotSymbol of font psDotFont will be placed as a label at each vertex.) If you wish to draw the straight line which best fits the vertices of the polygon add fPolygon.REGRESSION.
list - The list of vertices of the polygon.
 o fPolygon
 public fPolygon(double list[][],
                 int nopoints)
Creates the fPolygon whose vertices are the first nopoints of the array list.

 o fPolygon
 public fPolygon(double list[][],
                 int nopoints,
                 long type)
 o fPolygon
 public fPolygon(double list[][],
                 int nopoints,
                 long type,
                 Color color)
 o fPolygon
 public fPolygon(double xlist[],
                 double ylist[],
                 int nopoints)
 o fPolygon
 public fPolygon(double xlist[],
                 double ylist[],
                 int nopoints,
                 long type)
 o fPolygon
 public fPolygon(double xlist[],
                 double ylist[],
                 int nopoints,
                 long type,
                 Color color)
 o fPolygon
 public fPolygon()

Methods

 o append
 public void append(double x,
                    double y)
 o insert
 public void insert(double x,
                    double y,
                    int vertexNo)
 o delete
 public void delete(int vertexNo)
 o linear_regression
 public void linear_regression(double xmin,
                               double xmax)
 o drawgfx
 public void drawgfx(Figure fig,
                     Hashtable env,
                     V2V usr2pxl)
 o drawps
 public String drawps(Figure fig,
                      Hashtable env,
                      V2V usr2ps)
 o startEdit
 public void startEdit(figEdit applet)
 o endEdit
 public void endEdit()
 o endEditAndDelete
 public void endEditAndDelete()
 o mouseClicked
 public void mouseClicked(MouseEvent evt)
 o mousePressed
 public void mousePressed(MouseEvent evt)
 o mouseDragged
 public void mouseDragged(MouseEvent evt)
 o mouseReleased
 public void mouseReleased(MouseEvent evt)
 o mouseEntered
 public void mouseEntered(MouseEvent evt)
 o mouseExited
 public void mouseExited(MouseEvent evt)
 o mouseMoved
 public void mouseMoved(MouseEvent evt)
 o itemStateChanged
 public void itemStateChanged(ItemEvent evt)
 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o configure
 public void configure(String name,
                       String Value)
 o configure
 public void configure(String name,
                       double Value)
Sets the value of the property specified by the first argument to the second argument. At the present time, the following properties are supported: type.

 o configure
 public void configure(String name,
                       double Value[])
Sets the value of the property specified by the first argument to the second argument. At the present time, the following properties are supported: vertex. Here is an integer (starting at zero) specifying the vertex number. For example the property with name "vertex3" refers to x[3] and y[3].

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index