Class Segment

java.lang.Object
  |
  +--Symbol
        |
        +--Segment
All Implemented Interfaces:
java.awt.event.ActionListener, Editable, Element, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
SectionSeg

public class Segment
extends Symbol
implements Editable, java.awt.event.ActionListener

See Also:
Serialized Form

Field Summary
static double AFACT
           
static java.awt.Color backc
           
static java.awt.Color borderc
           
 SegBoundary boundary
           
 ImageJob[] cookers
           
 double cookfact
           
static boolean cookondemand
           
(package private)  java.awt.geom.AffineTransform cooktransform
           
static double defscale
           
static boolean deftransparent
           
(package private)  boolean dirty
           
static boolean dobig
           
static java.lang.String EDIT
           
(package private)  boolean exdone
           
(package private)  int fixcnt
           
(package private)  java.awt.Image hardcooked
           
(package private)  ImageFile isource
           
 int lastindex
           
static int levels
           
static int LINEAR
           
static boolean lockall
           
(package private)  Mapping map
           
static java.lang.String MORPH
           
static int MORPHABLE
           
static int MORPHED
           
 double oldscale
           
(package private) static boolean openscaled
           
 double overlayscale
           
static int QUEUED
           
static int READING
           
static boolean removeunmorphed
           
static java.awt.Color selectc
           
private static long serialVersionUID
           
(package private)  Survey set
           
static int SOLVED
           
(package private)  java.io.File source
           
static java.awt.Color stationc
           
 int status
           
static java.awt.Color surveyc
           
 java.lang.Object thumbdata
           
 int thumbh
           
 java.awt.image.BufferedImage thumbnail
           
static boolean thumbs
           
 int thumbw
           
 boolean transparent
           
static boolean usebigger
           
static boolean usesmaller
           
static int WORKING
           
 
Fields inherited from class Symbol
makenames, name, namefield
 
Constructor Summary
Segment()
           
Segment(Survey survey, boolean isVertical)
           
 
Method Summary
 void abandonPropertyEdit()
           
 void acceptPropertyEdit()
           
 void actionPerformed(java.awt.event.ActionEvent e)
           
 double area()
           
 double area(java.util.Collection exclude)
           
 boolean check()
           
 boolean checkSurvey()
           
 boolean cook(SegEditor editor)
           
 boolean cookable()
           
 void doCook(SegEditor editor)
           
 boolean excludeOverlap(Segment other)
           
 java.awt.geom.Rectangle2D getBounds(java.awt.geom.AffineTransform trans)
           
(package private)  java.awt.Image getCooked()
           
 ImageJob getCooked(double scale, java.awt.Component user, boolean wait)
           
 Editor getEditor(CartoFrame frame)
           
 java.awt.Image getImage()
           
 int getLevel()
           
 java.lang.String getMorphStatusString()
           
 void getMorphStatusString(javax.swing.JLabel res)
           
 java.awt.Polygon getPoly(double scale)
           
 void getPropertyEdit(java.lang.Object[] edits, int slot, java.util.Set sub, Symbol parent)
           
 Symbol importSym(Carto dest, Carto source)
          Called when this Symbol is moved to a new Carto file.
Some Symbols hold references to parts of the old file.
 boolean isDirty()
           
 void paint(View view)
           
 void ptest(java.lang.String pt)
           
private  void readObject(java.io.ObjectInputStream stream)
          Reads Symbol from a stream.
 boolean selectProbe(java.awt.geom.Point2D where, View view)
           
(package private)  void setCooked(java.awt.image.BufferedImage cooked)
           
 void showOutline(View view)
           
 void showSelected(View view)
           
 void solve()
           
static double totalArea(java.util.Vector all)
           
(package private)  void unCook()
           
private  void writeObject(java.io.ObjectOutputStream stream)
           
 
Methods inherited from class Symbol
checkName, editProperties, endDrag, getName, getNew, prepareForSurveyUpdate, recursiveDelete, setName, stripSurveys, toString, useSurveyUpdate, valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Element
getName, setName
 

Field Detail

serialVersionUID

private static final long serialVersionUID

backc

public static java.awt.Color backc

borderc

public static java.awt.Color borderc

stationc

public static java.awt.Color stationc

surveyc

public static java.awt.Color surveyc

selectc

public static java.awt.Color selectc

removeunmorphed

public static boolean removeunmorphed

defscale

public static double defscale

deftransparent

public static boolean deftransparent

MORPH

public static java.lang.String MORPH

EDIT

public static java.lang.String EDIT

source

java.io.File source

isource

ImageFile isource

set

Survey set

boundary

public SegBoundary boundary

map

Mapping map

fixcnt

int fixcnt

dirty

boolean dirty

openscaled

static boolean openscaled

transparent

public boolean transparent

cookfact

public double cookfact

MORPHABLE

public static int MORPHABLE

SOLVED

public static int SOLVED

MORPHED

public static int MORPHED

LINEAR

public static int LINEAR

WORKING

public static int WORKING

READING

public static int READING

QUEUED

public static int QUEUED

status

public int status

hardcooked

transient java.awt.Image hardcooked

thumbnail

public transient java.awt.image.BufferedImage thumbnail

cooktransform

java.awt.geom.AffineTransform cooktransform

cookondemand

public static boolean cookondemand

thumbs

public static boolean thumbs

lockall

public static boolean lockall

levels

public static int levels

dobig

public static boolean dobig

usebigger

public static boolean usebigger

usesmaller

public static boolean usesmaller

cookers

public ImageJob[] cookers

oldscale

public transient double oldscale

lastindex

public transient int lastindex

overlayscale

public double overlayscale

thumbw

public int thumbw

thumbh

public int thumbh

thumbdata

public java.lang.Object thumbdata

AFACT

public static double AFACT

exdone

transient boolean exdone
Constructor Detail

Segment

public Segment()

Segment

public Segment(Survey survey,
               boolean isVertical)
Method Detail

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

writeObject

private void writeObject(java.io.ObjectOutputStream stream)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException

solve

public void solve()

checkSurvey

public boolean checkSurvey()

importSym

public Symbol importSym(Carto dest,
                        Carto source)
Description copied from class: Symbol
Called when this Symbol is moved to a new Carto file.
Some Symbols hold references to parts of the old file. Get rid of them, and replace them with what they should be int the new context.

Overrides:
importSym in class Symbol

check

public boolean check()

getEditor

public Editor getEditor(CartoFrame frame)
Specified by:
getEditor in interface Editable

selectProbe

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

showSelected

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

showOutline

public void showOutline(View view)

area

public double area()

getPoly

public java.awt.Polygon getPoly(double scale)

area

public double area(java.util.Collection exclude)

totalArea

public static double totalArea(java.util.Vector all)

excludeOverlap

public boolean excludeOverlap(Segment other)

cookable

public boolean cookable()

getMorphStatusString

public java.lang.String getMorphStatusString()

getCooked

java.awt.Image getCooked()

setCooked

void setCooked(java.awt.image.BufferedImage cooked)
         throws CookKillException
CookKillException

getCooked

public ImageJob getCooked(double scale,
                          java.awt.Component user,
                          boolean wait)

unCook

void unCook()

getImage

public java.awt.Image getImage()

getMorphStatusString

public void getMorphStatusString(javax.swing.JLabel res)

cook

public boolean cook(SegEditor editor)
             throws CookKillException
CookKillException

ptest

public void ptest(java.lang.String pt)

paint

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

getBounds

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

isDirty

public boolean isDirty()

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

abandonPropertyEdit

public void abandonPropertyEdit()
Overrides:
abandonPropertyEdit in class Symbol

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

doCook

public void doCook(SegEditor editor)