Class MockEditorDelegate<T>

  • Type Parameters:
    T - the type being edited
    All Implemented Interfaces:
    EditorDelegate<T>

    public class MockEditorDelegate<T>
    extends java.lang.Object
    implements EditorDelegate<T>
    A mock implementation of EditorDelegate.
    • Constructor Detail

      • MockEditorDelegate

        public MockEditorDelegate()
    • Method Detail

      • isDirty

        public boolean isDirty()
        Returns false or the last value passed to setDirty(boolean).
      • recordError

        public void recordError​(java.lang.String message,
                                java.lang.Object value,
                                java.lang.Object userData)
        No-op.
        Specified by:
        recordError in interface EditorDelegate<T>
        Parameters:
        message - a textual description of the error
        value - the value to be returned by EditorError.getValue() or null if the value currently associated with the Editor should be used
        userData - an arbitrary object, possibly null, that can be retrieved with EditorError.getUserData()
      • setDirty

        public void setDirty​(boolean dirty)
        Records the value of dirty which can be retrieved from isDirty().
        Specified by:
        setDirty in interface EditorDelegate<T>
        Parameters:
        dirty - the dirty state of the Editor
      • setPath

        public void setPath​(java.lang.String path)
        Controls the return value of getPath().
      • subscribe

        public HandlerRegistration subscribe()
        Returns a no-op HandlerRegistration instance.
        Specified by:
        subscribe in interface EditorDelegate<T>
        Returns:
        a HandlerRegistration to unsubscribe from the notifications or null if the delegate does not support subscription