List of usage examples for com.vaadin.server FontAwesome TIMES_CIRCLE
FontAwesome TIMES_CIRCLE
To view the source code for com.vaadin.server FontAwesome TIMES_CIRCLE.
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 va 2s .c om 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:annis.gui.querybuilder.EdgeWindow.java
License:Apache License
public EdgeWindow(final TigerQueryBuilderCanvas parent, NodeWindow source, NodeWindow target) { this.parent = parent; this.source = source; this.target = target; setSizeFull();//w ww . java2 s .co m // HACK: use our own border since the one from chameleon does not really work addStyleName(ValoTheme.PANEL_BORDERLESS); addStyleName("border-layout"); addStyleName("white-panel"); VerticalLayout vLayout = new VerticalLayout(); setContent(vLayout); vLayout.setMargin(false); HorizontalLayout toolbar = new HorizontalLayout(); toolbar.addStyleName("toolbar"); toolbar.setWidth("100%"); toolbar.setHeight("-1px"); vLayout.addComponent(toolbar); Label lblTitle = new Label("AQL Operator"); lblTitle.setWidth("100%"); toolbar.addComponent(lblTitle); toolbar.setComponentAlignment(lblTitle, Alignment.MIDDLE_LEFT); toolbar.setExpandRatio(lblTitle, 1.0f); btClose = new Button(); btClose.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btClose.addStyleName(ValoTheme.BUTTON_SMALL); btClose.setIcon(FontAwesome.TIMES_CIRCLE); btClose.setWidth("-1px"); btClose.addListener((Button.ClickListener) this); toolbar.addComponent(btClose); toolbar.setComponentAlignment(btClose, Alignment.MIDDLE_RIGHT); toolbar.setExpandRatio(btClose, 0.0f); cbOperator = new ComboBox(); cbOperator.setNewItemsAllowed(false); cbOperator.setTextInputAllowed(false); cbOperator.setNullSelectionAllowed(true); cbOperator.addItem(CUSTOM); cbOperator.setItemCaption(CUSTOM, "custom"); cbOperator.setNullSelectionItemId(CUSTOM); cbOperator.setNewItemHandler(new SimpleNewItemHandler(cbOperator)); cbOperator.setImmediate(true); vLayout.addComponent(cbOperator); for (AQLOperator o : AQLOperator.values()) { cbOperator.addItem(o); cbOperator.setItemCaption(o, o.getDescription() + " (" + o.getOp() + ")"); } cbOperator.setValue(AQLOperator.DIRECT_PRECEDENCE); cbOperator.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { Object val = event.getProperty().getValue(); if (val instanceof AQLOperator) { txtOperator.setValue(((AQLOperator) val).getOp()); } } }); cbOperator.setWidth("100%"); cbOperator.setHeight("20px"); txtOperator = new TextField(); txtOperator.setValue("."); txtOperator.setInputPrompt("select operator definition"); txtOperator.setSizeFull(); txtOperator.addValueChangeListener(new OperatorValueChangeListener(parent)); txtOperator.setImmediate(true); vLayout.addComponent(txtOperator); vLayout.setExpandRatio(cbOperator, 1.0f); }
From source file:annis.gui.querybuilder.NodeWindow.java
License:Apache License
public NodeWindow(int id, TigerQueryBuilderCanvas parent) { this.parent = parent; this.id = id; this.annoNames = new TreeSet<>(); for (String a : parent.getAvailableAnnotationNames()) { annoNames.add(a.replaceFirst("^[^:]*:", "")); }//from w w w. j a v a 2 s . c o m constraints = new ArrayList<>(); setSizeFull(); // HACK: use our own border since the one from chameleon does not really work addStyleName(ValoTheme.PANEL_WELL); //addStyleName("border-layout"); prepareEdgeDock = false; vLayout = new VerticalLayout(); setContent(vLayout); vLayout.setWidth("100%"); vLayout.setHeight("-1px"); vLayout.setMargin(false); vLayout.setSpacing(true); toolbar = new HorizontalLayout(); toolbar.addStyleName("toolbar"); toolbar.setWidth("100%"); toolbar.setHeight("-1px"); toolbar.setMargin(false); toolbar.setSpacing(false); vLayout.addComponent(toolbar); btMove = new Button(); btMove.setWidth("100%"); btMove.setIcon(FontAwesome.ARROWS); btMove.setDescription("<strong>Move node</strong><br />Click, hold and move mouse to move the node."); btMove.addStyleName(ValoTheme.BUTTON_SMALL); btMove.addStyleName("drag-source-enabled"); toolbar.addComponent(btMove); btEdge = new Button("Edge"); btEdge.setIcon(FontAwesome.EXTERNAL_LINK); btEdge.addClickListener((Button.ClickListener) this); btEdge.addStyleName(ValoTheme.BUTTON_SMALL); //btEdge.addStyleName(ChameleonTheme.BUTTON_LINK); btEdge.setDescription("<strong>Add Edge</strong><br />" + "To create a new edge between " + "two nodes click this button first. " + "Then define a destination node by clicking its \"Dock\" " + "button.<br>You can cancel the action by clicking this button " + "(\"Cancel\") again."); btEdge.setImmediate(true); toolbar.addComponent(btEdge); btAdd = new Button("Add"); btAdd.setIcon(FontAwesome.PLUS); btAdd.addStyleName(ValoTheme.BUTTON_SMALL); //btAdd.addStyleName(ChameleonTheme.BUTTON_LINK); btAdd.addClickListener((Button.ClickListener) this); btAdd.setDescription("<strong>Add Node Condition</strong><br />" + "Every condition will constraint the node described by this window. " + "Most conditions limit the node by defining which annotations and which " + "values of the annotation a node needs to have."); toolbar.addComponent(btAdd); btClear = new Button("Clear"); btClear.setIcon(FontAwesome.TRASH_O); btClear.addStyleName(ValoTheme.BUTTON_SMALL); //btClear.addStyleName(ChameleonTheme.BUTTON_LINK); btClear.addClickListener((Button.ClickListener) this); btClear.setDescription("<strong>Clear All Node Conditions</strong>"); toolbar.addComponent(btClear); btClose = new Button(); btClose.setIcon(FontAwesome.TIMES_CIRCLE); btClose.setDescription("<strong>Close</strong><br />Close this node description window"); btClose.addStyleName(ValoTheme.BUTTON_SMALL); btClose.addClickListener((Button.ClickListener) this); toolbar.addComponent(btClose); toolbar.setComponentAlignment(btMove, Alignment.TOP_LEFT); toolbar.setExpandRatio(btMove, 1.0f); toolbar.setComponentAlignment(btEdge, Alignment.TOP_CENTER); toolbar.setComponentAlignment(btAdd, Alignment.TOP_CENTER); toolbar.setComponentAlignment(btClear, Alignment.TOP_CENTER); toolbar.setComponentAlignment(btClose, Alignment.TOP_RIGHT); }
From source file:com.cavisson.gui.dashboard.components.controls.CommonParts.java
License:Apache License
Panel notifications() { Panel p = new Panel("Notifications"); VerticalLayout content = new VerticalLayout() { Notification notification = new Notification(""); TextField title = new TextField("Title"); TextArea description = new TextArea("Description"); MenuBar style = new MenuBar(); MenuBar type = new MenuBar(); String typeString = ""; String styleString = ""; TextField delay = new TextField(); {/*from w w w.j av a 2s.c om*/ setSpacing(true); setMargin(true); title.setInputPrompt("Title for the notification"); title.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(final ValueChangeEvent event) { if (title.getValue() == null || title.getValue().length() == 0) { notification.setCaption(null); } else { notification.setCaption(title.getValue()); } } }); title.setValue("Notification Title"); title.setWidth("100%"); addComponent(title); description.setInputPrompt("Description for the notification"); description.addStyleName("small"); description.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(final ValueChangeEvent event) { if (description.getValue() == null || description.getValue().length() == 0) { notification.setDescription(null); } else { notification.setDescription(description.getValue()); } } }); description.setValue( "A more informative message about what has happened. Nihil hic munitissimus habendi senatus locus, nihil horum? Inmensae subtilitatis, obscuris et malesuada fames. Hi omnes lingua, institutis, legibus inter se differunt."); description.setWidth("100%"); addComponent(description); Command typeCommand = new Command() { @Override public void menuSelected(final MenuItem selectedItem) { if (selectedItem.getText().equals("Humanized")) { typeString = ""; notification.setStyleName(styleString.trim()); } else { typeString = selectedItem.getText().toLowerCase(); notification.setStyleName((typeString + " " + styleString.trim()).trim()); } for (MenuItem item : type.getItems()) { item.setChecked(false); } selectedItem.setChecked(true); } }; type.setCaption("Type"); MenuItem humanized = type.addItem("Humanized", typeCommand); humanized.setCheckable(true); humanized.setChecked(true); type.addItem("Tray", typeCommand).setCheckable(true); type.addItem("Warning", typeCommand).setCheckable(true); type.addItem("Error", typeCommand).setCheckable(true); type.addItem("System", typeCommand).setCheckable(true); addComponent(type); type.addStyleName("small"); Command styleCommand = new Command() { @Override public void menuSelected(final MenuItem selectedItem) { styleString = ""; for (MenuItem item : style.getItems()) { if (item.isChecked()) { styleString += " " + item.getText().toLowerCase(); } } if (styleString.trim().length() > 0) { notification.setStyleName((typeString + " " + styleString.trim()).trim()); } else if (typeString.length() > 0) { notification.setStyleName(typeString.trim()); } else { notification.setStyleName(null); } } }; style.setCaption("Additional style"); style.addItem("Dark", styleCommand).setCheckable(true); style.addItem("Success", styleCommand).setCheckable(true); style.addItem("Failure", styleCommand).setCheckable(true); style.addItem("Bar", styleCommand).setCheckable(true); style.addItem("Small", styleCommand).setCheckable(true); style.addItem("Closable", styleCommand).setCheckable(true); addComponent(style); style.addStyleName("small"); CssLayout group = new CssLayout(); group.setCaption("Fade delay"); group.addStyleName("v-component-group"); addComponent(group); delay.setInputPrompt("Infinite"); delay.addStyleName("align-right"); delay.addStyleName("small"); delay.setWidth("7em"); delay.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(final ValueChangeEvent event) { try { notification.setDelayMsec(Integer.parseInt(delay.getValue())); } catch (Exception e) { notification.setDelayMsec(-1); delay.setValue(""); } } }); delay.setValue("1000"); group.addComponent(delay); Button clear = new Button(null, new ClickListener() { @Override public void buttonClick(final ClickEvent event) { delay.setValue(""); } }); clear.setIcon(FontAwesome.TIMES_CIRCLE); clear.addStyleName("last"); clear.addStyleName("small"); clear.addStyleName("icon-only"); group.addComponent(clear); group.addComponent(new Label(" msec", ContentMode.HTML)); GridLayout grid = new GridLayout(3, 3); grid.setCaption("Show in position"); addComponent(grid); grid.setSpacing(true); Button pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.TOP_LEFT); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.TOP_CENTER); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.TOP_RIGHT); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.MIDDLE_LEFT); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.MIDDLE_CENTER); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.MIDDLE_RIGHT); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.BOTTOM_LEFT); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.BOTTOM_CENTER); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); pos = new Button("", new ClickListener() { @Override public void buttonClick(final ClickEvent event) { notification.setPosition(Position.BOTTOM_RIGHT); notification.show(Page.getCurrent()); } }); pos.addStyleName("small"); grid.addComponent(pos); } }; p.setContent(content); return p; }
From source file:com.hybridbpm.ui.component.development.FieldForm.java
License:Apache License
private void prepareComponents() { className.setCaption("Data type"); className.setContainerDataSource(getClassesContainer()); className.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY); className.setItemCaptionPropertyId(NAME); className.setWidth(100, Unit.PERCENTAGE); className.addValueChangeListener(new ClassChangeListener()); name.setCaption("Name"); name.setWidth(100, Unit.PERCENTAGE); name.setNullRepresentation(""); name.setRequired(true);//from ww w. j av a 2 s . co m name.setImmediate(true); name.addValueChangeListener(new NameChangeListener()); description.setCaption("Description"); description.setWidth(100, Unit.PERCENTAGE); description.setNullRepresentation(""); defaultValue.setCaption("Default Value"); defaultValue.setWidth(100, Unit.PERCENTAGE); defaultValue.setNullRepresentation(""); collection.setCaption("Collection"); collection.setContainerDataSource(getCollectionContainer()); collection.setNewItemsAllowed(false); collection.setNullSelectionAllowed(false); collection.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY); collection.setItemCaptionPropertyId(NAME); collection.setWidth(100, Unit.PERCENTAGE); editor.setCaption("Editor"); editor.setContainerDataSource(getEditorContainer()); editor.setNewItemsAllowed(false); editor.setNullSelectionAllowed(false); editor.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY); editor.setItemCaptionPropertyId(NAME); editor.setWidth(100, Unit.PERCENTAGE); editor.setVisible(!Objects.equals(classListType, CLASS_LIST_TYPE.COMPLEX_DATA)); btnShowMore.setHeight(100, Unit.PERCENTAGE); btnShowMore.setIcon(FontAwesome.PLUS_SQUARE_O); btnShowMore.setDescription("Show more details"); btnShowMore.addStyleName(ValoTheme.BUTTON_LINK); btnRemove.setHeight(100, Unit.PERCENTAGE); btnRemove.setIcon(FontAwesome.TIMES_CIRCLE); btnRemove.addStyleName(ValoTheme.BUTTON_LINK); btnUp.setHeight(100, Unit.PERCENTAGE); btnUp.setIcon(FontAwesome.ARROW_CIRCLE_UP); btnUp.addStyleName(ValoTheme.BUTTON_LINK); btnDown.setHeight(100, Unit.PERCENTAGE); btnDown.setIcon(FontAwesome.ARROW_CIRCLE_DOWN); btnDown.addStyleName(ValoTheme.BUTTON_LINK); }
From source file:com.hybridbpm.ui.component.development.FileForm.java
License:Apache License
private void prepareComponents() { name.setCaption("Name"); name.setWidth(100, Unit.PERCENTAGE); name.setNullRepresentation(""); name.setRequired(true);/*from w w w . ja va2 s . c o m*/ name.setImmediate(true); name.addValueChangeListener(new NameChangeListener()); description.setCaption("Description"); description.setWidth(100, Unit.PERCENTAGE); description.setNullRepresentation(""); multiple.setCaption("Multiple"); multiple.setWidth(100, Unit.PERCENTAGE); btnRemove.setHeight(100, Unit.PERCENTAGE); btnRemove.setIcon(FontAwesome.TIMES_CIRCLE); btnRemove.addStyleName(ValoTheme.BUTTON_LINK); btnUp.setHeight(100, Unit.PERCENTAGE); btnUp.setIcon(FontAwesome.ARROW_CIRCLE_UP); btnUp.addStyleName(ValoTheme.BUTTON_LINK); btnDown.setHeight(100, Unit.PERCENTAGE); btnDown.setIcon(FontAwesome.ARROW_CIRCLE_DOWN); btnDown.addStyleName(ValoTheme.BUTTON_LINK); }
From source file:com.hybridbpm.ui.component.DocumentField.java
License:Apache License
public DocumentField() { form.setSpacing(true);/*from ww w. j a v a 2 s . c om*/ form.addStyleName("file-field"); btnDownload.addStyleName(ValoTheme.BUTTON_LINK); btnRemove.addStyleName(ValoTheme.BUTTON_LINK); btnRemove.setIcon(FontAwesome.TIMES_CIRCLE); fileUpload.setImmediate(true); fileUpload.addSucceededListener(imageUploader); checkVisibility(); }
From source file:com.hybridbpm.ui.component.TranslatedFieldValue.java
License:Apache License
public TranslatedFieldValue(Locale locale, String value) { Design.read(this); for (Locale l : Locale.getAvailableLocales()) { Item item = localeComboBox.addItem(l); localeComboBox.setItemCaptionMode(AbstractSelect.ItemCaptionMode.EXPLICIT); localeComboBox.setItemCaption(l, l.getDisplayName()); }/* w w w . j a va 2 s . com*/ valueField.setValue(value); localeComboBox.setValue(locale); btnDelete.setIcon(FontAwesome.TIMES_CIRCLE); btnDelete.setVisible(!Locale.US.equals(locale)); btnDelete.addClickListener(this); localeComboBox.setEnabled(!Locale.US.equals(locale)); }
From source file:com.hybridbpm.ui.view.DashboardView.java
License:Apache License
public DashboardView(ViewDefinition vd) { this.viewDefinition = HybridbpmUI.getDashboardAPI().getViewDefinitionById(vd.getId().toString()); Design.read(this); Responsive.makeResponsive(this); btnAdd.addClickListener(this); btnAdd.setIcon(FontAwesome.PLUS_CIRCLE); btnAdd.setCaption("Add tab"); btnEdit.addClickListener(this); btnEdit.setIcon(FontAwesome.EDIT);//from ww w .j a va 2 s .c om btnEdit.setCaption("Edit view"); btnDelete.addClickListener(this); btnDelete.setIcon(FontAwesome.TIMES_CIRCLE); btnDelete.setCaption("Delete view"); createTabs(); checkDeveloperMode(); tabSheet.addSelectedTabChangeListener(this); tabSheet.setCloseHandler(this); }
From source file:de.fatalix.bookery.view.admin.AppUserCard.java
License:Open Source License
private HorizontalLayout createHeader() { captionLabel = new Label("some.user"); Button deleteUser = new Button(null, new Button.ClickListener() { @Override/* w w w. ja v a2s .c o m*/ public void buttonClick(Button.ClickEvent event) { presenter.deleteUser(appUser); for (Listener listener : listeners) { listener.userDeleted(AppUserCard.this); } } }); deleteUser.setIcon(FontAwesome.TIMES_CIRCLE); deleteUser.addStyleName("borderless"); deleteUser.addStyleName("icon-only"); HorizontalLayout captionLayout = new HorizontalLayout(); captionLayout.addStyleName("v-panel-caption"); captionLayout.setWidth("100%"); captionLayout.addComponents(captionLabel, deleteUser); captionLayout.setExpandRatio(captionLabel, 1); return captionLayout; }