public class JetUnitNumber extends JetNumber implements jet.convert.UnitNumberInfo
CHART_BACKGROUND_EDITOR, CHART_FILLPATTERN_EDITOR, CHART_FILTER_EDITOR, CHART_FILTER_EDITOR_NO_DATE, CHART_ICON_STYLE, CHART_PATTERN_LIST_EDITOR, CHART_PENSTYLE_EDITOR, CHART_TEXTSTYLE_EDITOR, CHOICE_EDITOR, COLOR_EDITOR, COMBO_EDITOR, COMMAND_EDITOR, CONTROL_SELECT_ITEMS, DATASOURCE_EDITOR, DBCOL_EDITOR, DETAIL_REPORT_EDITOR, EDIT_FORBIDDEN, EDIT_FORBIDDEN_INIT, EDITABLE_ALLTIME, INTERNAL, LINK_EDITOR, MULSEL_EDITOR, PARAMCOL_EDITOR, QUERY_EDITOR, RECORDDB_EDITOR, SECURITY_EDITOR, TEXT_EDITORBIGSTRING, 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 and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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 |
addToAtomicAction, getInt, getMatchingSqlType, getPropertyChoice, setPropertyChoice, setValuecanChangeByBL, canChangeByFmtt, canChangeByOthers, enableAllChangeBys, getChangeBy, getChangeByBL, getChangeByBLName, getChangeByBLType, getChangeByFmtt, getChangeByFmttName, getChangeByObject, getChangeByObjectName, getChangeByOtherType, getCurrentChangedBy, getCurrentValue, getCurrentValue, getEditFlag, getEditorType, getName, getNormalObject, getParent, getPropType, getRuntimeChangeBy, getUnifiedObject, getValue, isChagneByFmtt, isChangeByBL, isChangeByOther, isCurrentAutoValue, isCurrentChangedBy, isEnableAutoValue, isNull, isSetAnyChangeBy, isSetRuntimeChgBy, isTransient, loadFullChangeBy, propertyChanged, saveFullChangeBy, setAsAutoValue, setCanChangeByBL, setCanChangeByFmtt, setChangeByBL, setChangeByBL, setChangeByFmtt, setChangeByObject, setChangeByObject, setEditFlag, setEditorType, setEnableAutoValue, setObject, setRuntimeChangeBy, setTransientpublic 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 valuepublic 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.CENTIMETERjava.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.CENTIMETERjava.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 valuejava.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 integerpublic long longValue()
JetNumberJetProperty.isCurrentAutoValue() is false;according to the following priority return : normal value > default value as longpublic float floatValue()
JetNumberJetProperty.isCurrentAutoValue() is false;according to the following priority return : normal value > default value as floatfloatValue 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 doubledoubleValue 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 integerpublic int getUnit()
getUnit in interface jet.convert.UnitNumberInfopublic 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 valuetoUnitString 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)
JetPropertysetCanChangeByOthers 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()