org.rosuda.ibase.toolkit
Class PlotPolygon

java.lang.Object
  extended by org.rosuda.ibase.toolkit.PlotObject
      extended by org.rosuda.ibase.toolkit.PlotPolygon

public class PlotPolygon
extends PlotObject

Polygon object to be used in plots

Version:
$Id: PlotPolygon.java 2493 2006-06-08 23:37:18Z urbaneks $

Field Summary
 
Fields inherited from class org.rosuda.ibase.toolkit.PlotObject
CS_ABS, CS_REL, CS_VAR
 
Constructor Summary
PlotPolygon(PlotManager pm)
          create a new polygon object and add it to the specified PlotManager
 
Method Summary
 void draw(PoGraSS g)
          draw the polygon
 int[] getDX()
           
 int[] getDY()
           
 double[] getX()
           
 double[] getY()
           
 void recalc()
           
 void set(double[] xx, double[] yy)
          set polygon points. note that the polygon is not closed automatically when drawing outline, but filled are is always closed (if fill color is not null)
 java.lang.String toString()
          toString is rather useful for debugging purposes
 
Methods inherited from class org.rosuda.ibase.toolkit.PlotObject
dispose, gerDrawColor, gerFillColor, getLayer, getXPos, getYPos, isVisible, setClip, setCoordinates, setCoordinates, setDrawColor, setFillColor, setLayer, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlotPolygon

public PlotPolygon(PlotManager pm)
create a new polygon object and add it to the specified PlotManager

Method Detail

set

public void set(double[] xx,
                double[] yy)
set polygon points. note that the polygon is not closed automatically when drawing outline, but filled are is always closed (if fill color is not null)

Parameters:
xx - X coordinates of the points
yy - Y coordinates of the points

recalc

public void recalc()

draw

public void draw(PoGraSS g)
draw the polygon

Overrides:
draw in class PlotObject
Parameters:
g - graphics context for painting

getDX

public int[] getDX()

getDY

public int[] getDY()

getX

public double[] getX()

getY

public double[] getY()

toString

public java.lang.String toString()
Description copied from class: PlotObject
toString is rather useful for debugging purposes

Overrides:
toString in class PlotObject