List of usage examples for com.vaadin.ui.themes ValoTheme TEXTFIELD_LARGE
String TEXTFIELD_LARGE
To view the source code for com.vaadin.ui.themes ValoTheme TEXTFIELD_LARGE.
Click Source Link
From source file:annis.gui.ShareQueryReferenceWindow.java
License:Apache License
public ShareQueryReferenceWindow(DisplayedResultQuery query, boolean shorten) { super("Query reference link"); VerticalLayout wLayout = new VerticalLayout(); setContent(wLayout);/*from w w w. j av a2 s .c o m*/ wLayout.setSizeFull(); wLayout.setMargin(true); Label lblInfo = new Label( "<p style=\"font-size: 18px\" >" + "<strong>Share your query:</strong> " + "1. Copy the generated link 2. Share this link with your peers. " + "</p>", ContentMode.HTML); wLayout.addComponent(lblInfo); wLayout.setExpandRatio(lblInfo, 0.0f); String shortURL = "ERROR"; if (query != null) { URI url = Helper.generateCitation(query.getQuery(), query.getCorpora(), query.getLeftContext(), query.getRightContext(), query.getSegmentation(), query.getBaseText(), query.getOffset(), query.getLimit(), query.getOrder(), query.getSelectedMatches()); if (shorten) { shortURL = Helper.shortenURL(url); } else { shortURL = url.toASCIIString(); } } TextArea txtCitation = new TextArea(); txtCitation.setWidth("100%"); txtCitation.setHeight("100%"); txtCitation.addStyleName(ValoTheme.TEXTFIELD_LARGE); txtCitation.addStyleName("shared-text"); txtCitation.setValue(shortURL); txtCitation.setWordwrap(true); txtCitation.setReadOnly(true); wLayout.addComponent(txtCitation); Button btClose = new Button("Close"); btClose.addClickListener((Button.ClickListener) this); btClose.setSizeUndefined(); wLayout.addComponent(btClose); wLayout.setExpandRatio(txtCitation, 1.0f); wLayout.setComponentAlignment(btClose, Alignment.BOTTOM_CENTER); setWidth("400px"); setHeight("300px"); }
From source file:annis.gui.ShareSingleMatchGenerator.java
License:Apache License
public ShareSingleMatchGenerator(List<ResolverEntry> visualizers, Match match, PagedResultQuery query, String segmentation, PluginSystem ps) { this.match = match; this.query = query; this.segmentation = segmentation; this.ps = ps; setResizeLazy(true);//from w ww .j ava2 s. co m directURL = new ObjectProperty<>(""); iframeCode = new ObjectProperty<>(""); visContainer = new BeanItemContainer<>(ResolverEntry.class); visContainer.addAll(visualizers); txtDirectURL = new TextArea(directURL); txtDirectURL.setCaption("Link for publications"); txtDirectURL.setWidth("100%"); txtDirectURL.setHeight("-1px"); txtDirectURL.addStyleName(ValoTheme.TEXTFIELD_LARGE); txtDirectURL.addStyleName("shared-text"); txtDirectURL.setWordwrap(true); txtDirectURL.setReadOnly(true); txtIFrameCode = new TextArea(iframeCode); txtIFrameCode.setCaption("Code for embedding visualization into web page"); txtIFrameCode.setWidth("100%"); txtIFrameCode.setHeight("-1px"); txtIFrameCode.addStyleName(ValoTheme.TEXTFIELD_LARGE); txtIFrameCode.addStyleName("shared-text"); txtIFrameCode.setWordwrap(true); txtIFrameCode.setReadOnly(true); preview = new BrowserFrame(); preview.setCaption("Preview"); preview.addStyleName("shared-text"); preview.setSizeFull(); generatedLinks = new VerticalLayout(txtDirectURL, txtIFrameCode, preview); generatedLinks.setComponentAlignment(txtDirectURL, Alignment.TOP_LEFT); generatedLinks.setComponentAlignment(txtIFrameCode, Alignment.TOP_LEFT); generatedLinks.setExpandRatio(preview, 1.0f); visSelector = new Grid(visContainer); visSelector.setCaption("Select visualization"); visSelector.setHeight("100%"); visSelector.setColumns("displayName"); visSelector.setSelectionMode(Grid.SelectionMode.SINGLE); visSelector.addSelectionListener(ShareSingleMatchGenerator.this); visSelector.select(visContainer.getIdByIndex(0)); visSelector.setWidth("300px"); visSelector.getColumn("displayName").setSortable(false); generatedLinks.setSizeFull(); Label infoText = new Label( "<p style=\"font-size: 18px\" >" + "<strong>Share your match:</strong> " + "1. Choose the visualization to share. 2. Copy the generated link or code. " + "3. Share this link with your peers or include the code in your website. " + "</p>", ContentMode.HTML); HorizontalLayout hLayout = new HorizontalLayout(visSelector, generatedLinks); hLayout.setSizeFull(); hLayout.setSpacing(true); hLayout.setExpandRatio(generatedLinks, 1.0f); Button btClose = new Button("Close"); btClose.setSizeUndefined(); btClose.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { getUI().removeWindow(ShareSingleMatchGenerator.this); } }); layout = new VerticalLayout(infoText, hLayout, btClose); layout.setSizeFull(); layout.setExpandRatio(hLayout, 1.0f); layout.setComponentAlignment(btClose, Alignment.MIDDLE_CENTER); setContent(layout); }
From source file:de.fatalix.bookery.AppHeader.java
License:Open Source License
private MHorizontalLayout createSearchBar() { Label header = new Label("Bookery"); header.addStyleName(ValoTheme.LABEL_BOLD); header.setSizeUndefined();/* w w w . j ava2s . co m*/ header.addStyleName(ValoTheme.LABEL_H3); searchText = new TextField(); searchText.setIcon(FontAwesome.SEARCH); searchText.addStyleName(ValoTheme.TEXTFIELD_LARGE); searchText.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); searchText.setWidth(100, Unit.PERCENTAGE); searchText.setInputPrompt("hier einfach suchen.."); Button searchButton = new Button("such!", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { Navigator navigator = ((App) UI.getCurrent()).getNavigator(); if (navigator.getState().contains("search")) { navigator.navigateTo(navigator.getState()); } else { navigator.navigateTo(SearchView.id); } } }); searchButton.addStyleName(ValoTheme.BUTTON_LARGE); searchText.addShortcutListener(new Button.ClickShortcut(searchButton, ShortcutAction.KeyCode.ENTER)); MHorizontalLayout layout = new MHorizontalLayout(header, searchText, searchButton); layout.setWidth(100, Unit.PERCENTAGE); layout.setExpandRatio(searchText, 1.0f); return layout; }
From source file:fr.ortec.dsi.pointage.presentation.ihm.view.TextFields.java
License:Apache License
public TextFields() { setMargin(true);//from ww w . ja v a 2 s .com setSpacing(true); Label h1 = new Label("Text Fields"); h1.addStyleName(ValoTheme.LABEL_H1); addComponent(h1); HorizontalLayout row = new HorizontalLayout(); row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING); addComponent(row); TextField tf = new TextField("Normal"); tf.setIcon(testIcon.get()); row.addComponent(tf); tf = new TextField("Custom color"); tf.addStyleName("color1"); row.addComponent(tf); tf = new TextField("User Color"); tf.addStyleName("color2"); row.addComponent(tf); tf = new TextField("Themed"); tf.addStyleName("color3"); row.addComponent(tf); tf = new TextField("Error"); tf.setValue("Somethings wrong"); tf.setComponentError(new UserError("Fix it, now!")); row.addComponent(tf); tf = new TextField("Error, borderless"); tf.setValue("Somethings wrong"); tf.setComponentError(new UserError("Fix it, now!")); tf.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS); row.addComponent(tf); tf = new TextField("Small"); tf.setValue("Field value"); tf.addStyleName(ValoTheme.TEXTFIELD_SMALL); row.addComponent(tf); tf = new TextField("Large"); tf.setValue("Field value"); tf.addStyleName(ValoTheme.TEXTFIELD_LARGE); tf.setIcon(testIcon.get(true)); row.addComponent(tf); tf = new TextField(); tf.setValue("Font, no caption"); tf.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); tf.setIcon(testIcon.get()); row.addComponent(tf); tf = new TextField(); tf.setValue("Image, no caption"); tf.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); tf.setIcon(testIcon.get(true, 16)); row.addComponent(tf); CssLayout group = new CssLayout(); group.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP); row.addComponent(group); Button button = new Button("Do It"); // button.addStyleName(ValoTheme.BUTTON_PRIMARY); group.addComponent(button); tf = new TextField("Right-aligned"); tf.setValue("1,234"); tf.addStyleName(ValoTheme.TEXTFIELD_ALIGN_RIGHT); row.addComponent(tf); tf = new TextField("Tiny"); tf.setValue("Field value"); tf.addStyleName(ValoTheme.TEXTFIELD_TINY); row.addComponent(tf); tf = new TextField("Huge"); tf.setValue("Field value"); tf.addStyleName(ValoTheme.TEXTFIELD_HUGE); row.addComponent(tf); h1 = new Label("Text Areas"); h1.addStyleName(ValoTheme.LABEL_H1); addComponent(h1); row = new HorizontalLayout(); row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING); addComponent(row); RichTextArea rta = new RichTextArea(); rta.setValue("<b>Some</b> <i>rich</i> content"); row.addComponent(rta); rta = new RichTextArea("Read-only"); rta.setValue("<b>Some</b> <i>rich</i> content"); rta.setReadOnly(true); row.addComponent(rta); }