Class MockEditorDelegate<T>
- java.lang.Object
-
- com.google.gwt.editor.client.testing.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 ofEditorDelegate.
-
-
Constructor Summary
Constructors Constructor Description MockEditorDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPath()Returns a zero-length string or the last value passed tosetPath(java.lang.String).booleanisDirty()Returnsfalseor the last value passed tosetDirty(boolean).voidrecordError(java.lang.String message, java.lang.Object value, java.lang.Object userData)No-op.voidsetDirty(boolean dirty)Records the value ofdirtywhich can be retrieved fromisDirty().voidsetPath(java.lang.String path)Controls the return value ofgetPath().HandlerRegistrationsubscribe()Returns a no-op HandlerRegistration instance.
-
-
-
Method Detail
-
getPath
public java.lang.String getPath()
Returns a zero-length string or the last value passed tosetPath(java.lang.String).- Specified by:
getPathin interfaceEditorDelegate<T>- Returns:
- the path as a String
-
isDirty
public boolean isDirty()
Returnsfalseor the last value passed tosetDirty(boolean).
-
recordError
public void recordError(java.lang.String message, java.lang.Object value, java.lang.Object userData)No-op.- Specified by:
recordErrorin interfaceEditorDelegate<T>- Parameters:
message- a textual description of the errorvalue- the value to be returned byEditorError.getValue()ornullif the value currently associated with the Editor should be useduserData- an arbitrary object, possiblynull, that can be retrieved withEditorError.getUserData()
-
setDirty
public void setDirty(boolean dirty)
Records the value ofdirtywhich can be retrieved fromisDirty().- Specified by:
setDirtyin interfaceEditorDelegate<T>- Parameters:
dirty- the dirty state of the Editor
-
setPath
public void setPath(java.lang.String path)
Controls the return value ofgetPath().
-
subscribe
public HandlerRegistration subscribe()
Returns a no-op HandlerRegistration instance.- Specified by:
subscribein interfaceEditorDelegate<T>- Returns:
- a HandlerRegistration to unsubscribe from the notifications or
nullif the delegate does not support subscription
-
-