Class PolygonData

java.lang.Object
   |
   +----framework.ModuleData
           |
           +----PolygonData

class PolygonData
extends ModuleData
implements Data
A class that can be used as super class by all classes that have Polygon data.


Variable Index

 o polyPointNames
 o polyPoints
Polygon points.

Constructor Index

 o PolygonData()

Method Index

 o copyPolyPoints()
Make a copy of the polyPoints.
 o display(String, String)
Display the polygon points in a display window.
 o getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.
 o getNrOfPolygonElements()
 o getPolyPointNames()
Get the polyPoint names array.
 o getPolyPoints()
Get the polyPoints data array.
 o getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.
 o load(String)
Load the PolygonData points from disk.
 o load1DimIntegerArray(StreamTokenizer)
Load a single dimensional polygon integer array from disk.
 o makePolyPoints(int)
Create the polyPoints data array.
 o save(String)
Save the PolygonData points to disk.
 o save1DimIntegerArray(DataOutputStream, int[])
Save the size of the array and a single dimensional polygon integer array to disk.
 o toString()

Variables

 o polyPoints
 int polyPoints[]
Polygon points.

 o polyPointNames
 String polyPointNames[]

Constructors

 o PolygonData
 PolygonData()

Methods

 o getPolyPoints
 public int[] getPolyPoints()
Get the polyPoints data array.

 o getPolyPointNames
 public String[] getPolyPointNames()
Get the polyPoint names array.

 o makePolyPoints
 public void makePolyPoints(int nr)
Create the polyPoints data array.

 o getNrOfPolygonElements
 public int getNrOfPolygonElements()
 o copyPolyPoints
 public int[] copyPolyPoints()
Make a copy of the polyPoints.

 o getLoadTags
 protected String[] getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.

Overrides:
getLoadTags in class ModuleData
 o getSaveTags
 protected String[] getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.

Overrides:
getSaveTags in class ModuleData
 o load1DimIntegerArray
 protected int[] load1DimIntegerArray(StreamTokenizer st) throws IOException
Load a single dimensional polygon integer array from disk.

Returns:
the polygon integer array that contains the data.
 o save1DimIntegerArray
 protected void save1DimIntegerArray(DataOutputStream dos,
                                     int data[]) throws IOException
Save the size of the array and a single dimensional polygon integer array to disk.

Parameters:
the - polygon integer array that must be saved to disk.
 o load
 public void load(String filename) throws FileNotFoundException, IOException
Load the PolygonData points from disk.

Overrides:
load in class ModuleData
 o save
 public void save(String filename) throws FileNotFoundException, IOException
Save the PolygonData points to disk.

Overrides:
save in class ModuleData
 o display
 public DataVisualisation display(String title,
                                  String filename)
Display the polygon points in a display window.

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