GWT 2.7.0

com.google.gwt.editor.client.testing
Class MockEditorDelegate<T>

java.lang.Object
  extended by 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 of EditorDelegate.


Constructor Summary
MockEditorDelegate()
           
 
Method Summary
 java.lang.String getPath()
          Returns a zero-length string or the last value passed to setPath(java.lang.String).
 boolean isDirty()
          Returns false or the last value passed to setDirty(boolean).
 void recordError(java.lang.String message, java.lang.Object value, java.lang.Object userData)
          No-op.
 void setDirty(boolean dirty)
          Records the value of dirty which can be retrieved from isDirty().
 void setPath(java.lang.String path)
          Controls the return value of getPath().
 HandlerRegistration subscribe()
          Returns a no-op HandlerRegistration instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockEditorDelegate

public MockEditorDelegate()
Method Detail

getPath

public java.lang.String getPath()
Returns a zero-length string or the last value passed to setPath(java.lang.String).

Specified by:
getPath in interface EditorDelegate<T>
Returns:
the path as a String

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

GWT 2.7.0