Example usage for com.vaadin.ui VerticalSplitPanel setSizeFull

List of usage examples for com.vaadin.ui VerticalSplitPanel setSizeFull

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalSplitPanel setSizeFull.

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:com.bsb.common.vaadin.embed.component.ComponentWrapper.java

License:Apache License

/**
 * Wraps a {@link Layout} into a Vaadin application.
 *
 * @param layout the layout to wrap//  w ww.  j  a  v a  2  s .c o m
 * @return an application displaying that layout
 */
public Application wrapLayout(Layout layout) {
    // TODO: add a header to switch the style, etc
    // TODO: add bookmark to set the style
    final Window mainWindow = new Window("Dev");

    if (server.getConfig().isDevelopmentHeader()) {
        final VerticalSplitPanel mainLayout = new VerticalSplitPanel();
        mainLayout.setSizeFull();
        mainLayout.setSplitPosition(SPLIT_POSITION, Sizeable.UNITS_PIXELS);
        mainLayout.setLocked(true);

        final DevApplicationHeader header = new DevApplicationHeader(server);
        header.setSpacing(true);
        mainLayout.setFirstComponent(header);

        mainLayout.setSecondComponent(layout);

        mainWindow.setContent(mainLayout);
    } else {
        mainWindow.setContent(layout);
    }

    return new DevApplication(server, mainWindow);
}

From source file:com.cavisson.gui.dashboard.components.calender.BeanItemContainerTestUI.java

License:Apache License

@SuppressWarnings("deprecation")
@Override//  w w w  .  j a  va 2  s .c o  m
protected void init(VaadinRequest request) {
    VerticalSplitPanel content = new VerticalSplitPanel();
    content.setSizeFull();
    setContent(content);

    // Create Calendar
    calendar = new Calendar();
    calendar.setImmediate(true);
    calendar.setSizeFull();
    calendar.setContainerDataSource(events);
    calendar.setStartDate(new Date(100, 1, 1));
    calendar.setEndDate(new Date(100, 2, 1));

    content.addComponent(calendar);

    // Add event table connected to same data source
    table = createTable();
    table.setContainerDataSource(events);
    table.setVisibleColumns(new Object[] { "caption", "description", "start", "end" });
    content.addComponent(table);
}

From source file:com.github.mjvesa.herd.HerdIDE.java

License:Apache License

private VerticalSplitPanel constructEditorAndLayoutPanel() {
    VerticalSplitPanel vsp = new VerticalSplitPanel();
    vsp.setSizeFull();
    vsp.addComponent(constructEditorAndLayout());
    vsp.setSplitPosition(80);//from  w ww  .  j av a  2s  . c o m
    console = createConsole();
    vsp.addComponent(console);
    return vsp;
}

From source file:com.mcparland.john.DragAndDropPanel.java

License:Apache License

/**
 * Create a DragAndDropPanel.//from  w ww .  j  a  v  a 2  s.c o  m
 * 
 */
public DragAndDropPanel() {
    super();
    final VerticalSplitPanel leftSplitPanel = new VerticalSplitPanel();
    leftSplitPanel.setSizeFull();
    leftSplitPanel.setFirstComponent(createLayout(new HorizontalLayout()));
    leftSplitPanel.setSecondComponent(new VerticalLayout());

    final VerticalSplitPanel rightSplitPanel = new VerticalSplitPanel();
    rightSplitPanel.setSizeFull();
    rightSplitPanel.setFirstComponent(createLayout(new GridLayout(3, 3)));
    rightSplitPanel.setSecondComponent(new InlineCssLayout());

    setFirstComponent(leftSplitPanel);
    setSecondComponent(rightSplitPanel);
    setSizeFull();
}

From source file:com.openhris.payroll.PayrollAdvancesLedgerUI.java

public PayrollAdvancesLedgerUI(int branchId) {
    this.branchId = branchId;

    setSpacing(false);/*w ww  . ja  v  a2  s. c o m*/
    setMargin(false);
    setWidth("100%");
    setHeight("100%");
    setImmediate(true);

    final VerticalSplitPanel vsplit = new VerticalSplitPanel();

    vsplit.setImmediate(true);
    vsplit.setMargin(false);
    vsplit.setSizeFull();
    vsplit.setLocked(true);

    vsplit.setSplitPosition(90, Sizeable.UNITS_PIXELS);

    GridLayout glayout = new GridLayout(2, 1);
    glayout.setWidth("60%");
    glayout.setMargin(true);
    glayout.setSpacing(true);

    employeeComboBox(getBranchId());
    glayout.addComponent(employee, 0, 0);

    Button button = new Button();
    button.setWidth("100%");
    button.setCaption("Generate Ledger");
    button.setEnabled(UserAccessControl.isPayroll());
    button.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            System.out.println("employeeId: " + employee.getValue());
        }
    });

    glayout.addComponent(button, 1, 0);
    glayout.setComponentAlignment(button, Alignment.BOTTOM_LEFT);

    vsplit.setFirstComponent(glayout);
    addComponent(vsplit);

    setExpandRatio(vsplit, 1.0f);
}

From source file:fi.jasoft.feedreader.ui.ReaderUI.java

License:Apache License

@Override
protected void init(WrappedRequest request) {

    // Create data tables
    feedTable = createFeedsTable();// w  w  w.j  a  va 2 s . c  o m
    entryTable = createEntriesTable();

    // Create the main horizontal split panel
    HorizontalSplitPanel content = new HorizontalSplitPanel();
    content.setStyleName(Reindeer.SPLITPANEL_SMALL);
    content.setSizeFull();
    setContent(content);

    // Create the content of the left part of the main split panel
    VerticalLayout vl = new VerticalLayout();
    vl.setSizeFull();
    vl.addComponent(feedTable);

    Button addFeedBtn = new Button("Add RSS/Atom feed", new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            addFeed();
        }
    });
    addFeedBtn.setWidth("100%");
    vl.addComponent(addFeedBtn);
    vl.setExpandRatio(feedTable, 1);

    content.setFirstComponent(vl);
    content.setSplitPosition(30);

    // Create and set the content of the right part of the main split panel
    VerticalSplitPanel rightPane = new VerticalSplitPanel();
    rightPane.setStyleName(Reindeer.SPLITPANEL_SMALL);
    rightPane.setSizeFull();

    rightPane.addComponent(entryTable);

    entryPanel.setSizeFull();
    rightPane.addComponent(entryPanel);

    content.addComponent(rightPane);
    rightPane.setSplitPosition(30);

    if (feeds.size() > 0) {
        feedTable.setValue(feeds.getItemIds().iterator().next());
    }
}

From source file:net.sourceforge.javydreamercsw.validation.manager.web.ValidationManagerUI.java

License:Apache License

private void displayTraceMatrix(Project project) {
    VMWindow w = new VMWindow(TRANSLATOR.translate("trace.matrix"));
    TraceMatrix tm = new TraceMatrix(project);
    VerticalSplitPanel vs = new VerticalSplitPanel();
    vs.setSplitPosition(10, Unit.PERCENTAGE);
    vs.setFirstComponent(tm.getMenu());//from   w w  w .  j  a va 2 s.c  o m
    vs.setSecondComponent(tm);
    vs.setSizeFull();
    w.setContent(vs);
    w.setSizeFull();
    addWindow(w);
}

From source file:org.jumpmind.metl.ui.views.design.EditFlowPanel.java

License:Open Source License

public EditFlowPanel(ApplicationContext context, String flowId, DesignNavigator designNavigator,
        TabbedPanel tabs) {/*from  www  .  j a  v a 2s  .  c  o  m*/

    this.configurationService = context.getConfigurationService();
    this.flow = configurationService.findFlow(flowId);
    this.readOnly = context.isReadOnly(configurationService.findProjectVersion(flow.getProjectVersionId()),
            Privilege.DESIGN);
    this.context = context;
    this.tabs = tabs;
    this.designNavigator = designNavigator;

    this.propertySheet = new PropertySheet(context, tabs, readOnly);
    this.propertySheet.setListener((components) -> {
        List<FlowStep> steps = new ArrayList<FlowStep>();
        for (Component c : components) {
            steps.add(EditFlowPanel.this.flow.findFlowStepWithComponentId(c.getId()));
        }
        refreshStepOnDiagram(steps);
    });
    this.propertySheet.setCaption("Property Sheet");

    this.componentPalette = new EditFlowPalette(this, context, flow.getProjectVersionId());

    addComponent(componentPalette);

    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setSizeFull();

    rightLayout.addComponent(buildButtonBar());

    VerticalSplitPanel splitPanel = new VerticalSplitPanel();
    splitPanel.setSizeFull();
    splitPanel.setSplitPosition(50, Unit.PERCENTAGE);

    diagramLayout = new VerticalLayout();
    diagramLayout.setWidth(10000, Unit.PIXELS);
    diagramLayout.setHeight(10000, Unit.PIXELS);

    DragAndDropWrapper wrapper = new DragAndDropWrapper(diagramLayout);
    wrapper.setSizeUndefined();
    wrapper.setDropHandler(new DropHandler());

    flowPanel = new Panel();
    flowPanel.setSizeFull();
    flowPanel.addStyleName(ValoTheme.PANEL_WELL);
    flowPanel.setContent(wrapper);

    splitPanel.addComponent(flowPanel);
    splitPanel.addComponent(propertySheet);

    rightLayout.addComponent(splitPanel);
    rightLayout.setExpandRatio(splitPanel, 1);

    addComponent(rightLayout);
    setExpandRatio(rightLayout, 1);

    if (flow.getFlowSteps().size() > 0) {
        selected = new ArrayList<AbstractObject>();
        selected.add(flow.getFlowSteps().get(0));
        propertySheet.setSource(selected);
    }

    redrawFlow();
}

From source file:org.openeos.services.ui.vaadin.internal.VaadinWindowImpl.java

License:Apache License

@Override
protected ComponentContainer createMainContainer() {
    Panel mainPanel = new Panel();
    mainPanel.setSizeFull();/*from   w  w w  .jav a 2 s.  c  o m*/
    if (!multipleLevels) {
        firstContainer = mainPanel;
    } else {
        VerticalSplitPanel vSplit = new VerticalSplitPanel();
        vSplit.setSizeFull();
        mainPanel.setContent(vSplit);
        firstContainer = new Panel();
        firstContainer.setSizeFull();
        vSplit.setFirstComponent(firstContainer);
        secondContainer = new Panel();
        secondContainer.setSizeFull();
        vSplit.setSecondComponent(secondContainer);
        vSplit.setLocked(false);
    }
    return mainPanel;
}

From source file:org.opennms.features.topology.app.internal.TopologyUI.java

License:Open Source License

/**
 * Updates the bottom widget area with the registered widgets
 * //from  w w  w.java  2s . c  o m
 * Any widget with the service property of 'location=bottom' are
 * included.
 * 
 * @param widgetManager The WidgetManager.
 */
private void updateWidgetView(WidgetManager widgetManager) {
    synchronized (m_layout) {
        m_layout.removeAllComponents();
        if (widgetManager.widgetCount() == 0) {
            m_layout.addComponent(m_treeMapSplitPanel);
        } else {
            VerticalSplitPanel bottomLayoutBar = new VerticalSplitPanel();
            bottomLayoutBar.setFirstComponent(m_treeMapSplitPanel);
            // Split the screen 70% top, 30% bottom
            bottomLayoutBar.setSplitPosition(70, Unit.PERCENTAGE);
            bottomLayoutBar.setSizeFull();
            bottomLayoutBar.setSecondComponent(getTabSheet(widgetManager, this));
            m_layout.addComponent(bottomLayoutBar);
            updateTabVisibility();
        }
        m_layout.markAsDirty();
    }
    m_layout.markAsDirty();
}