Class ValueHolder

java.lang.Object
groovy.swing.model.ValueHolder
All Implemented Interfaces:
ValueModel

public class ValueHolder extends Object implements ValueModel
A simple ValueModel implementation which is a holder of an object value. Used to share local variables with closures
  • Constructor Details

    • ValueHolder

      public ValueHolder()
    • ValueHolder

      public ValueHolder(Class type)
    • ValueHolder

      public ValueHolder(Object value)
  • Method Details

    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list.
      Parameters:
      listener - The listener to add.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      Parameters:
      listener - The listener to remove.
    • getValue

      public Object getValue()
      Specified by:
      getValue in interface ValueModel
    • setValue

      public void setValue(Object value)
      Specified by:
      setValue in interface ValueModel
    • getType

      public Class getType()
      Specified by:
      getType in interface ValueModel
    • isEditable

      public boolean isEditable()
      Specified by:
      isEditable in interface ValueModel
    • setEditable

      public void setEditable(boolean editable)