List of usage examples for com.vaadin.ui AbstractSplitPanel setLocked
public void setLocked(boolean locked)
From source file:org.opennms.features.jmxconfiggenerator.webui.ui.mbeans.MBeansView.java
License:Open Source License
private AbstractSplitPanel initMainPanel(Component first, Component second) { AbstractSplitPanel layout = new HorizontalSplitPanel(); layout.setSizeFull();//from ww w . j a v a2 s. c om layout.setLocked(false); layout.setSplitPosition(20, UNITS_PERCENTAGE); layout.setFirstComponent(first); layout.setSecondComponent(second); layout.setCaption(first.getCaption()); return layout; }
From source file:org.opennms.features.vaadin.jmxconfiggenerator.ui.mbeans.MBeansView.java
License:Open Source License
private AbstractSplitPanel initMainPanel(Tree first, Component second) { AbstractSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull();// ww w.j a v a 2s . c o m splitPanel.setLocked(false); splitPanel.setSplitPosition(25, Unit.PERCENTAGE); splitPanel.setFirstComponent(first); splitPanel.setSecondComponent(second); splitPanel.setCaption(first.getCaption()); return splitPanel; }
From source file:org.semanticsoft.vaaclipse.presentation.renderers.SashRenderer.java
License:Open Source License
public void generateSplitPanelStructure(MPartSashContainer sash) { VerticalLayout layout = (VerticalLayout) sash.getWidget(); layout.removeAllComponents();/*from ww w .j a v a 2 s . c o m*/ ComponentContainer sashWidget = null; @SuppressWarnings("unchecked") List<MPartSashContainerElement> renderableAndVisible = (List<MPartSashContainerElement>) filterRenderableAndVisibleElements( sash); if (renderableAndVisible.isEmpty()) { sashWidget = new VerticalLayout(); } else if (renderableAndVisible.size() == 1) { sashWidget = new VerticalLayout(); MPartSashContainerElement child = renderableAndVisible.get(0); sashWidget.addComponent((Component) child.getWidget()); } else { sashWidget = sash.isHorizontal() ? new SashWidgetHorizontal() : new SashWidgetVertical(); AbstractSplitPanel currentSashWidget = (AbstractSplitPanel) sashWidget; currentSashWidget.setLocked(sash.getTags().contains(Tags.NO_RESIZE)); for (int i = 0; i < renderableAndVisible.size(); i++) { MPartSashContainerElement child = renderableAndVisible.get(i); if (currentSashWidget.getFirstComponent() == null) { currentSashWidget.setFirstComponent((Component) child.getWidget()); } else { if (i == renderableAndVisible.size() - 1) { currentSashWidget.setSecondComponent((Component) child.getWidget()); } else { AbstractSplitPanel newSashWidget = sash.isHorizontal() ? new SashWidgetHorizontal() : new SashWidgetVertical(); newSashWidget.setLocked(sash.getTags().contains(Tags.NO_RESIZE)); newSashWidget.setFirstComponent((Component) child.getWidget()); currentSashWidget.setSecondComponent(newSashWidget); currentSashWidget = newSashWidget; } } } } sashWidget.setSizeFull(); layout.addComponent(sashWidget); setWeights(sash); }