Class Unit

java.lang.Object
  |
  +--Unit
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Unit
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Field Summary
 Unit base
           
(package private)  javax.swing.JComboBox basefield
           
static Unit cm
           
 boolean editable
           
static Unit foot
           
static java.lang.String GENERIC
           
static Unit inch
           
static Unit meter
           
 java.lang.String name
           
static Unit pixel
           
 java.lang.String plural
           
(package private) static Unit[] predefined
           
private static long serialVersionUID
           
 double size
           
(package private)  javax.swing.JTextField valuefield
           
static boolean warncalibration
           
 
Constructor Summary
Unit(double size, Unit base)
           
Unit(double size, Unit base, boolean editable)
           
Unit(java.lang.String name, java.lang.String plural)
           
Unit(java.lang.String name, java.lang.String plural, boolean editable)
           
Unit(java.lang.String name, java.lang.String plural, double size, Unit base, boolean editable)
           
Unit(Unit base)
           
 
Method Summary
 void applyEdit()
           
 void clearEdit()
           
 java.lang.Object clone()
           
 javax.swing.JPanel getEditor(java.lang.String lab)
           
 Unit getRoot()
           
 double getRootSize()
           
(package private)  java.lang.Object readResolve()
           
 java.lang.String toString()
           
 double toUnit(Unit that)
           
 double toUnit(Unit that, double calib)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

GENERIC

public static java.lang.String GENERIC

meter

public static Unit meter

cm

public static Unit cm

foot

public static Unit foot

inch

public static Unit inch

pixel

public static Unit pixel

predefined

static Unit[] predefined

warncalibration

public static boolean warncalibration

size

public double size

base

public Unit base

name

public java.lang.String name

plural

public java.lang.String plural

editable

public boolean editable

valuefield

transient javax.swing.JTextField valuefield

basefield

transient javax.swing.JComboBox basefield
Constructor Detail

Unit

public Unit(java.lang.String name,
            java.lang.String plural,
            double size,
            Unit base,
            boolean editable)

Unit

public Unit(double size,
            Unit base,
            boolean editable)

Unit

public Unit(double size,
            Unit base)

Unit

public Unit(Unit base)

Unit

public Unit(java.lang.String name,
            java.lang.String plural,
            boolean editable)

Unit

public Unit(java.lang.String name,
            java.lang.String plural)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

readResolve

java.lang.Object readResolve()
                       throws java.io.ObjectStreamException
java.io.ObjectStreamException

getRoot

public Unit getRoot()

getRootSize

public double getRootSize()

toUnit

public double toUnit(Unit that)

toUnit

public double toUnit(Unit that,
                     double calib)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getEditor

public javax.swing.JPanel getEditor(java.lang.String lab)

applyEdit

public void applyEdit()

clearEdit

public void clearEdit()