Modifier and Type | Field and Description |
---|---|
protected DefaultType |
defaultValue
The default value of the type
|
protected TypeEnum |
name
The name of the type
|
protected Unit |
unit
The unit of the type
|
protected java.lang.String |
value
The value of the type
|
Constructor and Description |
---|
Type()
Initializes a newly created empty
Type . |
Type(TypeEnum name) |
Modifier and Type | Method and Description |
---|---|
void |
assignDefaultFromValue()
Assigns the default value same as value.
|
abstract void |
changeValue(java.lang.String value)
Sets the new value of the type without notifying of graphics items.
|
java.lang.Object |
clone() |
DefaultType |
getDefaultValue() |
java.lang.String |
getKeyFromValue(java.lang.String value)
Returns the key for input value it it is contained in the list of predefined values.
|
TypeEnum |
getName() |
abstract java.lang.String |
getOwnerName()
Return the name of the owner element - parameter or attribute.
|
Unit |
getUnit() |
java.lang.String |
getValue() |
java.util.Map<java.lang.String,java.lang.String> |
getValueList() |
void |
setDefault()
Sets the
default value of the type and its unit. |
void |
setDefaultValue(DefaultType defaultValue) |
void |
setLoadedValue(java.lang.String value)
Assigns the new loaded value (from file, template).
|
void |
setName(TypeEnum name) |
void |
setUnit(Unit unit) |
void |
setValue(java.lang.String value) |
void |
setValueList(java.util.Map<java.lang.String,java.lang.String> values) |
abstract void |
updateValue()
Sets the new value of the type with notifying of graphics items.
|
protected TypeEnum name
protected DefaultType defaultValue
protected java.lang.String value
protected Unit unit
public Type()
Type
.public Type(TypeEnum name)
public void setUnit(Unit unit)
public void setDefaultValue(DefaultType defaultValue)
public void setName(TypeEnum name)
public java.lang.String getValue()
public abstract void updateValue()
public abstract void changeValue(java.lang.String value)
value
- a new value of the type.public java.util.Map<java.lang.String,java.lang.String> getValueList()
public void setValueList(java.util.Map<java.lang.String,java.lang.String> values)
public java.lang.String getKeyFromValue(java.lang.String value)
value
- a value of the searched value contained in the list of predefined values.public java.lang.Object clone()
clone
in class java.lang.Object
public void setDefault()
default value
of the type and its unit.public Unit getUnit()
public DefaultType getDefaultValue()
public TypeEnum getName()
public void setLoadedValue(java.lang.String value) throws ParserException
value
- the new type value.ParserException
- if the value is invalid.public void setValue(java.lang.String value)
public void assignDefaultFromValue()
public abstract java.lang.String getOwnerName()