List of usage examples for com.vaadin.ui.themes ValoTheme PANEL_SCROLL_INDICATOR
String PANEL_SCROLL_INDICATOR
To view the source code for com.vaadin.ui.themes ValoTheme PANEL_SCROLL_INDICATOR.
Click Source Link
From source file:org.jumpmind.metl.ui.views.deploy.FlowSelectWindow.java
License:Open Source License
@SuppressWarnings({ "serial" })
public FlowSelectWindow(ApplicationContext context, String caption, String introText,
boolean includeTestFlows) {
super(caption);
this.context = context;
tree.setMultiSelect(true);//from w ww .java2 s . co m
tree.addContainerProperty("name", String.class, "");
tree.setItemCaptionPropertyId("name");
tree.setItemCaptionMode(ItemCaptionMode.PROPERTY);
tree.addExpandListener(new ExpandListener() {
public void nodeExpand(ExpandEvent event) {
Object itemId = event.getItemId();
if (itemId instanceof ProjectVersion) {
addFlowsToVersion((ProjectVersion) itemId, includeTestFlows);
}
}
});
addProjects();
setWidth(600.0f, Unit.PIXELS);
setHeight(600.0f, Unit.PIXELS);
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.setSizeFull();
layout.addComponent(new Label(introText));
Panel scrollable = new Panel();
scrollable.addStyleName(ValoTheme.PANEL_BORDERLESS);
scrollable.addStyleName(ValoTheme.PANEL_SCROLL_INDICATOR);
scrollable.setSizeFull();
scrollable.setContent(tree);
layout.addComponent(scrollable);
layout.setExpandRatio(scrollable, 1.0f);
addComponent(layout, 1);
Button cancelButton = new Button("Cancel");
Button selectButton = new Button("Select");
addComponent(buildButtonFooter(cancelButton, selectButton));
cancelButton.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
close();
}
});
selectButton.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
Collection<FlowName> flowCollection = getFlowCollection(includeTestFlows);
listener.selected(flowCollection);
close();
}
});
}
From source file:org.jumpmind.metl.ui.views.design.TableColumnSelectWindow.java
License:Open Source License
public TableColumnSelectWindow(ApplicationContext context, Model model) { super("Import from Database into Model"); this.context = context; this.model = model; setWidth(600.0f, Unit.PIXELS);//ww w. j a v a2 s.com setHeight(600.0f, Unit.PIXELS); VerticalLayout layout = new VerticalLayout(); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(new Label("Select tables and columns to import into the model.")); Panel scrollable = new Panel(); scrollable.addStyleName(ValoTheme.PANEL_BORDERLESS); scrollable.addStyleName(ValoTheme.PANEL_SCROLL_INDICATOR); scrollable.setSizeFull(); provider = new DbProvider(context); dbTree = new DbTree(provider, new DefaultSettingsProvider(context.getConfigDir())); scrollable.setContent(dbTree); layout.addComponent(scrollable); layout.setExpandRatio(scrollable, 1.0f); addComponent(layout, 1); Button refreshButton = new Button("Refresh"); Button cancelButton = new Button("Cancel"); Button selectButton = new Button("Import"); addComponent(buildButtonFooter(refreshButton, cancelButton, selectButton)); cancelButton.addClickListener(event -> close()); selectButton.addClickListener(event -> select()); refreshButton.addClickListener(event -> refresh()); }