Class Sub

java.lang.Object
  |
  +--Symbol
        |
        +--Sub
All Implemented Interfaces:
Aligner, AlignmentListener, DragableSymbol, Element, java.io.Serializable
Direct Known Subclasses:
Box, Glyph, Text

public abstract class Sub
extends Symbol
implements DragableSymbol, Aligner

See Also:
Serialized Form

Field Summary
 PointSym anchorpoint
           
(package private)  javax.swing.JRadioButton botf
           
 SavableRectangle2D box
           
(package private)  boolean brandnew
           
(package private)  boolean cornerdrag
           
 java.awt.geom.Point2D[] corners
           
(package private)  java.awt.geom.Point2D dragpos
           
 boolean editaspect
           
(package private)  javax.swing.JComboBox editmodef
           
 boolean editrotation
           
 boolean editscale
           
 double handlex
           
 double handley
           
(package private)  javax.swing.JRadioButton heightf
           
(package private)  javax.swing.JRadioButton leftf
           
(package private)  boolean located
           
(package private) static double MINR
           
(package private)  java.awt.geom.Point2D origin
           
 ViewTransform pos
           
 ViewTransform relativepos
           
(package private)  javax.swing.JRadioButton rightf
           
private static long serialVersionUID
           
 boolean showcorners
           
 Size size
           
(package private)  javax.swing.JComboBox sizefield
           
 boolean sizewidth
           
 double subaspect
           
(package private)  javax.swing.JRadioButton topf
           
(package private)  javax.swing.JRadioButton widthf
           
 
Fields inherited from class Symbol
makenames, name, namefield
 
Fields inherited from interface Aligner
absolute, datum, floating
 
Constructor Summary
Sub()
           
Sub(java.awt.geom.Point2D where, View view, java.lang.Object arg)
           
 
Method Summary
 void abandonPropertyEdit()
           
 void acceptPropertyEdit()
           
 void alignmentChanged()
           
 void checkSize(View view)
           
(package private)  void clear()
           
 void copy(Sub that)
           
 void drag(int command, java.awt.geom.Point2D where, View view)
           
 void endDrag(int comand, java.awt.geom.Point2D pos, View view)
           
 ViewTransform getAlignTransform()
           
 java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform trans)
           
protected  java.util.Vector getEditModes()
          Get the edit modes that are supported.
 int getLevel()
           
(package private)  java.awt.geom.Point2D getPolar(java.awt.geom.Point2D p, View v)
           
 void getPropertyEdit(java.lang.Object[] edits, int slot, java.util.Set sub, Symbol parent)
           
 double getScale(Size size, View view)
           
 java.awt.Shape getShape(java.awt.geom.AffineTransform trans)
           
(package private)  void init(java.awt.geom.Point2D where, View view)
           
 void locate()
           
 void paint(View view)
           
abstract  void paintContents(View view)
           
private  void readObject(java.io.ObjectInputStream stream)
          Reads Symbol from a stream.
 void reshape()
           
 boolean selectProbe(java.awt.geom.Point2D pos, View view)
           
 void showAlignee(View view)
           
 java.awt.geom.Point2D showAligner(View view)
           
 void showSelected(View view)
           
 void startDrag(int command, java.awt.geom.Point2D where, View view)
           
 
Methods inherited from class Symbol
checkName, editProperties, getName, getNew, importSym, prepareForSurveyUpdate, recursiveDelete, setName, stripSurveys, toString, useSurveyUpdate, valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

MINR

static double MINR

relativepos

public ViewTransform relativepos

anchorpoint

public PointSym anchorpoint

box

public SavableRectangle2D box

pos

public transient ViewTransform pos

corners

public transient java.awt.geom.Point2D[] corners

handley

public double handley

handlex

public double handlex

origin

transient java.awt.geom.Point2D origin

brandnew

transient boolean brandnew

editaspect

public boolean editaspect

editrotation

public boolean editrotation

editscale

public boolean editscale

showcorners

public boolean showcorners

sizewidth

public boolean sizewidth

subaspect

public double subaspect

size

public Size size

located

transient boolean located

widthf

transient javax.swing.JRadioButton widthf

heightf

transient javax.swing.JRadioButton heightf

sizefield

transient javax.swing.JComboBox sizefield

editmodef

transient javax.swing.JComboBox editmodef

topf

transient javax.swing.JRadioButton topf

botf

transient javax.swing.JRadioButton botf

leftf

transient javax.swing.JRadioButton leftf

rightf

transient javax.swing.JRadioButton rightf

cornerdrag

transient boolean cornerdrag

dragpos

transient java.awt.geom.Point2D dragpos
Constructor Detail

Sub

public Sub()

Sub

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

copy

public void copy(Sub that)

alignmentChanged

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

getEditModes

protected java.util.Vector getEditModes()
Get the edit modes that are supported.


getLevel

public int getLevel()
Overrides:
getLevel in class Symbol

getPropertyEdit

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

acceptPropertyEdit

public void acceptPropertyEdit()
Overrides:
acceptPropertyEdit in class Symbol

clear

void clear()

abandonPropertyEdit

public void abandonPropertyEdit()
Overrides:
abandonPropertyEdit in class Symbol

init

void init(java.awt.geom.Point2D where,
          View view)

getAlignTransform

public ViewTransform getAlignTransform()
Specified by:
getAlignTransform in interface Aligner

locate

public void locate()

readObject

private void readObject(java.io.ObjectInputStream stream)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Description copied from class: Symbol
Reads Symbol from a stream. We define this method so it will appear in the stacktrace if something goes wrong. It does the default.

java.io.IOException
java.lang.ClassNotFoundException

getBounds

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

getShape

public java.awt.Shape getShape(java.awt.geom.AffineTransform trans)

checkSize

public void checkSize(View view)

paint

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

getScale

public double getScale(Size size,
                       View view)

paintContents

public abstract void paintContents(View view)

getPolar

java.awt.geom.Point2D getPolar(java.awt.geom.Point2D p,
                               View v)

selectProbe

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

startDrag

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

drag

public void drag(int command,
                 java.awt.geom.Point2D where,
                 View view)
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

showSelected

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

reshape

public void reshape()

showAlignee

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

showAligner

public java.awt.geom.Point2D showAligner(View view)
Specified by:
showAligner in interface Aligner