Class Curve

java.lang.Object
  |
  +--Symbol
        |
        +--Curve
All Implemented Interfaces:
Addable, AlignmentListener, DragableSymbol, Element, Modable, Region, java.io.Serializable, SubSelectable

public class Curve
extends Symbol
implements AlignmentListener, Addable, DragableSymbol, Region, Modable

Editable cuve, a basic drawing primative.
Edit by adding and moving anchor points. The spline curve can be drawn with line types, or it can define an area.

See Also:
Serialized Form

Field Summary
(package private)  java.util.Vector atribs
           
(package private)  java.awt.geom.GeneralPath changepath
           
(package private)  boolean closed
           
(package private)  java.awt.geom.Point2D dragpos
           
(package private)  PointSym editpoint
           
(package private)  Fill fill
           
(package private) static double GLENGTH
           
(package private)  boolean hasarrows
           
(package private)  javax.swing.JRadioButton inbutton
           
(package private)  javax.swing.JRadioButton notinout
           
(package private)  javax.swing.JRadioButton outbutton
           
(package private)  java.awt.Paint paint
           
(package private)  Comp parent
           
(package private)  java.awt.geom.GeneralPath path
          The path followed byte the curve.
Must be recomputed before being used.
(package private)  java.util.Vector points
          The anchor points of the curve, int order.
(package private)  java.awt.Shape selectregion
           
(package private) static int SELTOL
           
private static long serialVersionUID
           
(package private)  LinePicker style
           
(package private)  java.util.Vector subpath
           
(package private)  java.util.Vector subpathatt
           
(package private)  java.awt.Shape transformedchangepath
           
(package private)  CurveAtt wholeatt
           
 
Fields inherited from class Symbol
makenames, name, namefield
 
Fields inherited from interface Region
IN, OUT, OVER, UNDER
 
Constructor Summary
Curve(java.awt.geom.Point2D pos, View view, java.lang.Object arg)
           
 
Method Summary
 void abandonPropertyEdit()
           
 void acceptPropertyEdit()
           
 void add(Symbol newmember, java.util.Set subs, View view)
          Add a symbol to this one.
 java.lang.Class addType()
          Get the type of object that can be added.
 void alignmentChanged()
           
 void build()
           
 void change(java.util.Set changelist, java.awt.geom.Point2D pos, View view)
          Tells this symbol that its parts have changed.
 void delete(Symbol oldmember)
          Delete the given symbol from this symbol.
 void drag(int command, java.awt.geom.Point2D pos, View view)
          Drag the curve as a whole.
 void endDrag(int comand, java.awt.geom.Point2D pos, View view)
           
 void flip(java.util.Set subsel)
           
 java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform trans)
           
 java.awt.geom.Area getIn(View view)
           
 int getLevel()
           
 void getPropertyEdit(java.lang.Object[] edits, int slot, java.util.Set sub, Symbol par)
           
 java.util.Collection getSelectable()
           
 void paint(View view)
           
 void prepareForSurveyUpdate()
          Prepare all points for survey update.
 boolean selectProbe(java.awt.geom.Point2D pos, View view)
           
 void setFill(java.awt.Color c)
           
 void setFill(Fill fill)
           
 void setLineType(LineType type, Size thick, java.awt.Color color, java.util.Set subsel)
           
 void showAlignee(View view)
           
 java.awt.geom.Point2D showAligner(View view)
           
(package private)  void showArrows(View view)
           
 void showSelected(View view)
           
 void startDrag(int command, java.awt.geom.Point2D pos, View view)
           
 void useSurveyUpdate()
          Tell all points to use a survey update that just happened.
 boolean valid()
           
 
Methods inherited from class Symbol
checkName, editProperties, getName, getNew, importSym, recursiveDelete, setName, stripSurveys, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Region
getName
 

Field Detail

serialVersionUID

private static final long serialVersionUID

SELTOL

static int SELTOL

points

java.util.Vector points
The anchor points of the curve, int order.


path

transient java.awt.geom.GeneralPath path
The path followed byte the curve.
Must be recomputed before being used.


atribs

java.util.Vector atribs

subpath

transient java.util.Vector subpath

subpathatt

transient java.util.Vector subpathatt

selectregion

transient java.awt.Shape selectregion

wholeatt

CurveAtt wholeatt

paint

java.awt.Paint paint

fill

Fill fill

closed

boolean closed

hasarrows

boolean hasarrows

editpoint

transient PointSym editpoint

inbutton

transient javax.swing.JRadioButton inbutton

outbutton

transient javax.swing.JRadioButton outbutton

notinout

transient javax.swing.JRadioButton notinout

parent

transient Comp parent

style

transient LinePicker style

dragpos

transient java.awt.geom.Point2D dragpos

GLENGTH

static double GLENGTH

changepath

transient java.awt.geom.GeneralPath changepath

transformedchangepath

transient java.awt.Shape transformedchangepath
Constructor Detail

Curve

public Curve(java.awt.geom.Point2D pos,
             View view,
             java.lang.Object arg)
Method Detail

prepareForSurveyUpdate

public void prepareForSurveyUpdate()
Prepare all points for survey update.

Overrides:
prepareForSurveyUpdate in class Symbol

useSurveyUpdate

public void useSurveyUpdate()
Tell all points to use a survey update that just happened.

Overrides:
useSurveyUpdate in class Symbol

getLevel

public int getLevel()
Overrides:
getLevel in class Symbol

getPropertyEdit

public void getPropertyEdit(java.lang.Object[] edits,
                            int slot,
                            java.util.Set sub,
                            Symbol par)
Overrides:
getPropertyEdit in class Symbol

acceptPropertyEdit

public void acceptPropertyEdit()
Overrides:
acceptPropertyEdit in class Symbol

abandonPropertyEdit

public void abandonPropertyEdit()
Overrides:
abandonPropertyEdit in class Symbol

getBounds

public java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform trans)
Overrides:
getBounds in class Symbol

selectProbe

public boolean selectProbe(java.awt.geom.Point2D pos,
                           View view)
Overrides:
selectProbe in class Symbol

valid

public boolean valid()
Overrides:
valid in class Symbol

showSelected

public void showSelected(View view)
Overrides:
showSelected in class Symbol

startDrag

public void startDrag(int command,
                      java.awt.geom.Point2D pos,
                      View view)
Specified by:
startDrag in interface DragableSymbol

drag

public void drag(int command,
                 java.awt.geom.Point2D pos,
                 View view)
Drag the curve as a whole.

Specified by:
drag in interface DragableSymbol

endDrag

public void endDrag(int comand,
                    java.awt.geom.Point2D pos,
                    View view)
Specified by:
endDrag in interface DragableSymbol
Overrides:
endDrag in class Symbol

alignmentChanged

public void alignmentChanged()
Specified by:
alignmentChanged in interface AlignmentListener

getSelectable

public java.util.Collection getSelectable()
Specified by:
getSelectable in interface SubSelectable

addType

public java.lang.Class addType()
Description copied from interface: Addable
Get the type of object that can be added.

Specified by:
addType in interface Addable

add

public void add(Symbol newmember,
                java.util.Set subs,
                View view)
Description copied from interface: Addable
Add a symbol to this one. For example extend a curve

Specified by:
add in interface Addable

delete

public void delete(Symbol oldmember)
Description copied from interface: Addable
Delete the given symbol from this symbol.

Specified by:
delete in interface Addable

change

public void change(java.util.Set changelist,
                   java.awt.geom.Point2D pos,
                   View view)
Description copied from interface: Addable
Tells this symbol that its parts have changed.
and which parts have changed.

Specified by:
change in interface Addable

build

public void build()

flip

public void flip(java.util.Set subsel)

setLineType

public void setLineType(LineType type,
                        Size thick,
                        java.awt.Color color,
                        java.util.Set subsel)

setFill

public void setFill(java.awt.Color c)

setFill

public void setFill(Fill fill)

getIn

public java.awt.geom.Area getIn(View view)
Specified by:
getIn in interface Region

paint

public void paint(View view)
Overrides:
paint in class Symbol

showArrows

void showArrows(View view)

showAlignee

public void showAlignee(View view)
Specified by:
showAlignee in interface AlignmentListener

showAligner

public java.awt.geom.Point2D showAligner(View view)