flatscape.glyph
Class GeometricFigure

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

public abstract class GeometricFigure
extends FGlyph

Base geometric figure glyph.

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

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

Field Summary
protected  java.awt.Color fillColor_
          Copy of fill.color property.
protected  double height_
          Copy of height property.
protected  java.awt.Color lineColor_
          Copy of line.color property.
protected  double lineWidth_
          Copy of line.width property.
protected  double width_
          Copy of width property.
 
Fields inherited from class flatscape.FGlyph
curInteractionPoint, DEFAULT, interactionPoints, POINTSIZE, selected_
 
Fields inherited from class manifold.base.Glyph
model_, TRANSFORM, viewer_, visible_
 
Constructor Summary
GeometricFigure()
           
 
Method Summary
 void draw(Traversal t)
          FGlyphs can not be drawed - Does nothing.
protected  java.awt.Shape getBoundingShape()
          Gets the bounding shape of the glyph.
 Limits getLimits()
           
protected abstract  java.awt.Shape getShape()
           
protected  java.awt.Shape getShape(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 updateProperties()
          Updates the local copies of the properties from the model.
 
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, updateInteractionPoints, 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
 

Field Detail

width_

protected double width_
Copy of width property.


height_

protected double height_
Copy of height property.


lineColor_

protected java.awt.Color lineColor_
Copy of line.color property.


lineWidth_

protected double lineWidth_
Copy of line.width property.


fillColor_

protected java.awt.Color fillColor_
Copy of fill.color property.

Constructor Detail

GeometricFigure

public GeometricFigure()
Method Detail

draw

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

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

getShape

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

getShape

protected java.awt.Shape getShape(double[] projectionPlane)

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 FGlyph
Returns:
a Rectangular shape by default. Should be overridden if pick must be performed using a different shape than draw.

updateProperties

protected void updateProperties()
Updates the local copies of the properties from the model.

Overrides:
updateProperties in class FGlyph

getLimits

public Limits getLimits()
Overrides:
getLimits in class FGlyph

propertyChange

public 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.

Overrides:
propertyChange in class FGlyph
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


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