flatscape.glyph
Class FPolygon

java.lang.Object
  |
  +--manifold.base.Glyph
        |
        +--flatscape.FGlyph
              |
              +--flatscape.glyph.GeometricFigure
                    |
                    +--flatscape.glyph.FPolygon
All Implemented Interfaces:
java.lang.Cloneable, Configurable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class FPolygon
extends GeometricFigure

Glyph to render polygons

Copyright (c) 2001 Rutgers, The State University of New Jersey

Since:
flatscape %Version%
Version:
%Version%, %Time%

Field Summary
 
Fields inherited from class flatscape.glyph.GeometricFigure
fillColor_, height_, lineColor_, lineWidth_, width_
 
Fields inherited from class flatscape.FGlyph
curInteractionPoint, DEFAULT, interactionPoints, POINTSIZE, selected_
 
Fields inherited from class manifold.base.Glyph
model_, TRANSFORM, viewer_, visible_
 
Constructor Summary
FPolygon()
           
 
Method Summary
 void draw(Traversal t)
          FGlyphs can not be drawed - Does nothing.
protected  void drawTriangles(java.util.Vector triangles, java.awt.Graphics2D g, double[] projectionPlane)
           
protected  java.awt.Shape getBoundingShape()
          Gets the bounding shape of the glyph.
protected  java.awt.Shape getShape()
           
protected  java.awt.Shape getShape(double[] plane)
           
protected  FShape getTriangle(float[] p1, float[] p2, float[] p3, double[] projectionPlane)
           
protected  java.util.Vector getTriangles(float[] vertices, double[] projectionPlane)
           
 void propertyChange(org.w3c.dom.Element source, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
          Method called by a UForm which had a change of a property.
protected  void updateInteractionPoints()
          Updates the interaction points.
 
Methods inherited from class flatscape.glyph.GeometricFigure
getLimits, updateProperties
 
Methods inherited from class flatscape.FGlyph
addInteractionPoint, children, config, constructGlyph, drawSelectionBox, getAllowsChildren, getChildAt, getChildCount, getIndex, getInteractionPoint, getParent, getTransform, getTransform, insert, isLeaf, moveInteractionPoint, pick, pickInteractionPoint, remove, remove, removeFromParent, setInteractionPoint, setModel, setParent, setSelected, setUserObject, toString, traverse, validTypes
 
Methods inherited from class manifold.base.Glyph
getModel, getViewer, isVisible, setViewer, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FPolygon

public FPolygon()
Method Detail

draw

public void draw(Traversal t)
Description copied from class: FGlyph
FGlyphs can not be drawed - Does nothing.

Overrides:
draw in class GeometricFigure
Parameters:
t - keeps the state of the traversal

getShape

protected java.awt.Shape getShape()
Specified by:
getShape in class GeometricFigure
Returns:
the shape to be drawn. Must be implemented by sub-classes.

getShape

protected java.awt.Shape getShape(double[] plane)
Overrides:
getShape in class GeometricFigure

getTriangles

protected java.util.Vector getTriangles(float[] vertices,
                                        double[] projectionPlane)

getTriangle

protected FShape getTriangle(float[] p1,
                             float[] p2,
                             float[] p3,
                             double[] projectionPlane)

drawTriangles

protected void drawTriangles(java.util.Vector triangles,
                             java.awt.Graphics2D g,
                             double[] projectionPlane)

propertyChange

public void propertyChange(org.w3c.dom.Element source,
                           java.lang.String name,
                           java.lang.Object oldValue,
                           java.lang.Object newValue)
Description copied from class: GeometricFigure
Method called by a UForm which had a change of a property.

Overrides:
propertyChange in class GeometricFigure
Parameters:
source - the UForm which had a property change
name - the name of the property
oldValue - the old value of the property
newValue - the new value of the property

getBoundingShape

protected java.awt.Shape getBoundingShape()
Description copied from class: FGlyph
Gets the bounding shape of the glyph. Must be overridden by sub-classes if the pick(Traversal t) method of FGlyph is to be used

Overrides:
getBoundingShape in class GeometricFigure
Returns:
a Rectangular shape by default. Should be overridden if pick must be performed using a different shape than draw.

updateInteractionPoints

protected void updateInteractionPoints()
Description copied from class: FGlyph
Updates the interaction points. By default, it defines 8 points around the bounding rectangle. Must be overriden if interactions points are used differently.

Overrides:
updateInteractionPoints in class FGlyph


Copyright (c) 2003 Rutgers, The State University of New Jersey