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); } } }); } } }); }
private void controlBulkOperations() { if (selectedProcessInstances != null && selectedProcessInstances.size() > 0) { bulkAbortNavLink.setEnabled(true); bulkSignalNavLink.setEnabled(true); } else { bulkAbortNavLink.setEnabled(false); bulkSignalNavLink.setEnabled(false); } }
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 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(); }
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("")); }
@UiHandler("perunFacs") public void click2(ClickEvent handler) { perunFacs.setActive(true); }
@UiHandler("perunVos") public void click1(ClickEvent handler) { perunVos.setActive(true); }
@Override public void setActiveMenuItem(String token) { int count = perunAdminMenuPills.getWidgetCount(); for (int i = 0; i < count; i++) { if (perunAdminMenuPills.getWidget(i) instanceof AnchorListItem) { AnchorListItem item = (AnchorListItem) perunAdminMenuPills.getWidget(i); if (Objects.equals(token, item.getTargetHistoryToken())) { item.setActive(true); } else { item.setActive(false); } } } int count2 = voManagerMenuPills.getWidgetCount(); for (int i = 0; i < count2; i++) { if (voManagerMenuPills.getWidget(i) instanceof AnchorListItem) { AnchorListItem item = (AnchorListItem) voManagerMenuPills.getWidget(i); if (Objects.equals(token, item.getTargetHistoryToken())) { item.setActive(true); } else { item.setActive(false); } } } int count3 = groupManagerMenuPills.getWidgetCount(); for (int i = 0; i < count3; i++) { if (groupManagerMenuPills.getWidget(i) instanceof AnchorListItem) { AnchorListItem item = (AnchorListItem) groupManagerMenuPills.getWidget(i); if (Objects.equals(token, item.getTargetHistoryToken())) { item.setActive(true); } else { item.setActive(false); } } } int count4 = facilityManagerMenuPills.getWidgetCount(); for (int i = 0; i < count4; i++) { if (facilityManagerMenuPills.getWidget(i) instanceof AnchorListItem) { AnchorListItem item = (AnchorListItem) facilityManagerMenuPills.getWidget(i); if (Objects.equals(token, item.getTargetHistoryToken())) { item.setActive(true); } else { item.setActive(false); } } } }
@UiHandler("perunExtsrc") public void click9(ClickEvent handler) { perunExtsrc.setActive(true); }
@UiHandler("perunName") public void click8(ClickEvent handler) { perunName.setActive(true); }
@UiHandler("perunOwn") public void click6(ClickEvent handler) { perunOwn.setActive(true); }
@UiHandler("perunServ") public void click5(ClickEvent handler) { perunServ.setActive(true); }
@UiHandler("perunAttrs") public void click4(ClickEvent handler) { perunAttrs.setActive(true); }
@UiHandler("perunUsr") public void click3(ClickEvent handler) { perunUsr.setActive(true); }
@Inject PerunRegistrarView(final PerunRegistrarViewUiBinder binder) { initWidget(binder.createAndBindUi(this)); // put logo Image logo = Utils.perunInstanceLogo(); logo.setWidth("auto"); logo.setHeight("50px"); navbarHeader.insert(logo, 0); // FIXME - temporary disabled help.setVisible(false); // init buttons application.setText(translation.application()); myApplications.setText(translation.myApplications()); help.setText(translation.help()); language.setText(translation.language()); logout.setText(translation.logout()); if (Utils.getNativeLanguage() != null) { if ("default".equals(LocaleInfo.getCurrentLocale().getLocaleName()) || "en".equalsIgnoreCase(LocaleInfo.getCurrentLocale().getLocaleName())) { // use english name of native language czech.setText(Utils.getNativeLanguage().get("englishName")); english.setIcon(IconType.CHECK); english.setIconPosition(IconPosition.RIGHT); czech.setIcon(null); } else { // use native name of native language czech.setText(Utils.getNativeLanguage().get("nativeName")); czech.setIcon(IconType.CHECK); czech.setIconPosition(IconPosition.RIGHT); english.setIcon(null); } english.setText(translation.english()); } else { // no language switching language.setVisible(false); } english.setText(translation.english()); }