|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.controls.JetProperty jet.controls.JetEnumeration
public class JetEnumeration
JetEnumeration, for saving/retrieving a entry(name and value).
This JetProperty :
1) can not set 'another object' in ChangeBy value by default
2) can not set 'on the fly formula' in ChangeBy value by default
4) contains a table(called as "entry-table") stored all possible entries for property choice
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 | |
---|---|
JetEnumeration()
|
|
JetEnumeration(jet.controls.JetObject parent,
java.lang.String name)
Create a JetEnumeration instance with no value |
|
JetEnumeration(jet.controls.JetObject parent,
java.lang.String name,
int enumType)
Create a JetEnumeration instance with specified entries-set id but no value |
Method Summary | |
---|---|
java.lang.Object |
add(java.lang.String key,
java.lang.Object value)
Adds/Overwrites an entry to/in entry-table. |
java.lang.Object |
get()
Effective if JetProperty.isCurrentAutoValue() is false. |
java.lang.String |
getCurKey()
Effective if JetProperty.isCurrentAutoValue() is false. |
java.util.Hashtable |
getEnumerationSet()
|
int |
getEnumerationType()
|
java.lang.String |
getKeyByValue(int value)
Notice: 1) before call it, please make sure that all entries' value are Integer 2) Before call it, please make sure that this instance is constructed by entries-set id, and no any operation about entry-table after construct |
int[] |
getMatchingSqlType()
Now, this API only for designer UI : get Matching SQL Type of this property Usage in UI : list all the (normal-)formula whose data-type in returned array |
java.lang.Object |
getObject()
Effective if JetProperty.isCurrentAutoValue() is false;returns normal value's value, or last entry(hash order)'s value in entry-table if not set |
java.util.Vector |
getPropertyChoice()
Effective if JetProperty.isCurrentAutoValue() is false. |
int |
getValue(java.lang.Object key)
Notice: 1) before call it, please make sure that all entries' value are Integer 2) It has not been deleted because it is an API in EnumerationInfo |
int |
intValue()
Notice1: before call it, please make sure that all entries' value are Integer Notice2: effective if JetProperty.isCurrentAutoValue() is false. |
java.lang.Object |
remove(java.lang.String key)
Removes the an entry from entry-table. |
void |
removeAll()
Clears so that entry-table contains no enumeration items |
void |
set(java.lang.Object obj)
Sets normal value specified entry's value. |
void |
set(java.lang.String key)
Sets normal value via specified entry's name if can found mapping in |
void |
setEnumerationSet(java.util.Hashtable enumerationSet)
Sets entry-table, notice : it would not change normal value. |
void |
setValue(java.lang.Object obj)
Sets normal value via specified entry's value. |
void |
setValue(java.lang.String key)
Sets normal value via specified entry's name if can found mapping in |
java.lang.String |
toString()
Effective if JetProperty.isCurrentAutoValue() is false. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jet.convert.PropInfo |
---|
getChangeByObjectName, getInspValue, getName, getValue, isChangeByOther, isNull, toUnitString |
Constructor Detail |
---|
public JetEnumeration()
public JetEnumeration(jet.controls.JetObject parent, java.lang.String name)
parent
- ownername
- namepublic JetEnumeration(jet.controls.JetObject parent, java.lang.String name, int enumType)
parent
- ownername
- nameenumType
- the entries-set defined in EnumerationConstantEnumerationConstant
Method Detail |
---|
public java.lang.Object add(java.lang.String key, java.lang.Object value)
key
- the entry's name, can not empty-string and null
.value
- the entry's value
null
if it did not have one
java.lang.NullPointerException
- if the key or value is null
public java.lang.Object remove(java.lang.String key)
key
- the item's name that needs to be removed, can not empty-string and null
.
null
if the key did not have a mapping
java.lang.NullPointerException
- if the key is null
public void set(java.lang.Object obj)
obj
- : the valuesetValue(Object)
public void set(java.lang.String key)
set
in interface jet.util.Propertiable
set
in class JetProperty
key
- the item's name, can not empty-string and null
.setValue(String)
public void setValue(java.lang.Object obj)
obj
- the valuepublic void setValue(java.lang.String key)
key
- the item's name, can not empty string and null
.public java.lang.Object get()
JetProperty.isCurrentAutoValue()
is false.
JetProperty.isCurrentAutoValue()
public java.lang.String getCurKey()
JetProperty.isCurrentAutoValue()
is false.
getCurKey
in interface jet.convert.EnumerationInfo
set(Object)
,
set(String)
,
setValue(Object)
,
setValue(String)
,
get()
,
toString()
,
JetProperty.isCurrentAutoValue()
public java.lang.String toString()
JetProperty.isCurrentAutoValue()
is false.
toString
in interface jet.convert.PropInfo
toString
in class java.lang.Object
set(Object)
,
set(String)
,
setValue(Object)
,
setValue(String)
,
get()
,
getCurKey()
,
JetProperty.isCurrentAutoValue()
public int intValue()
JetProperty.isCurrentAutoValue()
is false.
intValue
in interface jet.convert.EnumerationInfo
getValue(Object)
,
JetProperty.isCurrentAutoValue()
public void removeAll()
public int getValue(java.lang.Object key)
EnumerationInfo
getValue
in interface jet.convert.EnumerationInfo
key
- the enumeration item's name whose associated value is to be returned
key
is mapped,
java.lang.NullPointerException
- if no mapping for the key
java.lang.ClassCastException
- if not all enumeration item's value is Integer.intValue()
public java.lang.String getKeyByValue(int value)
value
- the value whose associated name is to be returned
null
if no mapping for the value.public java.util.Vector getPropertyChoice()
JetProperty.isCurrentAutoValue()
is false.
getPropertyChoice
in class JetProperty
JetProperty.isEnableAutoValue()
public java.lang.Object getObject()
JetProperty.isCurrentAutoValue()
is false;returns normal value's value, or last entry(hash order)'s value in entry-table if not set
getObject
in interface jet.util.Propertiable
getObject
in class JetProperty
get()
,
JetProperty.isCurrentAutoValue()
public java.util.Hashtable getEnumerationSet()
public void setEnumerationSet(java.util.Hashtable enumerationSet)
enumerationSet
- a Hashtable, DO NOT null
.public int getEnumerationType()
public int[] getMatchingSqlType()
JetProperty
getMatchingSqlType
in class JetProperty
Db
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |