List of usage examples for com.vaadin.server FontAwesome FLASH
FontAwesome FLASH
To view the source code for com.vaadin.server FontAwesome FLASH.
Click Source Link
From source file:org.jumpmind.metl.ui.mapping.EditMappingPanel.java
License:Open Source License
protected void buildUI() { if (!readOnly) { ButtonBar buttonBar = new ButtonBar(); addComponent(buttonBar);//from w w w. j a v a 2 s .c o m Button autoMapButton = buttonBar.addButton("Auto Map", FontAwesome.FLASH); removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O); removeButton.setEnabled(false); autoMapButton.addClickListener(new AutoMapListener()); removeButton.addClickListener(new RemoveListener()); } HorizontalLayout titleHeader = new HorizontalLayout(); titleHeader.setSpacing(true); titleHeader.setMargin(new MarginInfo(false, true, false, true)); titleHeader.setWidth(100f, Unit.PERCENTAGE); titleHeader.addComponent(new Label( "<b>Input Model:</b> " + (component.getInputModel() != null ? component.getInputModel().getName() : "?"), ContentMode.HTML)); titleHeader.addComponent(new Label( "<b>Output Model:</b> " + (component.getOutputModel() != null ? component.getOutputModel().getName() : "?"), ContentMode.HTML)); addComponent(titleHeader); HorizontalLayout filterHeader = new HorizontalLayout(); filterHeader.setSpacing(true); filterHeader.setMargin(new MarginInfo(true, true, true, true)); filterHeader.setWidth(100f, Unit.PERCENTAGE); HorizontalLayout srcFilterHeader = new HorizontalLayout(); srcFilterHeader.setSpacing(true); srcFilterHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); filterHeader.addComponent(srcFilterHeader); HorizontalLayout dstFilterHeader = new HorizontalLayout(); dstFilterHeader.setSpacing(true); dstFilterHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); filterHeader.addComponent(dstFilterHeader); addComponent(filterHeader); srcTextFilter = new TextField(); srcTextFilter.setInputPrompt("Filter"); srcTextFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); srcTextFilter.setIcon(FontAwesome.SEARCH); srcTextFilter.setImmediate(true); srcTextFilter.setTextChangeEventMode(TextChangeEventMode.LAZY); srcTextFilter.setTextChangeTimeout(200); srcTextFilter.addTextChangeListener(new FilterInputTextListener()); srcFilterHeader.addComponent(srcTextFilter); srcMapFilter = new CheckBox("Mapped Only"); srcMapFilter.addValueChangeListener(new FilterSrcMapListener()); srcFilterHeader.addComponent(srcMapFilter); dstTextFilter = new TextField(); dstTextFilter.setInputPrompt("Filter"); dstTextFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); dstTextFilter.setIcon(FontAwesome.SEARCH); dstTextFilter.setImmediate(true); dstTextFilter.setTextChangeEventMode(TextChangeEventMode.LAZY); dstTextFilter.setTextChangeTimeout(200); dstTextFilter.addTextChangeListener(new FilterOutputTextListener()); dstFilterHeader.addComponent(dstTextFilter); dstMapFilter = new CheckBox("Mapped Only"); dstMapFilter.addValueChangeListener(new FilterDstMapListener()); dstFilterHeader.addComponent(dstMapFilter); Panel panel = new Panel(); VerticalLayout vlay = new VerticalLayout(); vlay.setSizeFull(); diagram = new MappingDiagram(context, component, readOnly); diagram.setSizeFull(); vlay.addComponent(diagram); panel.setContent(vlay); panel.setSizeFull(); addComponent(panel); setExpandRatio(panel, 1.0f); diagram.addListener(new EventListener()); }