当前位置: 首页>>代码示例>>Java>>正文


Java HorizontalSplitPanel.setMaxSplitPosition方法代码示例

本文整理汇总了Java中com.vaadin.ui.HorizontalSplitPanel.setMaxSplitPosition方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalSplitPanel.setMaxSplitPosition方法的具体用法?Java HorizontalSplitPanel.setMaxSplitPosition怎么用?Java HorizontalSplitPanel.setMaxSplitPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.HorizontalSplitPanel的用法示例。


在下文中一共展示了HorizontalSplitPanel.setMaxSplitPosition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createMainComponent

import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
private void createMainComponent() {
	VerticalLayout main = new VerticalLayout();
	main.setMargin(false);
	main.setSizeFull();
	main.addComponent(createToolbar());

	mainSplitPanel = new HorizontalSplitPanel();
	mainSplitPanel.setMargin(false);
	mainSplitPanel.setMaxSplitPosition(80f, HorizontalSplitPanel.UNITS_PERCENTAGE);
	mainSplitPanel.setMinSplitPosition(20f, HorizontalSplitPanel.UNITS_PERCENTAGE);
	mainSplitPanel.setSizeFull();
	mainSplitPanel.setSplitPosition(30f, HorizontalSplitPanel.UNITS_PERCENTAGE);

	taskTable = createTable();
	mainSplitPanel.setFirstComponent(taskTable);

	displayEmptyTask();

	main.addComponent(mainSplitPanel);
	main.setExpandRatio(mainSplitPanel, 1.0f);
	mainComponent = main;
}
 
开发者ID:frincon,项目名称:openeos,代码行数:23,代码来源:TasksWindow.java

示例2: SubSetSelectorDraggable

import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
public SubSetSelectorDraggable(String caption, List<ET> options) {
    availableLayout = new VerticalLayout();
    availableLayout.setMargin(false);
    availableLayout.setSpacing(false);

    valueLayout = new VerticalLayout();
    valueLayout.setMargin(false);
    valueLayout.setSpacing(false);

    splitPanel = new HorizontalSplitPanel(availableLayout, valueLayout);
    splitPanel.setMinSplitPosition(20, Unit.PERCENTAGE);
    splitPanel.setMaxSplitPosition(80, Unit.PERCENTAGE);
    splitPanel.setCaption(caption);

    verticalLayout = new VerticalLayout();
    verticalLayout.setHeight(100, Unit.PERCENTAGE);
    verticalLayout.addComponentsAndExpand(splitPanel);

    availableDragSource = new ArrayList<>();
    buttonStyles = new ArrayList<>();

    addDropTarget(valueLayout, false);
    addDropTarget(availableLayout, true);

    setHeight(500, Unit.PIXELS);
    setDraggableHeight(45);
    valueLayout.setHeight(getDraggableAreaHeight(), Unit.PIXELS);
    setStyle();

    setItems(options);
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:32,代码来源:SubSetSelectorDraggable.java

示例3: init

import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {

	HorizontalSplitPanel split = new HorizontalSplitPanel();
	setContent(split);
	split.setSplitPosition(50, Unit.PERCENTAGE);
	split.setMinSplitPosition(100, Unit.PIXELS);
	split.setMaxSplitPosition(1200, Unit.PIXELS);

	CssLayout grid = new CssLayout();
	grid.setWidth("100%");
	grid.addStyleName("grid");
	split.addComponent(grid);

	for (int i = 1; i < 10; i++) {
		Label l = new Label("" + i);
		l.setSizeUndefined();
		grid.addComponent(l);
	}

	Label description = new Label(
			"<h3>This application demonstrates the Responsive add-on for Vaadin.</h3>"
					+ "<p>Drag the splitter to see how the boxes on the left side adapt to "
					+ "different widths. They maintain a width of 100-200px, and always "
					+ "span the entire width of the container.</p><p>This label will "
					+ "adapt its font size and line height for different widths.</p>"
					+ "<p><a href=\"http://vaadin.com/addon/vaadin-responsive\">Download the "
					+ "Responsive add-on</a></p>", ContentMode.HTML);
	description.addStyleName("description");
	split.addComponent(description);

	// Add the responsive capabilities to the components
	new Responsive(grid);
	new Responsive(description);
}
 
开发者ID:vaadin,项目名称:responsive,代码行数:36,代码来源:ResponsiveDemoUI.java


注:本文中的com.vaadin.ui.HorizontalSplitPanel.setMaxSplitPosition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。