List of usage examples for com.vaadin.server FontAwesome CHECK
FontAwesome CHECK
To view the source code for com.vaadin.server FontAwesome CHECK.
Click Source Link
From source file:lifetime.component.welcome.register.OKButton.java
License:Apache License
public OKButton(String username, String language) { super(username, language, "OK", FontAwesome.CHECK); setCaption(getDescription());/*from www . ja va 2 s. co m*/ setId(StyleClassName.OK_BUTTON.getId()); addClickListener(this); }
From source file:org.balisunrise.vaadin.components.ActionsLine.java
License:Open Source License
private void init() { setStyleName("b-actions-line"); setWidth("100%"); setHeightUndefined();/* w w w .j a v a 2 s . com*/ confirmButton = new Button("Confirmar"); confirmButton.setIcon(FontAwesome.CHECK, ""); cancelButton = new Button("Cancelar"); cancelButton.setIcon(FontAwesome.TIMES, ""); center = new HorizontalLayout(); center.setSpacing(true); addComponent(confirmButton); setComponentAlignment(confirmButton, Alignment.MIDDLE_RIGHT); addComponent(center); setComponentAlignment(center, Alignment.MIDDLE_CENTER); addComponent(cancelButton); setComponentAlignment(cancelButton, Alignment.MIDDLE_LEFT); }
From source file:org.eclipse.hawkbit.ui.rollout.rollout.AddUpdateRolloutWindowLayout.java
License:Open Source License
private HorizontalLayout createApprovalLayout() { approveButtonsGroup = new OptionGroup(); approveButtonsGroup.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_OPTIONGROUP_ID); approveButtonsGroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL); approveButtonsGroup.addStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL); approveButtonsGroup.addStyleName("custom-option-group"); approveButtonsGroup.addItems(Rollout.ApprovalDecision.APPROVED, Rollout.ApprovalDecision.DENIED); approveButtonsGroup.setItemCaption(Rollout.ApprovalDecision.APPROVED, i18n.getMessage(APPROVAL_BUTTON_LABEL)); approveButtonsGroup.setItemIcon(Rollout.ApprovalDecision.APPROVED, FontAwesome.CHECK); approveButtonsGroup.setItemCaption(Rollout.ApprovalDecision.DENIED, i18n.getMessage(DENY_BUTTON_LABEL)); approveButtonsGroup.setItemIcon(Rollout.ApprovalDecision.DENIED, FontAwesome.TIMES); approvalRemarkField = createTextField("label.approval.remark", UIComponentIdProvider.ROLLOUT_APPROVAL_REMARK_FIELD_ID, Rollout.APPROVAL_REMARK_MAX_SIZE); approvalRemarkField.setWidth(100.0F, Unit.PERCENTAGE); final HorizontalLayout layout = new HorizontalLayout(approveButtonsGroup, approvalRemarkField); layout.setWidth(100.0F, Unit.PERCENTAGE); layout.setExpandRatio(approvalRemarkField, 1.0F); return layout; }
From source file:org.eclipse.hawkbit.ui.tenantconfiguration.DefaultDistributionSetTypeLayout.java
License:Open Source License
DefaultDistributionSetTypeLayout(final SystemManagement systemManagement, final DistributionSetTypeManagement distributionSetTypeManagement, final VaadinMessageSource i18n, final SpPermissionChecker permChecker) { this.systemManagement = systemManagement; combobox = SPUIComponentProvider.getComboBox(null, "330", null, null, false, "", "label.combobox.tag"); changeIcon = new Label(); if (!permChecker.hasReadRepositoryPermission()) { return;//from w w w . j av a 2 s . co m } final Panel rootPanel = new Panel(); rootPanel.setSizeFull(); rootPanel.addStyleName("config-panel"); final VerticalLayout vlayout = new VerticalLayout(); vlayout.setMargin(true); vlayout.setSizeFull(); final Label header = new Label(i18n.getMessage("configuration.defaultdistributionset.title")); header.addStyleName("config-panel-header"); vlayout.addComponent(header); final DistributionSetType currentDistributionSetType = getCurrentDistributionSetType(); currentDefaultDisSetType = currentDistributionSetType.getId(); final HorizontalLayout hlayout = new HorizontalLayout(); hlayout.setSpacing(true); hlayout.setImmediate(true); final Label configurationLabel = new LabelBuilder() .name(i18n.getMessage("configuration.defaultdistributionset.select.label")).buildLabel(); hlayout.addComponent(configurationLabel); final Iterable<DistributionSetType> distributionSetTypeCollection = distributionSetTypeManagement .findAll(PageRequest.of(0, 100)); combobox.setId(UIComponentIdProvider.SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX); combobox.setNullSelectionAllowed(false); for (final DistributionSetType distributionSetType : distributionSetTypeCollection) { combobox.addItem(distributionSetType.getId()); combobox.setItemCaption(distributionSetType.getId(), distributionSetType.getKey() + " (" + distributionSetType.getName() + ")"); if (distributionSetType.getId().equals(currentDistributionSetType.getId())) { combobox.select(distributionSetType.getId()); } } combobox.setImmediate(true); combobox.addValueChangeListener(event -> selectDistributionSetValue()); hlayout.addComponent(combobox); changeIcon.setIcon(FontAwesome.CHECK); hlayout.addComponent(changeIcon); changeIcon.setVisible(false); vlayout.addComponent(hlayout); rootPanel.setContent(vlayout); setCompositionRoot(rootPanel); }
From source file:org.jumpmind.metl.ui.views.design.ManageProjectsPanel.java
License:Open Source License
protected Component buildVersionGrid(Project project) { context.getConfigurationService().refresh(project); List<ProjectVersion> versions = project.getProjectVersions(); BeanItemContainer<ProjectVersion> versionGridContainer = new BeanItemContainer<>(ProjectVersion.class); Grid versionGrid = new Grid(); VerticalLayout layout = new VerticalLayout(); layout.setWidth(100, Unit.PERCENTAGE); layout.setMargin(true);// w w w .j a v a 2s . c om layout.setSpacing(true); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); Button openButton = new Button("Open", (event) -> { Collection<Object> selected = versionGrid.getSelectedRows(); for (Object object : selected) { projectNavigator.addProjectVersion(((ProjectVersion) object)); } }); buttons.addComponent(openButton); Button newButton = new Button("New Version", (event) -> newVersion(versionGrid)); buttons.addComponent(newButton); Button editButton = new Button("Edit Version", (event) -> edit(versionGrid)); buttons.addComponent(editButton); Button removeButton = new Button("Remove Version", (event) -> removeVersion(versionGrid)); buttons.addComponent(removeButton); openButton.setEnabled(false); newButton.setEnabled(false); removeButton.setEnabled(false); editButton.setEnabled(false); layout.addComponent(buttons); versionGrid.setWidth(100, Unit.PERCENTAGE); versionGrid.setHeight(3 + (versions.size() * ROW_EM), Unit.EM); versionGrid.setEditorEnabled(true); versionGrid.setSelectionMode(SelectionMode.MULTI); versionGrid.addColumn("versionLabel", String.class).setHeaderCaption("Version").setExpandRatio(2); versionGrid.addColumn("description", String.class).setHeaderCaption("Description").setExpandRatio(1); versionGrid.addColumn("readOnly", Boolean.class).setHeaderCaption("Read Only").setMaximumWidth(100) .setRenderer(new HtmlRenderer(), new StringToBooleanConverter() { private static final long serialVersionUID = 1L; protected String getTrueString() { return FontAwesome.CHECK.getHtml(); }; protected String getFalseString() { return ""; }; }); versionGrid.addColumn("createTime", Date.class).setHeaderCaption("Create Time").setWidth(185) .setMaximumWidth(200).setRenderer(new DateRenderer(UiConstants.DATETIME_FORMAT)).setEditable(false); versionGrid.setContainerDataSource(versionGridContainer); versionGrid.setEditorFieldFactory(new FieldFactory()); versionGrid.getEditorFieldGroup().addCommitHandler(new FieldGroup.CommitHandler() { private static final long serialVersionUID = 1L; @Override public void preCommit(CommitEvent commitEvent) throws CommitException { } @Override public void postCommit(CommitEvent commitEvent) throws CommitException { ProjectVersion item = (ProjectVersion) versionGrid.getEditedItemId(); IConfigurationService configurationService = context.getConfigurationService(); configurationService.save(item); projectGrid.markAsDirty(); } }); versionGrid.addSelectionListener((event) -> { int numberSelected = versionGrid.getSelectedRows().size(); boolean currentlyEditing = projectGrid.getEditedItemId() != null; boolean selected = numberSelected > 0 && !currentlyEditing; openButton.setEnabled(selected); newButton.setEnabled(selected); removeButton.setEnabled(selected); editButton.setEnabled(selected); }); versionGrid.addItemClickListener(new GridClickListener(versionGrid)); layout.addComponent(versionGrid); layout.setExpandRatio(versionGrid, 1); layout.addComponent(new Label(" ")); versionGridContainer.addAll(versions); versionGrid.sort("versionLabel", SortDirection.DESCENDING); return layout; }
From source file:org.jumpmind.metl.ui.views.manage.ExecutionRunPanel.java
License:Open Source License
protected void refreshUI(ExecutionData data) { if (!lastDataRefreshWasDone) { flowLabel.setValue(data.execution.getFlowName()); startLabel.setValue(formatDate(data.execution.getStartTime())); if (data.execution.getStatus() != null) { if (data.execution.getStatus().equals(ExecutionStatus.ERROR.name())) { statusLabel.setStyleName("error"); statusLabel.setValue(FontAwesome.WARNING.getHtml() + " " + data.execution.getStatus()); } else if (data.execution.getStatus().equals(ExecutionStatus.DONE.name())) { statusLabel.setStyleName("done"); statusLabel.setValue(FontAwesome.CHECK.getHtml() + " " + data.execution.getStatus()); } else if (data.execution.getStatus().equals(ExecutionStatus.RUNNING.name())) { statusLabel.setStyleName("running"); statusLabel.setValue(FontAwesome.SPINNER.getHtml() + " " + data.execution.getStatus()); } else { statusLabel.setStyleName(""); statusLabel.setValue(data.execution.getStatus()); }/*from www . j av a 2 s . c o m*/ } endLabel.setValue(formatDate(data.execution.getEndTime())); if (showDiagramCheckbox.getValue()) { redrawFlow(); } @SuppressWarnings("unchecked") Set<String> selected = (Set<String>) stepTable.getValue(); stepContainer.removeAllItems(); stepContainer.addAll(data.steps); if (selected != null && selected.size() > 0) { stepTable.setValue(selected); } else if (data.steps.size() > 0) { selected = new HashSet<>(); selected.add(data.steps.get(0).getId()); stepTable.setValue(selected); } List<ExecutionStepLog> logMessages = new ArrayList<>(logContainer.getItemIds()); List<ExecutionStepLog> newLogMessages = new ArrayList<>(data.logs); for (ExecutionStepLog logMsg : logMessages) { newLogMessages.remove(logMsg); } if (newLogMessages.size() > 0) { logContainer.addAll(newLogMessages); if (lastSortOrder != null) { logTable.setSortOrder(lastSortOrder); } } } rerunButton.setVisible(isDone() && flowRunnable != null); removeButton.setVisible(isDone()); cancelButton.setVisible(!isDone()); lastDataRefreshWasDone = isDone(); }
From source file:org.opencms.ui.dialogs.CmsChangeTypeDialog.java
License:Open Source License
/** * @see org.opencms.ui.dialogs.CmsNewDialog#getActionIconHtml() */ @Override protected String getActionIconHtml() { return FontAwesome.CHECK.getHtml(); }
From source file:pl.exsio.ca.module.terrain.evidence.TerrainDataTable.java
License:Open Source License
public TerrainDataTable(SecurityContext security) { super(TabbedForm.class, new TableDataConfig(TerrainDataTable.class) { {/* w ww . java 2 s. co m*/ setColumnHeaders("type", "no", "name", "last_notification", "current_group", "archival", "id"); setVisibleColumns("type", "no", "name", "lastNotificationDate", "assignments", "archival", "id"); } }, security); this.openEditionAfterAddition = true; this.flexibleControls = true; this.selectedTerrains = new HashSet<>(); this.quickNotification = new Button("", FontAwesome.CHECK); this.quickNotification.setEnabled(false); }
From source file:pl.exsio.frameset.vaadin.module.util.usergen.UserGenModule.java
License:Open Source License
@Override public void enter(ViewChangeListener.ViewChangeEvent event) { this.removeAllComponents(); final Form form = this.getGeneratorForm(); Button generate = new Button(t("generate"), FontAwesome.CHECK); generate.addClickListener(new Button.ClickListener() { @Override/* ww w.j a va 2 s . c om*/ public void buttonClick(Button.ClickEvent event) { form.commit(); generateUsers(form); } }); this.addComponent(form); this.addComponent(generate); this.setMargin(true); this.setSpacing(true); }
From source file:pl.exsio.frameset.vaadin.ui.support.dialog.ConfirmationDialog.java
License:Open Source License
private static HorizontalLayout getControls(final Window window, final Handler positiveHandler, final Handler negativeHandler) { final HorizontalLayout controls = new HorizontalLayout() { {/* w w w . j a v a 2 s. c o m*/ Button positive = new Button(t("core.yes"), FontAwesome.CHECK); Button negative = new Button(t("core.no"), FontAwesome.TIMES); positive.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { window.close(); } }); negative.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { window.close(); } }); if (positiveHandler instanceof Handler) { positive.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { positiveHandler.handle(event); } }); } if (negativeHandler instanceof Handler) { negative.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { negativeHandler.handle(event); } }); } positive.setClickShortcut(ShortcutAction.KeyCode.ENTER); negative.setClickShortcut(ShortcutAction.KeyCode.ESCAPE); addComponent(positive); addComponent(negative); } }; controls.setMargin(new MarginInfo(true, true, false, true)); controls.setSpacing(true); return controls; }