private void initBulkActions( final ExtendedPagedTable<ProcessInstanceSummary> extendedPagedTable) { bulkAbortNavLink = new AnchorListItem(constants.Bulk_Abort()); bulkSignalNavLink = new AnchorListItem(constants.Bulk_Signal()); final ButtonGroup bulkActions = new ButtonGroup() { { add( new org.gwtbootstrap3.client.ui.Button(constants.Bulk_Actions()) { { setDataToggle(Toggle.DROPDOWN); } }); add( new DropDownMenu() { { setPull(Pull.RIGHT); add(bulkAbortNavLink); add(bulkSignalNavLink); } }); } }; bulkAbortNavLink.setIcon(IconType.BAN); bulkAbortNavLink.setIconFixedWidth(true); bulkAbortNavLink.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.bulkAbort(selectedProcessInstances); selectedProcessInstances.clear(); extendedPagedTable.redraw(); } }); bulkSignalNavLink.setIcon(IconType.BELL); bulkSignalNavLink.setIconFixedWidth(true); bulkSignalNavLink.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.bulkSignal(selectedProcessInstances); selectedProcessInstances.clear(); extendedPagedTable.redraw(); } }); extendedPagedTable.getRightActionsToolbar().add(bulkActions); controlBulkOperations(); }
public ResetPerspectivesMenuBuilder() { link.setIcon(IconType.MEDKIT); link.setTitle(CommonConstants.INSTANCE.ResetPerspectivesTooltip()); link.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { if (Window.confirm(CommonConstants.INSTANCE.PromptResetPerspectives())) { final PerspectiveActivity currentPerspective = perspectiveManager.getCurrentPerspective(); perspectiveManager.removePerspectiveStates( new Command() { @Override public void execute() { if (currentPerspective != null) { // Use ForcedPlaceRequest to force re-loading of the current Perspective final PlaceRequest pr = new ForcedPlaceRequest( currentPerspective.getIdentifier(), currentPerspective.getPlace().getParameters()); placeManager.goTo(pr); } } }); } } }); }
public AboutMenuBuilder() { link.setIcon(IconType.INFO_CIRCLE); link.setTitle(CommonConstants.INSTANCE.About()); link.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { popup.show(); } }); }
private AnchorListItem makeListItem(final String text) { final AnchorListItem item = new AnchorListItem(text); item.addClickHandler( new ClickHandler() { @Override public void onClick(final ClickEvent event) { textBox.setText(text); ComboBox.this.fireEvent(new ValueChangeEvent(text)); } }); return item; }
private void populateCrumb(String currPersId) { bc.clear(); bc.add(new Label(LabelType.INFO, "Perspectives")); for (final String persId : PerspectiveFactory.get().getRegisteredPerspectiveIds()) { Widget link = new AnchorListItem(persId); if (currPersId.equals(persId)) { link = new Label(LabelType.DEFAULT, persId); } else { ((AnchorListItem) link) .addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { TenbleWebAppClient.pushPerspective(persId); } }); } bc.add(link); } bc.add(new AnchorListItem("")); }