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>
A mock implementation of
EditorDelegate
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPath()
Returns a zero-length string or the last value passed tosetPath(java.lang.String)
.boolean
isDirty()
Returnsfalse
or the last value passed tosetDirty(boolean)
.void
recordError
(String message, Object value, Object userData) No-op.void
setDirty
(boolean dirty) Records the value ofdirty
which can be retrieved fromisDirty()
.void
Controls the return value ofgetPath()
.Returns a no-op HandlerRegistration instance.
-
Constructor Details
-
MockEditorDelegate
public MockEditorDelegate()
-
-
Method Details
-
getPath
Returns a zero-length string or the last value passed tosetPath(java.lang.String)
.- Specified by:
getPath
in interfaceEditorDelegate<T>
- Returns:
- the path as a String
-
isDirty
public boolean isDirty()Returnsfalse
or the last value passed tosetDirty(boolean)
. -
recordError
No-op.- Specified by:
recordError
in interfaceEditorDelegate<T>
- Parameters:
message
- a textual description of the errorvalue
- the value to be returned byEditorError.getValue()
ornull
if 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 ofdirty
which can be retrieved fromisDirty()
.- Specified by:
setDirty
in interfaceEditorDelegate<T>
- Parameters:
dirty
- the dirty state of the Editor
-
setPath
Controls the return value ofgetPath()
. -
subscribe
Returns a no-op HandlerRegistration instance.- Specified by:
subscribe
in interfaceEditorDelegate<T>
- Returns:
- a HandlerRegistration to unsubscribe from the notifications or
null
if the delegate does not support subscription
-