|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.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
- namepublic JetUnitNumber(jet.controls.JetObject parent, java.lang.String name, int defval)
parent
- ownername
- namedefval
- the unit value set to default value and normal valueMethod 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.CENTIMETER
fraction
- 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.CENTIMETER
fraction
- 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 JetNumber
value
- the pixel valuesetUnitValue(int)
,
setInt(int)
,
Unit.convertPixelToUnit(int)
public void set(long value)
set
in class JetNumber
value
- the pixel valuesetUnitValue(int)
,
Unit.convertPixelToUnit(long)
public void set(float value)
set
in class JetNumber
value
- : the pixel valuesetUnitValue(int)
,
Unit.convertPixelToUnit(float)
public void set(double value)
set
in class JetNumber
value
- the pixel valuesetUnitValue(int)
,
Unit.convertPixelToUnit(double)
public void set(java.lang.String theval)
set
in interface jet.util.Propertiable
set
in class JetNumber
theval
- 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.Integerable
setInt
in class JetNumber
value
- a unit valuesetUnitValue(int)
public void setUnitValue(java.lang.String theval)
setUnitValue
in class JetProperty
theval
- 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()
JetNumber
JetProperty.isCurrentAutoValue()
is false;according to the following priority return : normal value > default value as integer
intValue
in interface jet.convert.NumberInfo
intValue
in class JetNumber
Unit.convertUnitToPixel(int)
,
getUnit()
public long longValue()
JetNumber
JetProperty.isCurrentAutoValue()
is false;according to the following priority return : normal value > default value as long
longValue
in interface jet.convert.NumberInfo
longValue
in class JetNumber
Unit.convertUnitToPixel(long)
,
getUnit()
public float floatValue()
JetNumber
JetProperty.isCurrentAutoValue()
is false;according to the following priority return : normal value > default value as float
floatValue
in interface jet.convert.NumberInfo
floatValue
in class JetNumber
Unit.convertUnitToPixel(float)
,
getUnit()
public double doubleValue()
JetNumber
JetProperty.isCurrentAutoValue()
is false;according to the following priority return : normal value > default value as double
doubleValue
in interface jet.convert.NumberInfo
doubleValue
in class JetNumber
Unit.convertUnitToPixel(double)
,
getUnit()
public int get()
JetNumber
JetProperty.isCurrentAutoValue()
is false; according to the following priority return : normal value > default value as integer
get
in interface jet.convert.NumberInfo
get
in class JetNumber
Unit.convertUnitToPixel(int)
,
getUnit()
public int getUnit()
getUnit
in interface jet.convert.UnitNumberInfo
public java.lang.String getInspValue(int unit, int fraction)
getInspValue
in class JetProperty
unit
- unit-type of return, must be one of Unit.INCH
or Unit.CENTIMETER
fraction
- 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.PropInfo
getInspValue
in class JetProperty
toString()
public java.lang.String toInchString()
toInchString
in interface jet.convert.UnitNumberInfo
Unit.convertUnitToInch(int)
,
getUnit()
public java.lang.String toCentimeterString()
toCentimeterString
in interface jet.convert.UnitNumberInfo
Unit.convertUnitToCentimeter(int)
,
getUnit()
public java.lang.String toUnitString()
JetProperty
JetProperty.isCurrentAutoValue()
is false; returns the unit value as string, the unit value is (with priority)normal value > default value
toUnitString
in interface jet.convert.PropInfo
toUnitString
in interface jet.convert.UnitNumberInfo
toUnitString
in class JetProperty
Object.toString()
,
JetProperty.isCurrentAutoValue()
public java.lang.String toString()
toString
in interface jet.convert.PropInfo
toString
in class JetNumber
JetNumber.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 JetProperty
JetProperty.canChangeByOther
,
JetProperty.canChangeByOthers()
,
JetProperty.enableAllChangeBys(boolean)
public java.lang.Object getObject()
JetProperty.isCurrentAutoValue()
is false, returns a Integer Object.
getObject
in interface jet.util.Propertiable
getObject
in class JetProperty
JetProperty.isCurrentAutoValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |