Java 类com.vaadin.ui.VerticalSplitPanel 实例源码

项目:businesshorizon2    文件:ProcessViewImpl.java   
/**
 * Diese Methode setzt den Titel (im Browser-Fenster) zu "Business Horizon 2.1" und
 * erstellt das zugehoerige Vertikale Splitpanel, in dem oben die Navigation und
 * unten die anzuzeigende Maske eingefuegt werden koennen.
 * 
 * @author Julius Hacker, Mirko Göpfrich
 */
private void generateUi() {
    setCaption("Business Horizon 2.1");
    logger.debug("Ueberschrift fuer Browser erstellt");

    //Teilt das Fenster vertikal in zwei Bereiche auf und erstellt eine horizontale Trennlinie (nicht verstellbar).
    verticalSplitPanel = new VerticalSplitPanel();
    verticalSplitPanel.setSplitPosition(100, Sizeable.UNITS_PIXELS);
    verticalSplitPanel.setLocked(true);
    verticalSplitPanel.setStyleName("small");
    logger.debug("Neues Vertikales SplitPanel erstellt");

    // Setzt das vertikale Splitpanel (äußeres Panel) inkl innere Panels als Inhalt für das Fenster.
    setContent(verticalSplitPanel);
    logger.debug("Vertikales SplitPanel mit allen Elementen an das Hauptfenster übergeben");

}
项目:cuba    文件:WebSplitPanel.java   
protected void createComponentImpl() {
    if (orientation == SplitPanel.ORIENTATION_HORIZONTAL) {
        component = new CubaHorizontalSplitPanel() {
            @Override
            public void setSplitPosition(float pos, Unit unit, boolean reverse) {
                currentPosition = this.getSplitPosition();
                inverse = this.isSplitPositionReversed();

                super.setSplitPosition(pos, unit, reverse);
            }
        };
    } else {
        component = new VerticalSplitPanel() {
            @Override
            public void setSplitPosition(float pos, Unit unit, boolean reverse) {
                currentPosition = this.getSplitPosition();

                super.setSplitPosition(pos, unit, reverse);
            }
        };
    }

    component.addSplitPositionChangeListener(this::fireSplitPositionChangeListener);
}
项目:openeos    文件:VaadinWindowImpl.java   
@Override
protected ComponentContainer createMainContainer() {
    Panel mainPanel = new Panel();
    mainPanel.setSizeFull();
    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;
}
项目:opennmszh    文件:TopologyWidgetTestApplication.java   
/**
 * Updates the bottom widget area with the registered widgets
 * 
 * Any widget with the service property of 'location=bottom' are
 * included.
 * 
 * @param widgetManager
 */
private void updateWidgetView(WidgetManager widgetManager) {
    synchronized (m_layout) {
        m_layout.removeAllComponents();
        if(widgetManager.widgetCount() == 0) {
            m_layout.addComponent(m_treeMapSplitPanel, getBelowMenuPosition());
        } else {
            VerticalSplitPanel bottomLayoutBar = new VerticalSplitPanel();
            bottomLayoutBar.setFirstComponent(m_treeMapSplitPanel);
            // Split the screen 70% top, 30% bottom
            bottomLayoutBar.setSplitPosition(70, Sizeable.UNITS_PERCENTAGE);
            bottomLayoutBar.setSizeFull();
            bottomLayoutBar.setSecondComponent(getTabSheet(widgetManager, this));
            m_layout.addComponent(bottomLayoutBar, getBelowMenuPosition());
        }
        m_layout.requestRepaint();
    }
    if(m_contextMenu != null && m_contextMenu.getParent() == null) {
        getMainWindow().addComponent(m_contextMenu);
    }
}
项目:konekti    文件:MasterDetailLayout.java   
@AutoGenerated
private VerticalSplitPanel buildVerticalSplitPanelMasterDetail() {
    // common part: create layout
    verticalSplitPanelMasterDetail = new VerticalSplitPanel();
    verticalSplitPanelMasterDetail.setImmediate(false);
    verticalSplitPanelMasterDetail.setWidth("100.0%");
    verticalSplitPanelMasterDetail.setHeight("100.0%");
    verticalSplitPanelMasterDetail.setMargin(false);

    // topLayout
    topLayout = buildTopLayout();
    verticalSplitPanelMasterDetail.addComponent(topLayout);

    // bottonLayout
    bottonLayout = buildBottonLayout();
    verticalSplitPanelMasterDetail.addComponent(bottonLayout);

    return verticalSplitPanelMasterDetail;
}
项目:bambi-mvvm    文件:AddressBookView.java   
public AddressBookView() {
    VerticalSplitPanel splitPanel = new VerticalSplitPanel();
    VerticalLayout topLayout = new VerticalLayout();
    HorizontalLayout buttonPanel = new HorizontalLayout();
    buttonPanel.setSpacing(true);
    buttonPanel.setMargin(true);
    buttonPanel.addComponent(addButton);
    buttonPanel.addComponent(removeButton);
    topLayout.addComponent(buttonPanel);
    topLayout.addComponent(table);
    topLayout.setExpandRatio(table, 1.0f);
    topLayout.setSizeFull();
    table.setSizeFull();
    table.setSelectable(true);
    table.setMultiSelect(false);
    table.setImmediate(true);
    splitPanel.setFirstComponent(topLayout);
    splitPanel.setSecondComponent(form);
    splitPanel.setSplitPosition(60.0f, UNITS_PERCENTAGE);
    setCompositionRoot(splitPanel);
    setSizeFull();
}
项目:chipster    文件:ToolEditorUI.java   
@Override
protected void init(VaadinRequest request) {
    treeToolEditor = new TreeToolEditor(this);
    toolEditor = new ToolEditor(this);
    textEditor = new TextEditor(this);
    final Panel vLayout = new Panel();
    vSplitPanel = new VerticalSplitPanel();
    vSplitPanel.setSplitPosition(50, Unit.PERCENTAGE);
    vSplitPanel.setImmediate(true);
    vSplitPanel.setLocked(false);
    vSplitPanel.setWidth("100%");
    vLayout.setContent(vSplitPanel);
    setContent(vSplitPanel);
    VerticalLayout vvLayout = new VerticalLayout();
    vvLayout.setSizeFull();
    Label title = new Label("<h2><b>&nbsp;Tool Editor</b></h2>", ContentMode.HTML);

    vvLayout.addComponent(title);
    vvLayout.setComponentAlignment(title, Alignment.TOP_LEFT);
    HorizontalSplitPanel hSplitpPanel = new HorizontalSplitPanel();
    hSplitpPanel.setSizeFull();
    vvLayout.addComponent(hSplitpPanel);

    HorizontalLayout buttonPanel = getButtonPanel();
    vvLayout.addComponent(buttonPanel);
    vvLayout.setComponentAlignment(buttonPanel, Alignment.MIDDLE_CENTER);

    vvLayout.setExpandRatio(hSplitpPanel, 5);
    vvLayout.setComponentAlignment(hSplitpPanel, Alignment.TOP_LEFT);
    vvLayout.setMargin(false);
    vvLayout.setSpacing(false);
    hSplitpPanel.setFirstComponent(treeToolEditor);
    hSplitpPanel.setSecondComponent(toolEditor);
    vSplitPanel.setFirstComponent(vvLayout);
    vSplitPanel.setSecondComponent(textEditor);
    hSplitpPanel.setStyleName("topborder");
}
项目:businesshorizon2    文件:InitialLayout.java   
/**
     * Im Konstruktor wird das Layout erstellt.
     * 
     * @author Marco Glaser
     * 
     */
    public InitialLayout(){
        mainLayout.setSizeFull();
        mainLayout.setStyleName("mainLayout");
        leftLayout.setSizeFull();
        leftLayout.setStyleName("leftContainer");
        rightLayout.setSizeFull();
        bottomLayout.setSizeFull();
        bottomLeftLayout.setSizeFull();

        horizontalSplitPanel = new HorizontalSplitPanel();
        horizontalSplitPanel.setSplitPosition(30, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);
        horizontalSplitPanel.setLocked(true);
        horizontalSplitPanel.setStyleName("horizontalMain");
        verticalSplitPanel = new VerticalSplitPanel();
        verticalSplitPanel.setSplitPosition(15, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);
        verticalSplitPanel.setLocked(true);
        verticalSplitPanel.setWidth(90, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);
        verticalSplitPanel.setHeight(100, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);
        horizontalSplitPanelRight = new HorizontalSplitPanel();
        horizontalSplitPanelRight.setSplitPosition(30, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);
        horizontalSplitPanelRight.setLocked(true);
        horizontalSplitPanelRight.addStyleName("horizontalBottom");
        horizontalSplitPanelRight.setHeight(90, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);
        horizontalSplitPanelRight.setWidth(100, com.vaadin.terminal.Sizeable.UNITS_PERCENTAGE);

        leftL = new Label("links");
        rightTopL = new Label("rechts Oben");
        rightBottomL = new Label("rechts Unten");
        leftBottomL = new Label("links Unten");

        leftLayout.addComponent(leftL);
        rightLayout.addComponent(verticalSplitPanel);
        topRightLayout.addComponent(rightTopL);
        bottomRightLayout.addComponent(rightBottomL);
//      bottomLeftLayout.addComponent(leftBottomL);
        bottomLayout.addComponent(horizontalSplitPanelRight);

        horizontalSplitPanel.addComponent(leftLayout);
        horizontalSplitPanel.addComponent(rightLayout);

        verticalSplitPanel.addComponent(topRightLayout);
        verticalSplitPanel.addComponent(bottomLayout);

        horizontalSplitPanelRight.addComponent(bottomLeftLayout);
        horizontalSplitPanelRight.addComponent(bottomRightLayout);

        rightLayout.setComponentAlignment(verticalSplitPanel, Alignment.MIDDLE_CENTER);
        bottomLayout.setComponentAlignment(horizontalSplitPanelRight, Alignment.MIDDLE_CENTER);

        mainLayout.addComponent(horizontalSplitPanel);
    }
项目:tournament    文件:TournamentUI.java   
@Override
protected void init(VaadinRequest request) {
    final VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setSizeFull();
    setContent(layout);

    HorizontalSplitPanel hPanel = new HorizontalSplitPanel();
    VerticalSplitPanel vPanel = new VerticalSplitPanel();
    Panel playerPanel = new Panel("Player");
    Panel roundsPanel = new Panel("Rounds");
    Panel matchesPanel = new Panel("Matches");
    Table playersTable = new Table("PlayersTable");
    playersTable.addContainerProperty("Id", Integer.class, null);
    playersTable.addContainerProperty("Name", String.class, null);
    playersTable.addContainerProperty("Score", Integer.class, null);
    playersTable.addContainerProperty("Handicap", Integer.class,null);
    Table roundsTable = new Table("RoundsTable");
    Table matchesTable = new Table("MatchesTable");
    playerPanel.setContent(playersTable);
    HorizontalLayout newPlayerLayout = new HorizontalLayout();
    TextField newPlayer = new TextField(null,"newPlayer");
    Button addPlayerButton = new Button("addPlayer");
    newPlayerLayout.addComponent(newPlayer);
    newPlayerLayout.addComponent(addPlayerButton);
    hPanel.addComponent(newPlayerLayout);
    roundsPanel.setContent(roundsTable);
    matchesPanel.setContent(matchesTable);

    VerticalLayout playerLayout = new VerticalLayout();
    playerLayout.addComponent(playerPanel);
    playerLayout.addComponent(newPlayerLayout);

    VerticalLayout roundsLayout = new VerticalLayout();
    roundsLayout.addComponent(roundsPanel);
    Button addRoundButton = new Button("addRound");
    roundsLayout.addComponent(roundsPanel);
    roundsLayout.addComponent(addRoundButton);

    layout.addComponent(hPanel);
    hPanel.setFirstComponent(playerLayout);
    hPanel.setSecondComponent(vPanel);
    vPanel.setFirstComponent(roundsLayout);
    vPanel.setSecondComponent(matchesPanel);
}
项目:metl    文件:EditFlowPanel.java   
public EditFlowPanel(ApplicationContext context, String flowId, DesignNavigator designNavigator, TabbedPanel tabs) {
    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);
    });
    propertySheet.setCaption("Property Sheet");

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

    addComponent(componentPalette);


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

    rightLayout.addComponent(buildButtonBar());

    // Create two different layouts for the user to toggle between.
    vSplit = new VerticalSplitPanel();
    vSplit.setSizeFull();
    vSplit.setSplitPosition(MAX_PANEL_POSITION, Unit.PERCENTAGE);
    hSplit = new HorizontalSplitPanel();
    hSplit.setSizeFull();
    hSplit.setSplitPosition(MAX_PANEL_POSITION, 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);

    if (isVerticalView()) {
        vSplit.addComponent(flowPanel);
        vSplit.addComponent(propertySheet);
        rightLayout.addComponent(vSplit);
        rightLayout.setExpandRatio(vSplit, 1);
    } else {
        hSplit.addComponent(flowPanel);
        hSplit.addComponent(propertySheet);
        rightLayout.addComponent(hSplit);
        rightLayout.setExpandRatio(hSplit, 1);
    }

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

    redrawFlow();
}
项目:xaadin    文件:SplitPanelElementFactory.java   
@Override
public boolean isClassSupportedForElementFactory(String classname) {
    return classname.equals(HorizontalSplitPanel.class.getName())
            || classname.equals(VerticalSplitPanel.class.getName());
}
项目:xaadin    文件:SplitPanelElementFactoryTest.java   
@Test
public void testIsClassSupportedForElementFactory() throws Exception {
    assertThat(factory.isClassSupportedForElementFactory(HorizontalSplitPanel.class.getName()));
    assertThat(factory.isClassSupportedForElementFactory(VerticalSplitPanel.class.getName()));
}