Interface DFCustomizer

  • All Superinterfaces:
    java.beans.Customizer

    public interface DFCustomizer
    extends java.beans.Customizer
    Special extension of standard Java Beans customizer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PROP_DATA_VALID  
      static java.lang.String PROP_ERROR_MESSAGE  
      static java.lang.String PROP_FORCE_READ_ONLY
      This property is recognized as clientProperty (JComponent.putClientProperty(java.lang.Object, java.lang.Object)) and instructs the Customizer to render all fields disabled or make sure by other means, that the underlying bean is not modified when the user changes the UI.
      static java.lang.String PROP_MODIFIED  
      static java.lang.String PROP_UI_PROPERTIES
      Additional UI properties to be set on the customizer - if it is not the same object as the DFCustomizer impl class.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void applyChanges()
      Apply the changes and set all properties to edited object.
      void applyChanges​(com.im.commons.progress.DFEnvironmentRW env)
      Apply the changes and set all properties to edited object.
      void cancelChanges()
      Cancel the changes and refresh all input fields from the edited object.
      java.lang.String getErrorMessage()
      Return the error message when customizer is not valid
      com.im.commons.progress.DFLockable getLockable()
      Get lockable for customized item
      boolean isDataValid()
      Is the currently filled values valid?
      boolean isModified()
      Are input fields currently modified and not stored to edited object?
      • Methods inherited from interface java.beans.Customizer

        addPropertyChangeListener, removePropertyChangeListener, setObject
    • Field Detail

      • PROP_FORCE_READ_ONLY

        static final java.lang.String PROP_FORCE_READ_ONLY
        This property is recognized as clientProperty (JComponent.putClientProperty(java.lang.Object, java.lang.Object)) and instructs the Customizer to render all fields disabled or make sure by other means, that the underlying bean is not modified when the user changes the UI. The customizer in this mode can be used to present bean's properties
        See Also:
        Constant Field Values
      • PROP_UI_PROPERTIES

        static final java.lang.String PROP_UI_PROPERTIES
        Additional UI properties to be set on the customizer - if it is not the same object as the DFCustomizer impl class. Properties can be relayed to e.g. tab Components in a complex DFCustomizer, too
        See Also:
        Constant Field Values
    • Method Detail

      • isDataValid

        boolean isDataValid()
        Is the currently filled values valid?
      • isModified

        boolean isModified()
        Are input fields currently modified and not stored to edited object?
      • getErrorMessage

        java.lang.String getErrorMessage()
        Return the error message when customizer is not valid
      • applyChanges

        void applyChanges()
        Apply the changes and set all properties to edited object.
        Throws:
        java.lang.IllegalStateException - when isDataValid is false
      • applyChanges

        void applyChanges​(com.im.commons.progress.DFEnvironmentRW env)
        Apply the changes and set all properties to edited object.
        Parameters:
        env -
        Throws:
        java.lang.IllegalStateException - when isDataValid is false
      • getLockable

        com.im.commons.progress.DFLockable getLockable()
        Get lockable for customized item
        Returns:
        The lockable for customized item
      • cancelChanges

        void cancelChanges()
        Cancel the changes and refresh all input fields from the edited object.