List of usage examples for com.vaadin.server FontAwesome MINUS
FontAwesome MINUS
To view the source code for com.vaadin.server FontAwesome MINUS.
Click Source Link
From source file:com.esofthead.mycollab.module.project.ui.ProjectAssetsUtil.java
License:Open Source License
public static FontAwesome getPhaseIcon(String status) { if (OptionI18nEnum.MilestoneStatus.Closed.name().equals(status)) { return FontAwesome.MINUS; } else if (OptionI18nEnum.MilestoneStatus.Future.name().equals(status)) { return FontAwesome.CLOCK_O; } else {//from w w w . j a v a 2s .c o m return FontAwesome.SPINNER; } }
From source file:com.esofthead.mycollab.module.project.view.milestone.MilestoneListViewImpl.java
License:Open Source License
private void constructBody() { this.bodyContent = CustomLayoutExt.createLayout("milestoneView"); bodyContent.setWidth("100%"); bodyContent.setStyleName("milestone-view"); final MHorizontalLayout closedHeaderLayout = new MHorizontalLayout(); final Label closedHeader = new Label(FontAwesome.MINUS.getHtml() + " " + AppContext.getMessage(MilestoneI18nEnum.WIDGET_CLOSED_PHASE_TITLE), ContentMode.HTML); closedHeader.setSizeUndefined();/*from ww w . ja v a 2 s .co m*/ closedHeaderLayout.addComponent(closedHeader); closedHeaderLayout.setComponentAlignment(closedHeader, Alignment.MIDDLE_CENTER); bodyContent.addComponent(closedHeaderLayout, "closed-header"); closeContainer = new CssLayout(); closeContainer.setStyleName("milestone-col"); closeContainer.setWidth("100%"); bodyContent.addComponent(this.closeContainer, "closed-milestones"); final MHorizontalLayout inProgressHeaderLayout = new MHorizontalLayout(); final Label inProgressHeader = new Label(FontAwesome.SPINNER.getHtml() + " " + AppContext.getMessage(MilestoneI18nEnum.WIDGET_INPROGRESS_PHASE_TITLE), ContentMode.HTML); inProgressHeader.setSizeUndefined(); inProgressHeaderLayout.addComponent(inProgressHeader); inProgressHeaderLayout.setComponentAlignment(inProgressHeader, Alignment.MIDDLE_CENTER); bodyContent.addComponent(inProgressHeaderLayout, "in-progress-header"); inProgressContainer = new CssLayout(); inProgressContainer.setStyleName("milestone-col"); inProgressContainer.setWidth("100%"); bodyContent.addComponent(this.inProgressContainer, "in-progress-milestones"); final MHorizontalLayout futureHeaderLayout = new MHorizontalLayout(); final Label futureHeader = new Label(FontAwesome.CLOCK_O.getHtml() + " " + AppContext.getMessage(MilestoneI18nEnum.WIDGET_FUTURE_PHASE_TITLE), ContentMode.HTML); futureHeader.setSizeUndefined(); futureHeaderLayout.addComponent(futureHeader); futureHeaderLayout.setComponentAlignment(futureHeader, Alignment.MIDDLE_CENTER); bodyContent.addComponent(futureHeaderLayout, "future-header"); futureContainer = new CssLayout(); futureContainer.setStyleName("milestone-col"); futureContainer.setWidth("100%"); bodyContent.addComponent(this.futureContainer, "future-milestones"); this.addComponent(bodyContent); }
From source file:com.esofthead.mycollab.vaadin.ui.EditFormControlsGenerator.java
License:Open Source License
public HorizontalLayout createButtonControls(final boolean isSaveBtnVisible, final boolean isSaveAndNewBtnVisible, final boolean isCancelBtnVisible) { final HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true);/*from w ww .j a v a 2s . c om*/ layout.setSizeUndefined(); layout.setStyleName("addNewControl"); if (isSaveBtnVisible) { final Button saveBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { if (EditFormControlsGenerator.this.editForm.validateForm()) { EditFormControlsGenerator.this.editForm.fireSaveForm(); } } }); saveBtn.setIcon(FontAwesome.SAVE); saveBtn.setStyleName(UIConstants.THEME_GREEN_LINK); layout.addComponent(saveBtn); layout.setComponentAlignment(saveBtn, Alignment.MIDDLE_CENTER); } if (isSaveAndNewBtnVisible) { final Button saveAndNewBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE_NEW), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { if (EditFormControlsGenerator.this.editForm.validateForm()) { EditFormControlsGenerator.this.editForm.fireSaveAndNewForm(); } } }); saveAndNewBtn.setIcon(FontAwesome.SHARE_ALT); saveAndNewBtn.setStyleName(UIConstants.THEME_GREEN_LINK); layout.addComponent(saveAndNewBtn); layout.setComponentAlignment(saveAndNewBtn, Alignment.MIDDLE_CENTER); } if (isCancelBtnVisible) { final Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { EditFormControlsGenerator.this.editForm.fireCancelForm(); } }); cancelBtn.setIcon(FontAwesome.MINUS); cancelBtn.setStyleName(UIConstants.THEME_GRAY_LINK); layout.addComponent(cancelBtn); layout.setComponentAlignment(cancelBtn, Alignment.MIDDLE_CENTER); } return layout; }
From source file:com.esofthead.mycollab.vaadin.web.ui.EditFormControlsGenerator.java
License:Open Source License
public HorizontalLayout createButtonControls(boolean isSaveBtnVisible, boolean isSaveAndNewBtnVisible, boolean isCancelBtnVisible) { MHorizontalLayout layout = new MHorizontalLayout().withStyleName("addNewControl"); layout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); layout.setSizeUndefined();/*from w w w. j av a 2 s . co m*/ if (isSaveBtnVisible) { final Button saveBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { if (editForm.validateForm()) { editForm.fireSaveForm(); } } }); saveBtn.setIcon(FontAwesome.SAVE); saveBtn.setStyleName(UIConstants.BUTTON_ACTION); layout.addComponent(saveBtn); } if (isSaveAndNewBtnVisible) { Button saveAndNewBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE_NEW), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { if (editForm.validateForm()) { editForm.fireSaveAndNewForm(); } } }); saveAndNewBtn.setIcon(FontAwesome.SHARE_ALT); saveAndNewBtn.setStyleName(UIConstants.BUTTON_ACTION); layout.addComponent(saveAndNewBtn); } if (isCancelBtnVisible) { Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { editForm.fireCancelForm(); } }); cancelBtn.setIcon(FontAwesome.MINUS); cancelBtn.setStyleName(UIConstants.BUTTON_OPTION); layout.addComponent(cancelBtn); } return layout; }
From source file:com.esofthead.mycollab.vaadin.web.ui.utils.FormControlsGenerator.java
License:Open Source License
public static final <T> ComponentContainer generateEditFormControls(final AdvancedEditBeanForm<T> editForm, boolean isSaveBtnVisible, boolean isSaveAndNewBtnVisible, boolean isCancelBtnVisible) { MHorizontalLayout layout = new MHorizontalLayout(); if (isCancelBtnVisible) { Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override/*from ww w. j av a 2 s . com*/ public void buttonClick(final Button.ClickEvent event) { editForm.fireCancelForm(); } }); cancelBtn.setIcon(FontAwesome.MINUS); cancelBtn.setStyleName(UIConstants.BUTTON_OPTION); layout.addComponent(cancelBtn); } if (isSaveAndNewBtnVisible) { Button saveAndNewBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE_NEW), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final Button.ClickEvent event) { if (editForm.validateForm()) { editForm.fireSaveAndNewForm(); } } }); saveAndNewBtn.setIcon(FontAwesome.SHARE_ALT); saveAndNewBtn.setStyleName(UIConstants.BUTTON_ACTION); layout.addComponent(saveAndNewBtn); } if (isSaveBtnVisible) { final Button saveBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final Button.ClickEvent event) { if (editForm.validateForm()) { editForm.fireSaveForm(); } } }); saveBtn.setIcon(FontAwesome.SAVE); saveBtn.setStyleName(UIConstants.BUTTON_ACTION); layout.addComponent(saveBtn); } return layout; }
From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadStatusInfoWindow.java
License:Open Source License
private Button getMinimizeButton() { final Button minimizeBtn = SPUIComponentProvider.getButton( UIComponentIdProvider.UPLOAD_STATUS_POPUP_MINIMIZE_BUTTON_ID, "", "", "", true, FontAwesome.MINUS, SPUIButtonStyleSmallNoBorder.class); minimizeBtn.addStyleName(ValoTheme.BUTTON_BORDERLESS); minimizeBtn.addClickListener(event -> minimizeWindow()); minimizeBtn.setEnabled(true);//from w w w .java 2 s . co m return minimizeBtn; }
From source file:org.eclipse.hawkbit.ui.management.targettable.TargetBulkUpdateWindowLayout.java
License:Open Source License
private Button getMinimizeButton() { final Button minimizeBtn = SPUIComponentProvider.getButton( UIComponentIdProvider.BULK_UPLOAD_MINIMIZE_BUTTON_ID, "", "", "", true, FontAwesome.MINUS, SPUIButtonStyleNoBorder.class); minimizeBtn.addStyleName(ValoTheme.BUTTON_BORDERLESS); minimizeBtn.addClickListener(event -> minimizeWindow()); minimizeBtn.setEnabled(false);// w w w. j a va 2 s.c om return minimizeBtn; }
From source file:org.opennms.features.topology.app.internal.ui.ToolbarPanel.java
License:Open Source License
public ToolbarPanel(final ToolbarPanelController controller) { addStyleName(Styles.TOOLBAR);//w w w .j av a2 s . c om this.layoutManager = controller.getLayoutManager(); final Property<Double> scale = controller.getScaleProperty(); final Boolean[] eyeClosed = new Boolean[] { false }; final Button showFocusVerticesBtn = new Button(); showFocusVerticesBtn.setIcon(FontAwesome.EYE); showFocusVerticesBtn.setDescription("Toggle Highlight Focus Nodes"); showFocusVerticesBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (eyeClosed[0]) { showFocusVerticesBtn.setIcon(FontAwesome.EYE); } else { showFocusVerticesBtn.setIcon(FontAwesome.EYE_SLASH); } eyeClosed[0] = !eyeClosed[0]; // toggle controller.toggleHighlightFocus(); } }); final Button magnifyBtn = new Button(); magnifyBtn.setIcon(FontAwesome.PLUS); magnifyBtn.setDescription("Magnify"); magnifyBtn.addClickListener( (Button.ClickListener) event -> scale.setValue(Math.min(1, scale.getValue() + 0.25))); final Button demagnifyBtn = new Button(); demagnifyBtn.setIcon(FontAwesome.MINUS); demagnifyBtn.setDescription("Demagnify"); demagnifyBtn.addClickListener( (Button.ClickListener) event -> scale.setValue(Math.max(0, scale.getValue() - 0.25))); m_szlOutBtn = new Button(); m_szlOutBtn.setId("szlOutBtn"); m_szlOutBtn.setIcon(FontAwesome.ANGLE_DOWN); m_szlOutBtn.setDescription("Decrease Semantic Zoom Level"); m_szlOutBtn.setEnabled(controller.getSemanticZoomLevel() > 0); m_szlOutBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { int szl = controller.getSemanticZoomLevel(); if (szl > 0) { setSemanticZoomLevel(controller, szl - 1); controller.saveHistory(); } } }); final Button szlInBtn = new Button(); szlInBtn.setId("szlInBtn"); szlInBtn.setIcon(FontAwesome.ANGLE_UP); szlInBtn.setDescription("Increase Semantic Zoom Level"); szlInBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { setSemanticZoomLevel(controller, controller.getSemanticZoomLevel() + 1); controller.saveHistory(); } }); m_zoomLevelLabel.setId("szlInputLabel"); m_panBtn = new Button(); m_panBtn.setIcon(FontAwesome.ARROWS); m_panBtn.setDescription("Pan Tool"); m_panBtn.addStyleName(Styles.SELECTED); m_selectBtn = new Button(); m_selectBtn.setIcon(IonicIcons.ANDROID_EXPAND); m_selectBtn.setDescription("Selection Tool"); m_selectBtn.setStyleName("toolbar-button"); m_selectBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { m_selectBtn.addStyleName(Styles.SELECTED); m_panBtn.removeStyleName(Styles.SELECTED); controller.setActiveTool(ActiveTool.select); } }); m_panBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { m_panBtn.addStyleName(Styles.SELECTED); m_selectBtn.removeStyleName(Styles.SELECTED); controller.setActiveTool(ActiveTool.pan); } }); Button showAllMapBtn = new Button(); showAllMapBtn.setId("showEntireMapBtn"); showAllMapBtn.setIcon(FontAwesome.GLOBE); showAllMapBtn.setDescription("Show Entire Map"); showAllMapBtn.addClickListener((Button.ClickListener) event -> controller.showAllMap()); Button centerSelectionBtn = new Button(); centerSelectionBtn.setIcon(FontAwesome.LOCATION_ARROW); centerSelectionBtn.setDescription("Center On Selection"); centerSelectionBtn.addClickListener((Button.ClickListener) event -> controller.centerMapOnSelection()); Button shareButton = new Button("", FontAwesome.SHARE_SQUARE_O); shareButton.setDescription("Share"); shareButton.addClickListener((x) -> { // Create the share link String fragment = getUI().getPage().getLocation().getFragment(); String url = getUI().getPage().getLocation().toString().replace("#" + fragment, ""); String shareLink = String.format("%s?%s=%s", url, PARAMETER_HISTORY_FRAGMENT, fragment); // Create the Window Window shareWindow = new Window(); shareWindow.setCaption("Share Link"); shareWindow.setModal(true); shareWindow.setClosable(true); shareWindow.setResizable(false); shareWindow.setWidth(400, Sizeable.Unit.PIXELS); TextArea shareLinkField = new TextArea(); shareLinkField.setValue(shareLink); shareLinkField.setReadOnly(true); shareLinkField.setRows(3); shareLinkField.setWidth(100, Sizeable.Unit.PERCENTAGE); // Close Button Button close = new Button("Close"); close.setClickShortcut(ShortcutAction.KeyCode.ESCAPE, null); close.addClickListener(event -> shareWindow.close()); // Layout for Buttons HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setMargin(true); buttonLayout.setSpacing(true); buttonLayout.setWidth("100%"); buttonLayout.addComponent(close); buttonLayout.setComponentAlignment(close, Alignment.BOTTOM_RIGHT); // Content Layout VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(true); verticalLayout.setSpacing(true); verticalLayout.addComponent( new Label("Please use the following link to share the current view with others.")); verticalLayout.addComponent(shareLinkField); verticalLayout.addComponent(buttonLayout); shareWindow.setContent(verticalLayout); getUI().addWindow(shareWindow); }); // Refresh Button Button refreshButton = new Button(); refreshButton.setId("refreshNow"); refreshButton.setIcon(FontAwesome.REFRESH); refreshButton.setDescription("Refresh Now"); refreshButton.addClickListener((event) -> controller.refreshUI()); // Layer Layout layerLayout = new VerticalLayout(); layerLayout.setId("layerComponent"); layerLayout.setSpacing(true); layerLayout.setMargin(true); // Layer Button layerButton = new Button(); layerButton.setId("layerToggleButton"); layerButton.setIcon(FontAwesome.BARS); layerButton.setDescription("Layers"); layerButton.addClickListener((event) -> { boolean isCollapsed = layerButton.getStyleName().contains(Styles.EXPANDED); setLayerLayoutVisible(!isCollapsed); }); // Save button layerSaveButton = new Button(); layerSaveButton.setId("saveLayerButton"); layerSaveButton.setIcon(FontAwesome.FLOPPY_O); layerSaveButton.addClickListener((event) -> controller.saveLayout()); // Actual Layout for the Toolbar CssLayout contentLayout = new CssLayout(); contentLayout.addStyleName("toolbar-component"); contentLayout.addComponent(createGroup(szlInBtn, m_zoomLevelLabel, m_szlOutBtn)); contentLayout.addComponent( createGroup(refreshButton, centerSelectionBtn, showAllMapBtn, layerButton, showFocusVerticesBtn)); contentLayout.addComponent(createGroup(m_panBtn, m_selectBtn)); contentLayout.addComponent(createGroup(magnifyBtn, demagnifyBtn)); contentLayout.addComponent(createGroup(shareButton)); contentLayout.addComponent(createGroup(layerSaveButton)); // Toolbar addComponent(contentLayout); }