Class JDValueProgram
java.lang.Object
fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram
A class to handle dynamic value program.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intMap object value to value defined by a correspondence table.static final intLinear map of object value.static final intRemap value to coordinates of the peer JDObject. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new entry to the correspondance table.booleangetBooleanMappingAt(int idx) getColorMappingAt(int idx) getCompleteValue(int idx) booleanintintintgetIntegerMappingAt(int idx) getMapping(int idx) intintintgetMode()intgetType()getValue(int idx) voidrecordObject(StringBuffer to_write, StringBuffer decal) voidremoveEntry(int idx) Remove the entry in the correspondance table at the specified index.booleanSets the default value.booleansetMappingAt(int idx, String v) voidsetMaxLinearValue(int max) voidsetMinLinearValue(int min) booleansetMode(int m) Sets the mode of this program.booleansetValueAt(int idx, String v)
-
Field Details
-
MAP_BY_VALUE
public static final int MAP_BY_VALUEMap object value to value defined by a correspondence table.- See Also:
-
MAP_LINEAR
public static final int MAP_LINEARLinear map of object value. (only for INTEGER)- See Also:
-
MAP_REMAP
public static final int MAP_REMAPRemap value to coordinates of the peer JDObject. (only for INTEGER)- See Also:
-
INTEGER_TYPE
public static final int INTEGER_TYPE- See Also:
-
COLOR_TYPE
public static final int COLOR_TYPE- See Also:
-
BOOLEAN_TYPE
public static final int BOOLEAN_TYPE- See Also:
-
-
Constructor Details
-
JDValueProgram
public JDValueProgram(int type) Contruct a dynamic value program.- Parameters:
type- Type of data.- See Also:
-
JDValueProgram
- Throws:
IOException
-
-
Method Details
-
getType
public int getType() -
setMode
public boolean setMode(int m) Sets the mode of this program.- Parameters:
m- Mode to be set- Returns:
- true only if this mode if allowed for the data type.
- See Also:
-
getMode
public int getMode() -
addNewEntry
public void addNewEntry()Add a new entry to the correspondance table. -
removeEntry
public void removeEntry(int idx) Remove the entry in the correspondance table at the specified index.- Parameters:
idx- Index to remove
-
getEntryNumber
public int getEntryNumber()- Returns:
- number of entries in the correspondance table.
-
getDefaultMapping
- Returns:
- a string representation of the default value, (correspondance table)
-
setDefaultMapping
Sets the default value.- Parameters:
v- Default value as string- Returns:
- true if success
-
getDefaultColorMapping
-
getDefaultBooleanMapping
public boolean getDefaultBooleanMapping() -
getDefaultIntegerMapping
public int getDefaultIntegerMapping() -
getValue
-
getCompleteValue
-
setValueAt
-
getMapping
-
setMappingAt
-
getColorMappingAt
-
getBooleanMappingAt
public boolean getBooleanMappingAt(int idx) -
getIntegerMappingAt
public int getIntegerMappingAt(int idx) -
getMinLinearMapping
public int getMinLinearMapping() -
getMaxLinearMapping
public int getMaxLinearMapping() -
setMinLinearValue
public void setMinLinearValue(int min) -
setMaxLinearValue
public void setMaxLinearValue(int max) -
recordObject
-