@Test public void testDisable() { final MenuItem mi = builder.build(); mi.setEnabled( false ); verify( view, times( 1 ) ).setEnabled( eq( false ) ); }
@Override public MenuItem build() { return new BaseMenuCustom<IsWidget>() { @Override public IsWidget build() { return ElementWrapperWidget.getWidget(view.getElement()); } @Override public boolean isEnabled() { return view.isEnabled(); } @Override public void setEnabled(final boolean enabled) { view.setEnabled(enabled); } }; }
RegisteredDocumentsMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                                       RegisteredDocumentsMenuView.Presenter { @Override public MenuItem build() { return new BaseMenuCustom<IsWidget>() { @Override public IsWidget build() { return ElementWrapperWidget.getWidget(view.getElement()); } @Override public boolean isEnabled() { return view.isEnabled(); } @Override public void setEnabled(final boolean enabled) { view.setEnabled(enabled); } }; } }
RegisteredDocumentsMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                                       RegisteredDocumentsMenuView.Presenter { @Override public MenuItem build() { return new BaseMenuCustom<IsWidget>() { @Override public IsWidget build() { return ElementWrapperWidget.getWidget(view.getElement()); } @Override public boolean isEnabled() { return view.isEnabled(); } @Override public void setEnabled(final boolean enabled) { view.setEnabled(enabled); } }; } @Inject  RegisteredDocumentsMenuBuilder(final RegisteredDocumentsMenuView view,
                                          final ManagedInstance<DocumentMenuItem> documentMenuItemProvider); }
RegisteredDocumentsMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                                       RegisteredDocumentsMenuView.Presenter { @Override public MenuItem build() { return new BaseMenuCustom<IsWidget>() { @Override public IsWidget build() { return ElementWrapperWidget.getWidget(view.getElement()); } @Override public boolean isEnabled() { return view.isEnabled(); } @Override public void setEnabled(final boolean enabled) { view.setEnabled(enabled); } }; } @Inject  RegisteredDocumentsMenuBuilder(final RegisteredDocumentsMenuView view,
                                          final ManagedInstance<DocumentMenuItem> documentMenuItemProvider); @Override void setReadOnly(final boolean isReadOnly); @Override @PreDestroy void dispose(); @Override void push(final MenuFactory.CustomMenuBuilder element); @Override MenuItem build(); @Override void onOpenDocument(); @Override void onNewDocument(); @Override void registerDocument(final KieDocument document); @Override void deregisterDocument(final KieDocument document); @Override void onActivateDocument(final KieDocument document); @Override void onRemoveDocument(final KieDocument document); @Override void setNewDocumentCommand(final Command newDocumentCommand); @Override void setOpenDocumentCommand(final Command openDocumentCommand); @Override void setActivateDocumentCommand(final ParameterizedCommand<KieDocument> activateDocumentCommand); @Override void setRemoveDocumentCommand(final ParameterizedCommand<KieDocument> removeDocumentCommand); @Override void activateDocument(final KieDocument document); }
RegisteredDocumentsMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                                       RegisteredDocumentsMenuView.Presenter { @Override public MenuItem build() { return new BaseMenuCustom<IsWidget>() { @Override public IsWidget build() { return ElementWrapperWidget.getWidget(view.getElement()); } @Override public boolean isEnabled() { return view.isEnabled(); } @Override public void setEnabled(final boolean enabled) { view.setEnabled(enabled); } }; } @Inject  RegisteredDocumentsMenuBuilder(final RegisteredDocumentsMenuView view,
                                          final ManagedInstance<DocumentMenuItem> documentMenuItemProvider); @Override void setReadOnly(final boolean isReadOnly); @Override @PreDestroy void dispose(); @Override void push(final MenuFactory.CustomMenuBuilder element); @Override MenuItem build(); @Override void onOpenDocument(); @Override void onNewDocument(); @Override void registerDocument(final KieDocument document); @Override void deregisterDocument(final KieDocument document); @Override void onActivateDocument(final KieDocument document); @Override void onRemoveDocument(final KieDocument document); @Override void setNewDocumentCommand(final Command newDocumentCommand); @Override void setOpenDocumentCommand(final Command openDocumentCommand); @Override void setActivateDocumentCommand(final ParameterizedCommand<KieDocument> activateDocumentCommand); @Override void setRemoveDocumentCommand(final ParameterizedCommand<KieDocument> removeDocumentCommand); @Override void activateDocument(final KieDocument document);  }