JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class DrawFacetAbstract

java.lang.Object
  |
  +--com.klg.jclass.chart3d.DrawFacetAbstract
All Implemented Interfaces:
DrawFacet, Serializable
Direct Known Subclasses:
DrawFacetM, DrawFacetMC, DrawFacetMCH, DrawFacetMH, DrawFacetMS, DrawFacetMSC, DrawFacetMSZ, DrawFacetMSZC, DrawFacetMZ, DrawFacetMZC, DrawFacetMZCH, DrawFacetMZH, DrawFacetS, DrawFacetSC, DrawFacetSZ, DrawFacetSZC

public abstract class DrawFacetAbstract
extends Object
implements DrawFacet, Serializable

Abstract class that forms a basis for the DrawFacet??? classes. It contains polygon methods that draw, erase, or fill facets in various ways. The subclasses implement the abstract draw method and call the polygon methods in various ways to implement the look required (determined by the meshed, shaded, contoured, and zoned attributes).

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.chart3d.DrawGrid drawGrid
          Parent DrawGrid object.
protected  boolean drawMeshLine
          If this facet has been triangularized, draw the mesh line for this facet?
protected  Graphics gc
          The graphics context used.
 
Method Summary
abstract  void draw(int[] xPoints, int[] yPoints, int n, int holeCode, int x, int y)
           
 com.klg.jclass.chart3d.DrawGrid getDrawGrid()
          Gets the drawGrid parent.
 boolean getDrawMeshLine()
          Returns whether the mesh line get drawn for this facet.
 Graphics getGC()
          Gets the graphics context used to draw this facet.
 void polyContours(int x, int y)
           
 void polyErase(int[] xPoints, int[] yPoints, int n, int holeCode)
          Erases the polygon represented by xPoints and yPoints.
 void polyFilled(int[] xPoints, int[] yPoints, int n, int holeCode)
          Fills the polygon represented by xPoints and yPoints.
 boolean polyFilledZones(int x, int y)
           
 void polyOutline(int[] xPoints, int[] yPoints, int n, int holeCode, int x, int y)
          Draws the outline of the polygon represented by xPoints and yPoints.
 boolean polyOutlineZones(int x, int y)
           
 void setDrawGrid(com.klg.jclass.chart3d.DrawGrid drawGrid)
          Sets the drawGrid parent.
 void setDrawMeshLine(boolean drawMeshLine)
          Sets whether the mesh line gets drawn for this facet.
 void setGC(Graphics gc)
          Sets the graphics context used to draw this facet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

drawGrid

protected com.klg.jclass.chart3d.DrawGrid drawGrid
Parent DrawGrid object.


gc

protected transient Graphics gc
The graphics context used.


drawMeshLine

protected boolean drawMeshLine
If this facet has been triangularized, draw the mesh line for this facet?

Method Detail

setDrawGrid

public void setDrawGrid(com.klg.jclass.chart3d.DrawGrid drawGrid)
Sets the drawGrid parent.

Specified by:
setDrawGrid in interface DrawFacet
Parameters:
drawGrid -

getDrawGrid

public com.klg.jclass.chart3d.DrawGrid getDrawGrid()
Gets the drawGrid parent.

Specified by:
getDrawGrid in interface DrawFacet

setGC

public void setGC(Graphics gc)
Sets the graphics context used to draw this facet.

Specified by:
setGC in interface DrawFacet
Parameters:
gc -

getGC

public Graphics getGC()
Gets the graphics context used to draw this facet.

Specified by:
getGC in interface DrawFacet

setDrawMeshLine

public void setDrawMeshLine(boolean drawMeshLine)
Sets whether the mesh line gets drawn for this facet.

Specified by:
setDrawMeshLine in interface DrawFacet
Parameters:
drawMeshLine -

getDrawMeshLine

public boolean getDrawMeshLine()
Returns whether the mesh line get drawn for this facet.


polyOutline

public void polyOutline(int[] xPoints,
                        int[] yPoints,
                        int n,
                        int holeCode,
                        int x,
                        int y)
Draws the outline of the polygon represented by xPoints and yPoints. This will either be a 3 or 4 sided polygon depending on whether the original facet has been triangularized.

Specified by:
polyOutline in interface DrawFacet
Parameters:
xPoints -
yPoints -
n -
holeCode -
x -
y -

polyFilled

public void polyFilled(int[] xPoints,
                       int[] yPoints,
                       int n,
                       int holeCode)
Fills the polygon represented by xPoints and yPoints. This will either be a 3 or 4 sided polygon depending on whether the original facet has been triangularized.

Specified by:
polyFilled in interface DrawFacet
Parameters:
xPoints -
yPoints -
n -
holeCode -

polyErase

public void polyErase(int[] xPoints,
                      int[] yPoints,
                      int n,
                      int holeCode)
Erases the polygon represented by xPoints and yPoints. This will either be a 3 or 4 sided polygon depending on whether the original facet has been triangularized. Erasing is needed so that the correct background will show underneath the facet.

Specified by:
polyErase in interface DrawFacet
Parameters:
xPoints -
yPoints -
n -
holeCode -

polyFilledZones

public boolean polyFilledZones(int x,
                               int y)
Specified by:
polyFilledZones in interface DrawFacet
Parameters:
x -
y -

polyContours

public void polyContours(int x,
                         int y)
Specified by:
polyContours in interface DrawFacet
Parameters:
x -
y -

polyOutlineZones

public boolean polyOutlineZones(int x,
                                int y)
Specified by:
polyOutlineZones in interface DrawFacet
Parameters:
x -
y -

draw

public abstract void draw(int[] xPoints,
                          int[] yPoints,
                          int n,
                          int holeCode,
                          int x,
                          int y)
Specified by:
draw in interface DrawFacet
Parameters:
xPoints -
yPoints -
n -
holeCode -
x -
y -

Copyright © 2004 Quest Software Inc..
All rights reserved.