View Javadoc

1   package org.appfuse.webapp.client.application.base.view;
2   
3   import com.google.gwt.editor.client.HasEditorErrors;
4   import com.google.gwt.user.client.ui.IsWidget;
5   import com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver;
6   import com.google.web.bindery.requestfactory.shared.EntityProxy;
7   
8   /**
9    * Implemented by views that edit {@link EntityProxy}s.
10   *
11   * @param <P>
12   *            the type of the proxy
13   * @param <V>
14   *            the type of this ProxyEditView, required to allow
15   *            {@link #createEditorDriver()} to be correctly typed
16   */
17  public interface ProxyEditView<P extends EntityProxy, V extends ProxyEditView<P, V>> extends IsWidget,
18          HasEditorErrors<P> {
19  
20      /**
21       * @return a new {@link RequestFactoryEditorDriver} initialized to run this
22       *         editor
23       */
24      RequestFactoryEditorDriver<P, ? extends V> createEditorDriver();
25  
26      /**
27       * Implemented by the owner of the view.
28       */
29      interface Delegate {
30  
31          void cancelClicked();
32  
33          void deleteClicked();
34  
35          void saveClicked();
36      }
37  
38      <D extends Delegate> void setDelegate(D delegate);
39  
40      void setEnabled(boolean b);
41  }