Package groovy.swing.model
Interface ValueModel
- All Known Implementing Classes:
ClosureModel,PropertyModel,ValueHolder
public interface ValueModel
Represents a typed value that can participate in Swing data binding.
-
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns the declared value type for this model.getValue()Returns the current value exposed by this model.booleanIndicates whethersetValue(Object)is expected to succeed.voidUpdates the current value exposed by this model.
-
Method Details
-
getValue
Object getValue()Returns the current value exposed by this model.- Returns:
- the current value, or
null
-
setValue
Updates the current value exposed by this model.- Parameters:
value- the new value
-
getType
Class getType()Returns the declared value type for this model.- Returns:
- the model type
-
isEditable
boolean isEditable()Indicates whethersetValue(Object)is expected to succeed.- Returns:
truewhen the model can be written to
-