Package groovy.swing.model
Class ClosureModel
java.lang.Object
groovy.swing.model.ClosureModel
- All Implemented Interfaces:
NestedValueModel
,ValueModel
public class ClosureModel extends Object implements ValueModel, NestedValueModel
Represents a value model using a closure to extract
the value from some source model and an optional write closure
for updating the value.
-
Constructor Summary
Constructors Constructor Description ClosureModel(ValueModel sourceModel, Closure readClosure)
ClosureModel(ValueModel sourceModel, Closure readClosure, Closure writeClosure)
ClosureModel(ValueModel sourceModel, Closure readClosure, Closure writeClosure, Class type)
-
Method Summary
Modifier and Type Method Description ValueModel
getSourceModel()
Class
getType()
Object
getValue()
boolean
isEditable()
void
setValue(Object value)
-
Constructor Details
-
ClosureModel
-
ClosureModel
-
ClosureModel
-
-
Method Details
-
getSourceModel
- Specified by:
getSourceModel
in interfaceNestedValueModel
-
getValue
- Specified by:
getValue
in interfaceValueModel
-
setValue
- Specified by:
setValue
in interfaceValueModel
-
getType
- Specified by:
getType
in interfaceValueModel
-
isEditable
public boolean isEditable()- Specified by:
isEditable
in interfaceValueModel
-