Class DefaultPropertyEditorBean

  • All Implemented Interfaces:
    PropertyEditorBean
    Direct Known Subclasses:
    DefaultZKPropertyEditorBean

    public class DefaultPropertyEditorBean
    extends java.lang.Object
    implements PropertyEditorBean
    Base class for property editor backing beans. Provides original and current value, modification check and connection to parent descriptor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PropertyEditorDescriptor getDescriptor()
      The descriptor which this beans belong to.
      java.lang.Object getValue()
      Returns the current value.
      java.util.List<java.lang.Object> getValues()  
      void initialize​(java.lang.Object value)
      Initializes the editor bean by specifying the start value.
      boolean isEditable()
      Tells whether the editor allows changes.
      boolean isInvalid()
      Tells whether this editor shows invalid state.
      boolean isModified()
      Tells whether this bean contains a modified value compared to the start value.
      void reset()
      Resets the editor to the initial value.
      void setEditable​(boolean editable)
      Switches editing on and off.
      void setInvalid​(boolean invalid)
      Switches invalid state of this editor bean.
      void setValue​(java.lang.Object value)
      Changes the current value.
      void setValues​(java.util.List<java.lang.Object> values)  
      protected void updateEditable​(boolean newEditable)
      Called each time the editable flag has been changed.
      protected void updateInvalid​(boolean newInvalid)
      Called each time the invalid flag has been changed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • updateEditable

        protected void updateEditable​(boolean newEditable)
        Called each time the editable flag has been changed. The component should be modified to block or allow user input.
        Parameters:
        newEditable - the new editable flag value
      • setEditable

        public final void setEditable​(boolean editable)
        Description copied from interface: PropertyEditorBean
        Switches editing on and off. This will not change the modification state!
        Specified by:
        setEditable in interface PropertyEditorBean
        Parameters:
        editable - true if the component should be allow changes
      • getValues

        public java.util.List<java.lang.Object> getValues()
      • setValues

        public void setValues​(java.util.List<java.lang.Object> values)
      • initialize

        public void initialize​(java.lang.Object value)
        Description copied from interface: PropertyEditorBean
        Initializes the editor bean by specifying the start value. This will reset all previous changes. Therefore the editor bean wont be modified any longer!
        Specified by:
        initialize in interface PropertyEditorBean
        Parameters:
        value - the start value
      • reset

        public void reset()
        Description copied from interface: PropertyEditorBean
        Resets the editor to the initial value. Also clears invalid flag. Editable flag remains untouched!
        Specified by:
        reset in interface PropertyEditorBean
      • setValue

        public void setValue​(java.lang.Object value)
        Description copied from interface: PropertyEditorBean
        Changes the current value. If the value is different from the start value the bean is marked modified.
        Specified by:
        setValue in interface PropertyEditorBean
      • updateInvalid

        protected void updateInvalid​(boolean newInvalid)
        Called each time the invalid flag has been changed. The component may signal this fact accordingly.
        Parameters:
        newInvalid - the new invalid flag value
      • setInvalid

        public void setInvalid​(boolean invalid)
        Description copied from interface: PropertyEditorBean
        Switches invalid state of this editor bean.
        Specified by:
        setInvalid in interface PropertyEditorBean
        Parameters:
        invalid - true if the editor should show invalid state