|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
cz.zcu.fav.kiv.editor.beans.types.Unit
cz.zcu.fav.kiv.editor.beans.properties.UnitAttr
public class UnitAttr
The UnitAttr class represents a unit of attribute type.
| Field Summary | |
|---|---|
protected Attribute |
attribute
The reference to the attribute of the unit |
protected java.lang.String |
temporaryValue
The temporary value of the attribute unit |
| Fields inherited from class cz.zcu.fav.kiv.editor.beans.types.Unit |
|---|
defaultValue, value, valueList |
| Constructor Summary | |
|---|---|
UnitAttr(java.util.List<java.lang.String> unitList)
|
|
UnitAttr(java.lang.String value,
java.util.List<java.lang.String> unitList)
Initializes a newly created UnitAttr with the specified value and predefined
units. |
|
| Method Summary | |
|---|---|
void |
changeValue(java.lang.String value)
Sets the new value of unit and marks its attribute as chosen. |
void |
setAttribute(Attribute attribute)
|
void |
setDefault()
Sets the default and temporary value of the unit. |
void |
setValuesFromTemporary()
Sets values of the unit after its temporary value. |
void |
updateValue()
Sets the new temporary value of unit. |
| Methods inherited from class cz.zcu.fav.kiv.editor.beans.types.Unit |
|---|
assignDefaultFromValue, clone, getDefaultValue, getValue, getValueList, setDefaultValue, setValue, setValueList |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String temporaryValue
protected Attribute attribute
| Constructor Detail |
|---|
public UnitAttr(java.lang.String value,
java.util.List<java.lang.String> unitList)
UnitAttr with the specified value and predefined
units. The value argument is the value of the unit. The unitList
is a list of predefined units.
value - a value of the unit.unitList - a list of predefined units.public UnitAttr(java.util.List<java.lang.String> unitList)
| Method Detail |
|---|
public void changeValue(java.lang.String value)
changeValue in class Unitvalue - a new value of the unit.public void updateValue()
updateValue in class Unitpublic void setValuesFromTemporary()
public void setAttribute(Attribute attribute)
public void setDefault()
default and temporary value of the unit.
setDefault in class Unit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||