| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.controls.JetProperty
jet.controls.JetNumber
jet.controls.JetUnitNumber
public class JetUnitNumber
JetUnitNumber ,for saving/retrieving an integer with unit
 
| Field Summary | 
|---|
| Fields inherited from interface jet.util.Propertiable | 
|---|
| BIGSTRING, BOOLEAN, CHG_FMTTINGBLNAME, CHG_FMTTINGFORMULA, CHG_OTHER, COLOR, COMPFML_RESOURCE, CUSTOMER, CUSTOMERLINK, DELIM, DELIMCHAR, DOUBLE, ENUMERATION, IGNORED, IMAGE, IMGVECTOR, MAPPINGTBL, NORMAL_RESOURCE, NUMBER, REFERENCE, STRING, SUB1_DELIM, UNIT, VAL_NORMALLENGTH, VAL_NORMALSTART, VECTOR | 
| Constructor Summary | |
|---|---|
| JetUnitNumber() | |
| JetUnitNumber(jet.controls.JetObject parent,
              java.lang.String name)Constructor. Create a JetUnitNumber instance with default value and normal value are 0unit. | |
| JetUnitNumber(jet.controls.JetObject parent,
              java.lang.String name,
              int defval)Constructor. Create a JetUnitNumber instance with specified unit value. | |
| Method Summary | |
|---|---|
| static int | convertToPixel(java.lang.String value,
               int unit)Deprecated. | 
| static int | convertToUnit(java.lang.String value,
              int unit)Deprecated. | 
|  double | doubleValue()Deprecated. | 
|  float | floatValue()Deprecated. | 
|  int | get()Deprecated. | 
| static java.lang.String | get(int value,
    int unit,
    int fraction)Deprecated. | 
|  java.lang.String | getInspValue()Only For Designer UI: Convert the unit value to pixel as string | 
|  java.lang.String | getInspValue(int unit,
             int fraction)Only For Designer UI: Converts the unit value to inch or centimeter as formated string | 
|  java.lang.Object | getObject()Effective if JetProperty.isCurrentAutoValue()is false, returns a Integer Object.comments by 'unknown' author: add for Layout group , they use "Integer" to cast getObject() of JetUnitNumber . | 
|  int | getUnit()According to the following priority return : normal value > default value | 
| static java.lang.String | getUnit(int value,
        int unit,
        int fraction)Deprecated. | 
|  int | intValue()Deprecated. | 
|  long | longValue()Deprecated. | 
|  void | set(double value)Deprecated. | 
|  void | set(float value)Deprecated. | 
|  void | set(int value)Deprecated. | 
|  void | set(long value)Deprecated. | 
|  void | set(java.lang.String theval)Deprecated. | 
|  void | setCanChangeByOthers(boolean bSet)Sets can the property be changed by 'another object'. | 
|  void | setInt(int value)Sets normal value via specified unit value; | 
|  void | setUnitValue(int theval)Sets normal value via specified unit value; | 
|  void | setUnitValue(java.lang.String theval)Sets normal value via specified String that be treated as unit value; | 
|  java.lang.String | toCentimeterString()Deprecated. | 
|  java.lang.String | toInchString()Deprecated. | 
|  java.lang.String | toString()Convert the unit value to pixel as string | 
|  java.lang.String | toUnitString()Effective if JetProperty.isCurrentAutoValue()is false; returns the unit value as string, the unit value is (with priority)normal value > default value | 
| Methods inherited from class jet.controls.JetNumber | 
|---|
| addToAtomicAction, getInt, getMatchingSqlType, getPropertyChoice, setPropertyChoice, setValue | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface jet.convert.NumberInfo | 
|---|
| getInt | 
| Methods inherited from interface jet.convert.PropInfo | 
|---|
| getChangeByObjectName, getName, getValue, isChangeByOther, isNull | 
| Constructor Detail | 
|---|
public JetUnitNumber()
public JetUnitNumber(jet.controls.JetObject parent,
                     java.lang.String name)
parent - ownername - name
public JetUnitNumber(jet.controls.JetObject parent,
                     java.lang.String name,
                     int defval)
parent - ownername - namedefval - the unit value set to default value and normal value| Method Detail | 
|---|
public static int convertToPixel(java.lang.String value,
                                 int unit)
value - the string can converted to double valueunit - the unit-type of value, MUST BE Unit.INCH or Unit.CENTIMETER
java.lang.NumberFormatException - if the value does not contain parsable number.Unit.INCH, 
Unit.CENTIMETER, 
Unit.convertInchToPixel(double), 
Unit.convertCentimeterToPixel(double), 
DecimalFormat.parse(String, ParsePosition)
public static java.lang.String get(int value,
                                   int unit,
                                   int fraction)
value - the pixel valueunit - the unit-type of return MUST BE Unit.INCH or Unit.CENTIMETERfraction - the fractionUnit.INCH, 
Unit.CENTIMETER, 
Unit.convertPixelToInch(int), 
Unit.convertPixelToCentimeter(int), 
NumberFormat.format(double), 
DecimalFormat.setMaximumFractionDigits(int)
public static int convertToUnit(java.lang.String value,
                                int unit)
value - the string can converted to double valueunit - the unit-type of value, MUST BE Unit.INCH or Unit.CENTIMETER
java.lang.NumberFormatException - if the value does not contain parsable number.Unit.INCH, 
Unit.CENTIMETER, 
Unit.convertInchToUnit(double), 
Unit.convertCentimeterToUnit(double), 
DecimalFormat.parse(String, ParsePosition)
public static java.lang.String getUnit(int value,
                                       int unit,
                                       int fraction)
value - the unit valueunit - the unit-type of result MUST BE Unit.INCH or Unit.CENTIMETERfraction - the fractionUnit.INCH, 
Unit.CENTIMETER, 
Unit.convertUnitToInch(int), 
Unit.convertUnitToCentimeter(int), 
NumberFormat.format(double), 
DecimalFormat.setMaximumFractionDigits(int)public void set(int value)
set in class JetNumbervalue - the pixel valuesetUnitValue(int), 
setInt(int), 
Unit.convertPixelToUnit(int)public void set(long value)
set in class JetNumbervalue - the pixel valuesetUnitValue(int), 
Unit.convertPixelToUnit(long)public void set(float value)
set in class JetNumbervalue - : the pixel valuesetUnitValue(int), 
Unit.convertPixelToUnit(float)public void set(double value)
set in class JetNumbervalue - the pixel valuesetUnitValue(int), 
Unit.convertPixelToUnit(double)public void set(java.lang.String theval)
set in interface jet.util.Propertiableset in class JetNumbertheval - a String that be treated as integer pixel value
java.lang.NumberFormatException - if the value does not contain parsable integer.setUnitValue(String), 
Unit.convertPixelToUnit(int)public void setInt(int value)
setInt in interface jet.controls.IntegerablesetInt in class JetNumbervalue - a unit valuesetUnitValue(int)public void setUnitValue(java.lang.String theval)
setUnitValue in class JetPropertytheval - a String that be treated as unit value, null or empty-string means default valueJetProperty.toUnitString()public void setUnitValue(int theval)
theval - a unit valuepublic int intValue()
JetNumberJetProperty.isCurrentAutoValue() is false;according to the following priority return : normal value > default value as integer
intValue in interface jet.convert.NumberInfointValue in class JetNumberUnit.convertUnitToPixel(int), 
getUnit()public long longValue()
JetNumberJetProperty.isCurrentAutoValue() is false;according to the following priority return : normal value > default value as long
longValue in interface jet.convert.NumberInfolongValue in class JetNumberUnit.convertUnitToPixel(long), 
getUnit()public float floatValue()
JetNumberJetProperty.isCurrentAutoValue() is false;according to the following priority return : normal value > default value as float
floatValue in interface jet.convert.NumberInfofloatValue in class JetNumberUnit.convertUnitToPixel(float), 
getUnit()public double doubleValue()
JetNumberJetProperty.isCurrentAutoValue() is false;according to the following priority return : normal value > default value as double
doubleValue in interface jet.convert.NumberInfodoubleValue in class JetNumberUnit.convertUnitToPixel(double), 
getUnit()public int get()
JetNumberJetProperty.isCurrentAutoValue() is false; according to the following priority return : normal value > default value as integer
get in interface jet.convert.NumberInfoget in class JetNumberUnit.convertUnitToPixel(int), 
getUnit()public int getUnit()
getUnit in interface jet.convert.UnitNumberInfo
public java.lang.String getInspValue(int unit,
                                     int fraction)
getInspValue in class JetPropertyunit - unit-type of return, must be one of Unit.INCH or Unit.CENTIMETERfraction - getUnit(int, int, int), 
Unit.INCH, 
Unit.CENTIMETER, 
Unit.convertUnitToInch(int), 
Unit.convertUnitToCentimeter(int), 
DecimalFormat.setMaximumFractionDigits(int), 
NumberFormat.format(double)public java.lang.String getInspValue()
getInspValue in interface jet.convert.PropInfogetInspValue in class JetPropertytoString()public java.lang.String toInchString()
toInchString in interface jet.convert.UnitNumberInfoUnit.convertUnitToInch(int), 
getUnit()public java.lang.String toCentimeterString()
toCentimeterString in interface jet.convert.UnitNumberInfoUnit.convertUnitToCentimeter(int), 
getUnit()public java.lang.String toUnitString()
JetPropertyJetProperty.isCurrentAutoValue() is false; returns the unit value as string, the unit value is (with priority)normal value > default value
toUnitString in interface jet.convert.PropInfotoUnitString in interface jet.convert.UnitNumberInfotoUnitString in class JetPropertyObject.toString(), 
JetProperty.isCurrentAutoValue()public java.lang.String toString()
toString in interface jet.convert.PropInfotoString in class JetNumberJetNumber.set(String), 
String.valueOf(int), 
String.valueOf(float), 
String.valueOf(double), 
String.valueOf(long), 
JetProperty.isCurrentAutoValue()public void setCanChangeByOthers(boolean bSet)
JetProperty
setCanChangeByOthers in class JetPropertyJetProperty.canChangeByOther, 
JetProperty.canChangeByOthers(), 
JetProperty.enableAllChangeBys(boolean)public java.lang.Object getObject()
JetProperty.isCurrentAutoValue() is false, returns a Integer Object.
getObject in interface jet.util.PropertiablegetObject in class JetPropertyJetProperty.isCurrentAutoValue()| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||