List of usage examples for com.vaadin.server FontAwesome PLAY
FontAwesome PLAY
To view the source code for com.vaadin.server FontAwesome PLAY.
Click Source Link
From source file:annis.gui.ExportPanel.java
License:Apache License
public ExportPanel(QueryPanel queryPanel, QueryController controller, QueryUIState state) { super(2, 3);/* w w w.j a v a2 s . c o m*/ this.queryPanel = queryPanel; this.controller = controller; this.state = state; this.eventBus = new EventBus(); this.eventBus.register(ExportPanel.this); this.formLayout = new FormLayout(); formLayout.setWidth("-1px"); setWidth("99%"); setHeight("-1px"); initHelpMessages(); setColumnExpandRatio(0, 0.0f); setColumnExpandRatio(1, 1.0f); cbExporter = new ComboBox("Exporter"); cbExporter.setNewItemsAllowed(false); cbExporter.setNullSelectionAllowed(false); cbExporter.setImmediate(true); for (Exporter e : SearchView.EXPORTER) { cbExporter.addItem(e.getClass().getSimpleName()); } cbExporter.setValue(SearchView.EXPORTER[0].getClass().getSimpleName()); cbExporter.addValueChangeListener(new ExporterSelectionHelpListener()); formLayout.addComponent(cbExporter); addComponent(formLayout, 0, 0); lblHelp = new Label(help4Exporter.get((String) cbExporter.getValue())); lblHelp.setContentMode(ContentMode.HTML); addComponent(lblHelp, 1, 0); cbLeftContext = new ComboBox("Left Context"); cbRightContext = new ComboBox("Right Context"); cbLeftContext.setNullSelectionAllowed(false); cbRightContext.setNullSelectionAllowed(false); cbLeftContext.setNewItemsAllowed(true); cbRightContext.setNewItemsAllowed(true); cbLeftContext .addValidator(new IntegerRangeValidator("must be a number", Integer.MIN_VALUE, Integer.MAX_VALUE)); cbRightContext .addValidator(new IntegerRangeValidator("must be a number", Integer.MIN_VALUE, Integer.MAX_VALUE)); for (Integer i : SearchOptionsPanel.PREDEFINED_CONTEXTS) { cbLeftContext.addItem(i); cbRightContext.addItem(i); } cbLeftContext.setValue(5); cbRightContext.setValue(5); formLayout.addComponent(cbLeftContext); formLayout.addComponent(cbRightContext); txtAnnotationKeys = new TextField("Annotation Keys"); txtAnnotationKeys.setDescription("Some exporters will use this comma " + "seperated list of annotation keys to limit the exported data to these " + "annotations."); formLayout.addComponent(new HelpButton(txtAnnotationKeys)); txtParameters = new TextField("Parameters"); txtParameters.setDescription( "You can input special parameters " + "for certain exporters. See the description of each exporter " + "(? button above) for specific parameter settings."); formLayout.addComponent(new HelpButton(txtParameters)); btExport = new Button("Perform Export"); btExport.setIcon(FontAwesome.PLAY); btExport.setDisableOnClick(true); btExport.addClickListener(new ExportButtonListener()); btCancel = new Button("Cancel Export"); btCancel.setIcon(FontAwesome.TIMES_CIRCLE); btCancel.setEnabled(false); btCancel.addClickListener(new CancelButtonListener()); btCancel.setVisible(SearchView.EXPORTER[0].isCancelable()); btDownload = new Button("Download"); btDownload.setDescription("Click here to start the actual download."); btDownload.setIcon(FontAwesome.DOWNLOAD); btDownload.setDisableOnClick(true); btDownload.setEnabled(false); HorizontalLayout layoutExportButtons = new HorizontalLayout(btExport, btCancel, btDownload); addComponent(layoutExportButtons, 0, 1, 1, 1); VerticalLayout vLayout = new VerticalLayout(); addComponent(vLayout, 0, 2, 1, 2); progressBar = new ProgressBar(); progressBar.setVisible(false); progressBar.setIndeterminate(true); vLayout.addComponent(progressBar); progressLabel = new Label(); vLayout.addComponent(progressLabel); if (state != null) { cbLeftContext.setPropertyDataSource(state.getLeftContext()); cbRightContext.setPropertyDataSource(state.getRightContext()); cbExporter.setPropertyDataSource(state.getExporterName()); state.getExporterName().setValue(SearchView.EXPORTER[0].getClass().getSimpleName()); txtAnnotationKeys.setConverter(new CommaSeperatedStringConverterList()); txtAnnotationKeys.setPropertyDataSource(state.getExportAnnotationKeys()); txtParameters.setPropertyDataSource(state.getExportParameters()); } }
From source file:com.hybridbpm.ui.component.chart.ChartEditor.java
License:Apache License
public ChartEditor(Module module) { super();//from ww w. j a v a 2s. c om this.module = HybridbpmUI.getDevelopmentAPI().getModuleById(module.getId()); if (this.module.getDesign() != null && !this.module.getDesign().isEmpty()) { this.diagrammePreference = HybridbpmCoreUtil.jsonToObject(this.module.getDesign(), DiagrammePreference.class); } else { diagrammePreference = DiagrammePreference.createDefault(); } preferences.setItemDataSource(diagrammePreference); btnExecute.setIcon(FontAwesome.COG); btnExecute.setStyleName(ValoTheme.BUTTON_BORDERLESS); btnExecute.addStyleName(ValoTheme.BUTTON_SMALL); btnTest.setIcon(FontAwesome.PLAY); btnTest.setStyleName(ValoTheme.BUTTON_BORDERLESS); btnTest.addStyleName(ValoTheme.BUTTON_SMALL); horizontalSplitPanel.addComponents(codeEditorLayout, designEditorLayout); horizontalSplitPanel.setSplitPosition(50, Sizeable.Unit.PERCENTAGE); buttonBar.addComponent(btnTest, 0); table.setSizeFull(); table.setStyleName(ValoTheme.TABLE_COMPACT); queryEditor.setCaption("Request"); queryEditor.setMode(AceMode.sql); queryEditor.setTheme(AceTheme.textmate); queryEditor.setShowGutter(true); queryEditor.setSizeFull(); codeEditorLayout.setSizeFull(); codeEditorLayout.addStyleName("code"); codeEditorLayout.setMargin(new MarginInfo(false, false, false, true)); codeEditorLayout.setSpacing(true); codeEditorLayout.setExpandRatio(queryEditor, 1f); codeEditorLayout.setExpandRatio(table, 2f); for (DiagrammeChartType chartType : DiagrammeChartType.values()) { chartTypeGroup.addItem(chartType.toString()); chartTypeGroup.setItemIcon(chartType, chartType.getIcon()); chartTypeGroup.setItemCaption(chartType, chartType.getName()); } chartTypeGroup.setStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL); chartTypeGroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL); chartTypeGroup.setImmediate(true); chartTypeGroup.setNullSelectionAllowed(false); chartTypeGroup.addValueChangeListener(this); addComponent(chartTypeGroup, 1); designEditorLayout.setSizeFull(); designEditorLayout.addStyleName("template"); designEditorLayout.setMargin(new MarginInfo(false, true, false, true)); designEditorLayout.setSpacing(true); preferences.bind(queryEditor, DiagrammePreference.QUERY); preferences.bind(chartTypeGroup, DiagrammePreference.CHART_TYPE); refreshChartConfigurationLayout(); }
From source file:com.hybridbpm.ui.component.chart.configuration.LookAndFeelLayout.java
License:Apache License
public LookAndFeelLayout(BeanFieldGroup<DiagrammePreference> preferences) { super(preferences); addComponent(splitLayout);/*from ww w . j a va 2 s. c om*/ chartSplit.addComponent(chartContainer); chartSplit.addComponent(btnPreview); btnPreview.setIcon(FontAwesome.PLAY); chartSplit.setComponentAlignment(chartContainer, Alignment.MIDDLE_CENTER); chartSplit.setExpandRatio(chartContainer, 1f); chartSplit.setSizeFull(); colourContainer.setSizeFull(); splitLayout.setSizeFull(); splitLayout.addComponent(chartSplit); splitLayout.setSplitPosition(70f); splitLayout.addComponent(colourContainer); bindHandlers(); }
From source file:com.hybridbpm.ui.component.development.ConnectorEditor.java
License:Apache License
public ConnectorEditor(Module Module) { super();/* w w w .jav a2 s . c o m*/ this.Module = HybridbpmUI.getDevelopmentAPI().getModuleById(Module.getId()); ; btnRun.setIcon(FontAwesome.PLAY); replaceComponent(horizontalSplitPanel, codeEditorLayout); btnParameters.setIcon(FontAwesome.WRENCH); buttonBar.addComponent(btnParameters, 0); buttonBar.addComponent(btnRun, 0); codeEditorLayout.setSizeFull(); codeEditorLayout.addStyleName("code"); codeEditorLayout.setMargin(new MarginInfo(false, false, false, true)); binder.setItemDataSource(this.Module); binder.bind(codeEditor, "code"); switch (Module.getType()) { case CONNECTOR: codeEditor.setCaption("Code"); codeEditor.setMode(AceMode.groovy); codeEditor.setTheme(AceTheme.textmate); codeEditor.setShowGutter(true); codeEditor.setSizeFull(); break; } }
From source file:com.hybridbpm.ui.component.development.FormEditor.java
License:Apache License
public FormEditor(Module module) { super();/*from www. ja v a 2 s . co m*/ this.module = HybridbpmUI.getDevelopmentAPI().getModuleById(module.getId()); ; btnRun.setIcon(FontAwesome.PLAY); btnRun.setStyleName(ValoTheme.BUTTON_BORDERLESS); btnRun.addStyleName(ValoTheme.BUTTON_SMALL); btnParameters.setIcon(FontAwesome.WRENCH); btnParameters.setStyleName(ValoTheme.BUTTON_BORDERLESS); btnParameters.addStyleName(ValoTheme.BUTTON_SMALL); horizontalSplitPanel.addComponents(designEditorLayout, codeEditorLayout); buttonBar.addComponent(btnParameters, 0); buttonBar.addComponent(btnRun, 0); codeEditorLayout.setSizeFull(); codeEditorLayout.addStyleName("code"); codeEditorLayout.setMargin(new MarginInfo(false, false, false, true)); designEditorLayout.setSizeFull(); designEditorLayout.addStyleName("template"); designEditorLayout.setMargin(new MarginInfo(false, true, false, false)); binder.setItemDataSource(this.module); binder.bind(codeEditor, "code"); binder.bind(designEditor, "design"); switch (module.getType()) { case FORM: designEditor.setCaption("Design"); designEditor.setMode(AceMode.html); designEditor.setTheme(AceTheme.textmate); designEditor.setShowGutter(true); designEditor.setSizeFull(); codeEditor.setCaption("Code"); codeEditor.setMode(AceMode.groovy); codeEditor.setTheme(AceTheme.textmate); codeEditor.setShowGutter(true); codeEditor.setSizeFull(); horizontalSplitPanel.setSplitPosition(50, Sizeable.Unit.PERCENTAGE); btnRun.setCaption("Test"); break; } if (module.getTemplate()) { btnRun.setVisible(false); btnParameters.setVisible(false); } }
From source file:com.lst.deploymentautomation.vaadin.core.AppLayout.java
License:Open Source License
private void initLayout() { addStyleName("app-layout"); setSizeFull();/*from w w w. j a v a 2 s. c o m*/ //main page layout layout = new CustomLayout("page"); layout.setSizeFull(); setCompositionRoot(layout); //navigation menu VerticalLayout navLayout = new VerticalLayout(); navLayout.setSizeFull(); layout.addComponent(navLayout, "usermenu"); navigation = new NavigationMenu(); navigation.addStyleName("navigation-menu"); layout.addComponent(navigation, "navigation"); final UserInfo user = ((LspsUI) UI.getCurrent()).getUser(); LspsUI ui = (LspsUI) UI.getCurrent(); if (user.hasRight(HumanRights.READ_ALL_TODO) || user.hasRight(HumanRights.READ_OWN_TODO)) { addViewItem(navigation, TodoListView.TITLE, TodoListView.ID, FontAwesome.LIST); } /*if (user.hasRight(HumanRights.ACCESS_DOCUMENTS)) { addViewItem(navigation, DocumentsView.TITLE, DocumentsView.ID, FontAwesome.FILE_TEXT_O); } if (user.hasRight(EngineRights.READ_MODEL) && user.hasRight(EngineRights.CREATE_MODEL_INSTANCE)) { addViewItem(navigation, RunModelView.TITLE, RunModelView.ID, FontAwesome.CARET_SQUARE_O_RIGHT); }*/ addNavigationCommandItem(navigation, "Initialize deployment", new NavigationMenu.OpenDocumentCommand(ui, "", "'deployment-automation-ui'::InitiateDeploymentDoc", null), FontAwesome.PLAY); addNavigationCommandItem(navigation, "Deployments list", new NavigationMenu.OpenDocumentCommand(ui, "", "'deployment-automation-ui'::DeploymentsList", null), FontAwesome.LIST_OL); //user menu userMenu = new NavigationMenu(); userMenu.addStyleName("navigation-menu"); navLayout.addComponent(userMenu); addViewItem(userMenu, SettingsView.TITLE, SettingsView.ID, FontAwesome.COG); NavigationCommand logoutCmd = new LogoutCommand((LspsUI) getUI()); MenuItem logout = addNavigationCommandItem(userMenu, logoutCmd.getTitle(), logoutCmd, FontAwesome.POWER_OFF); String fullName = user.getPerson().getFullName(); logout.setDescription(ui.getMessage("nav.logout", fullName)); boolean collapsed = user.getSettingBoolean("collapsedMenu", false); if (collapsed == true) { UI.getCurrent().addStyleName("l-menu-collapsed"); } Button button = new Button(""); button.addStyleName("l-menu-expander"); button.addStyleName("link"); navLayout.addComponent(button); button.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { boolean collapsed = user.getSettingBoolean("collapsedMenu", false); if (collapsed) { UI.getCurrent().removeStyleName("l-menu-collapsed"); } else { UI.getCurrent().addStyleName("l-menu-collapsed"); } user.setSetting("collapsedMenu", !collapsed); } }); }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.WorkflowComponent.java
License:Open Source License
private void init() { VerticalLayout workflowLayout = new VerticalLayout(); viewContent.setWidth("100%"); viewContent.setMargin(true);/*from w w w . j av a 2 s .co m*/ // select available workflows workflows = new VerticalLayout(); VerticalLayout workflowsContent = new VerticalLayout(); workflows.setMargin(new MarginInfo(false, true, true, false)); workflowsContent.addComponent(availableWorkflows); availableWorkflows.setSizeFull(); availableWorkflows.setDescription(WORKFKLOW_GRID_DESCRIPTION); // availableWorkflows.setWidth("100%"); workflows.setVisible(false); workflows.setCaption("Available Workflows"); workflows.setIcon(FontAwesome.EXCHANGE); workflows.addComponent(workflowsContent); workflows.setWidth(100.0f, Unit.PERCENTAGE); // submission submission = new VerticalLayout(); submission.setMargin(new MarginInfo(false, true, true, false)); submission.setCaption(SUBMISSION_CAPTION); submission.setIcon(FontAwesome.PLAY); submission.setWidth(100.0f, Unit.PERCENTAGE); submission.setVisible(false); // add sections to layout viewContent.addComponent(workflows); viewContent.addComponent(submission); workflowLayout.addComponent(viewContent); setCompositionRoot(workflowLayout); addComponentListeners(); }
From source file:org.eclipse.hawkbit.ui.rollout.rollout.AutoStartOptionGroupLayout.java
License:Open Source License
private void createOptionGroup() { autoStartOptionGroup = new FlexibleOptionGroup(); autoStartOptionGroup.addItem(AutoStartOption.MANUAL); autoStartOptionGroup.addItem(AutoStartOption.AUTO_START); autoStartOptionGroup.addItem(AutoStartOption.SCHEDULED); selectDefaultOption();//from ww w .j a v a 2 s. c o m final FlexibleOptionGroupItemComponent manualItem = autoStartOptionGroup .getItemComponent(AutoStartOption.MANUAL); manualItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START); // set Id for Forced radio button. manualItem.setId(UIComponentIdProvider.ROLLOUT_START_MANUAL_ID); addComponent(manualItem); final Label manualLabel = new Label(); manualLabel.setStyleName("statusIconPending"); manualLabel.setIcon(FontAwesome.HAND_PAPER_O); manualLabel.setCaption(i18n.getMessage("caption.rollout.start.manual")); manualLabel.setDescription(i18n.getMessage("caption.rollout.start.manual.desc")); manualLabel.setStyleName("padding-right-style"); addComponent(manualLabel); final FlexibleOptionGroupItemComponent autoStartItem = autoStartOptionGroup .getItemComponent(AutoStartOption.AUTO_START); autoStartItem.setId(UIComponentIdProvider.ROLLOUT_START_AUTO_ID); autoStartItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START); addComponent(autoStartItem); final Label autoStartLabel = new Label(); autoStartLabel.setSizeFull(); autoStartLabel.setIcon(FontAwesome.PLAY); autoStartLabel.setCaption(i18n.getMessage("caption.rollout.start.auto")); autoStartLabel.setDescription(i18n.getMessage("caption.rollout.start.auto.desc")); autoStartLabel.setStyleName("padding-right-style"); addComponent(autoStartLabel); final FlexibleOptionGroupItemComponent scheduledItem = autoStartOptionGroup .getItemComponent(AutoStartOption.SCHEDULED); scheduledItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START); // setted Id for Time Forced radio button. scheduledItem.setId(UIComponentIdProvider.ROLLOUT_START_SCHEDULED_ID); addComponent(scheduledItem); final Label scheduledLabel = new Label(); scheduledLabel.setStyleName("statusIconPending"); scheduledLabel.setIcon(FontAwesome.CLOCK_O); scheduledLabel.setCaption(i18n.getMessage("caption.rollout.start.scheduled")); scheduledLabel.setDescription(i18n.getMessage("caption.rollout.start.scheduled.desc")); scheduledLabel.setStyleName(STYLE_DIST_WINDOW_AUTO_START); addComponent(scheduledLabel); startAtDateField = new DateField(); startAtDateField.setInvalidAllowed(false); startAtDateField.setInvalidCommitted(false); startAtDateField.setEnabled(false); startAtDateField.setStyleName("dist-window-forcedtime"); final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone(); startAtDateField.setValue(Date .from(LocalDateTime.now().plusMinutes(30).atZone(SPDateTimeUtil.getTimeZoneId(tz)).toInstant())); startAtDateField.setImmediate(true); startAtDateField.setTimeZone(tz); startAtDateField.setLocale(HawkbitCommonUtil.getCurrentLocale()); startAtDateField.setResolution(Resolution.MINUTE); startAtDateField.addStyleName(ValoTheme.DATEFIELD_SMALL); addComponent(startAtDateField); }
From source file:org.eclipse.hawkbit.ui.rollout.rollout.RolloutListGrid.java
License:Open Source License
private StatusFontIcon createRunButtonMetadata(final RolloutStatus rolloutStatus) { final boolean isDisabled = hasToBeDisabled(rolloutStatus, RUN_BUTTON_ENABLED); return new StatusFontIcon(FontAwesome.PLAY, null, i18n.getMessage(UIMessageIdProvider.TOOLTIP_ROLLOUT_RUN), UIComponentIdProvider.ROLLOUT_RUN_BUTTON_ID, isDisabled); }
From source file:org.jumpmind.metl.ui.views.design.EditRdbmsReaderPanel.java
License:Open Source License
protected void buildUI() { if (!readOnly) { ButtonBar buttonBar = new ButtonBar(); addComponent(buttonBar);/* w w w . j av a2 s . c o m*/ executeSqlClickListener = new ExecuteSqlClickListener(); executeButton = buttonBar.addButton("Execute", FontAwesome.PLAY, executeSqlClickListener); executeButton.setEnabled(false); Resource resource = component.getResource(); if (resource != null) { resource.put(BasicDataSourcePropertyConstants.DB_POOL_INITIAL_SIZE, "2"); resource.put(BasicDataSourcePropertyConstants.DB_POOL_MAX_ACTIVE, "2"); resource.put(BasicDataSourcePropertyConstants.DB_POOL_MAX_IDLE, "2"); resource.put(BasicDataSourcePropertyConstants.DB_POOL_MIN_IDLE, "2"); Datasource dataSourceResource = (Datasource) context.getResourceFactory().create(resource, null); DataSource dataSource = dataSourceResource.reference(); platform = JdbcDatabasePlatformFactory.createNewPlatformInstance(dataSource, new SqlTemplateSettings(), false, false); queryPanel = new QueryPanel(new IDb() { private static final long serialVersionUID = 1L; @Override public IDatabasePlatform getPlatform() { return platform; } @Override public String getName() { return ""; } }, new ISettingsProvider() { private static final long serialVersionUID = 1L; Settings settings = new Settings(); @Override public void save(Settings settings) { } @Override public Settings load() { return settings; } @Override public Settings get() { return settings; } }, new IButtonBar() { private static final long serialVersionUID = 1L; @Override public void setRollbackButtonEnabled(boolean enabled) { } @Override public void setExecuteScriptButtonEnabled(boolean enabled) { } @Override public void setExecuteAtCursorButtonEnabled(boolean enabled) { executeButton.setEnabled(enabled); } @Override public void setCommitButtonEnabled(boolean enabled) { } }, context.getUser().getLoginId()); queryPanel.appendSql(component.get(RdbmsReader.SQL)); queryPanel.addShortcutListener( new ShortcutListener("", KeyCode.ENTER, new int[] { ModifierKey.CTRL }) { private static final long serialVersionUID = 1L; @Override public void handleAction(Object sender, Object target) { executeSqlClickListener.buttonClick(new ClickEvent(executeButton)); } } ); addComponent(queryPanel); setExpandRatio(queryPanel, 1); } else { Label label = new Label("Before configuring SQL you must select a data source"); addComponent(label); setExpandRatio(label, 1); } } else { AceEditor editor = CommonUiUtils.createAceEditor(); editor.setMode(AceMode.sql); editor.setValue(component.get(RdbmsReader.SQL)); editor.setReadOnly(readOnly); addComponent(editor); setExpandRatio(editor, 1); } }