本文整理汇总了Java中com.vaadin.ui.HorizontalSplitPanel.addComponent方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalSplitPanel.addComponent方法的具体用法?Java HorizontalSplitPanel.addComponent怎么用?Java HorizontalSplitPanel.addComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.HorizontalSplitPanel
的用法示例。
在下文中一共展示了HorizontalSplitPanel.addComponent方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildHorizontalSplitPanel
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalSplitPanel buildHorizontalSplitPanel() {
// common part: create layout
horizontalSplitPanel = new HorizontalSplitPanel();
horizontalSplitPanel.setImmediate(false);
horizontalSplitPanel.setWidth("100.0%");
horizontalSplitPanel.setHeight("100.0%");
// verticalLayoutLeftPanel
verticalLayoutLeftPanel = buildVerticalLayoutLeftPanel();
horizontalSplitPanel.addComponent(verticalLayoutLeftPanel);
// verticalLayoutRightPanel
verticalLayoutRightPanel = buildVerticalLayoutRightPanel();
horizontalSplitPanel.addComponent(verticalLayoutRightPanel);
return horizontalSplitPanel;
}
示例2: buildHorizontalSplitPanel_2
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalSplitPanel buildHorizontalSplitPanel_2() {
// common part: create layout
horizontalSplitPanel_2 = new HorizontalSplitPanel();
horizontalSplitPanel_2.setImmediate(false);
horizontalSplitPanel_2.setWidth("100.0%");
horizontalSplitPanel_2.setHeight("100.0%");
// filterTable
filterTable = new FilterTable();
filterTable.setImmediate(false);
filterTable.setWidth("100.0%");
filterTable.setHeight("100.0%");
horizontalSplitPanel_2.addComponent(filterTable);
// verticalLayout_1
verticalLayout_1 = buildVerticalLayout_1();
horizontalSplitPanel_2.addComponent(verticalLayout_1);
return horizontalSplitPanel_2;
}
示例3: buildHorizontalSplitPanel_1
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalSplitPanel buildHorizontalSplitPanel_1() {
// common part: create layout
horizontalSplitPanel_1 = new HorizontalSplitPanel();
horizontalSplitPanel_1.setImmediate(false);
horizontalSplitPanel_1.setWidth("100.0%");
horizontalSplitPanel_1.setHeight("100.0%");
// verticalLayout_1
verticalLayout_1 = buildVerticalLayout_1();
horizontalSplitPanel_1.addComponent(verticalLayout_1);
// verticalLayout_2
verticalLayout_2 = buildVerticalLayout_2();
horizontalSplitPanel_1.addComponent(verticalLayout_2);
return horizontalSplitPanel_1;
}
示例4: init
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@Override
public void init() {
if (eventProxy == null)
throw new RuntimeException("eventProxy cannot be null.");
if (eventConfDao == null)
throw new RuntimeException("eventConfDao cannot be null.");
if (dataCollectionDao == null)
throw new RuntimeException("dataCollectionDao cannot be null.");
setTheme(Runo.THEME_NAME);
final HorizontalSplitPanel mainPanel = new HorizontalSplitPanel();
final MibConsolePanel mibConsole = new MibConsolePanel();
final MibCompilerPanel mibPanel = new MibCompilerPanel(dataCollectionDao, eventConfDao, eventProxy, mibParser, mibConsole);
mainPanel.setSizeFull();
mainPanel.setSplitPosition(25, Sizeable.UNITS_PERCENTAGE);
mainPanel.addComponent(mibPanel);
mainPanel.addComponent(mibConsole);
final Window mainWindow = new Window("MIB Compiler Application", mainPanel);
setMainWindow(mainWindow);
}
示例5: buildMapSplitPanel
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalSplitPanel buildMapSplitPanel() {
// common part: create layout
mapSplitPanel = new HorizontalSplitPanel();
mapSplitPanel.setImmediate(false);
mapSplitPanel.setWidth("100.0%");
mapSplitPanel.setHeight("100.0%");
mapSplitPanel.setMargin(false);
// locationsLayersMap
locationsLayersMap = new OpenLayersMap();
locationsLayersMap.setImmediate(false);
locationsLayersMap.setWidth("-1px");
locationsLayersMap.setHeight("100.0%");
mapSplitPanel.addComponent(locationsLayersMap);
// locationDataLayout
locationDataLayout = buildLocationDataLayout();
mapSplitPanel.addComponent(locationDataLayout);
return mapSplitPanel;
}
示例6: buildHorizontalSplitPanelOrganization
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalSplitPanel buildHorizontalSplitPanelOrganization() {
// common part: create layout
horizontalSplitPanelOrganization = new HorizontalSplitPanel();
horizontalSplitPanelOrganization.setSplitPosition(25, Sizeable.UNITS_PERCENTAGE);
horizontalSplitPanelOrganization.setImmediate(false);
horizontalSplitPanelOrganization.setWidth("100.0%");
horizontalSplitPanelOrganization.setHeight("100.0%");
horizontalSplitPanelOrganization.setMargin(false);
// tabSheetOrganization
tabSheetOrganization = new TabSheet();
tabSheetOrganization.setImmediate(true);
tabSheetOrganization.setWidth("100.0%");
tabSheetOrganization.setHeight("100.0%");
horizontalSplitPanelOrganization.addComponent(tabSheetOrganization);
return horizontalSplitPanelOrganization;
}
示例7: 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);
}
示例8: InitialLayout
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
/**
* 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);
}
示例9: init
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@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);
}
示例10: EditFlowPanel
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
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();
}
示例11: attach
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
@Override
public void attach() {
super.attach();
// Setup the map in the findLayers pane
splDivider = new HorizontalSplitPanel();
mainLayout = new VerticalLayout();
left = new VerticalLayout();
right = new VerticalLayout();
exportProps = new ExportProps();
mapModel = new MapModel();
// Views
findLayers = new FindLayersViewComponent();
modifyLayers = new SetupMapViewComponent();
exportOptions = new ExportOptionsViewComponent(exportProps);
mapToolbar = new MapToolbarViewComponent();
mapComponent = new OpenLayersMapViewComponent();
// Models
setupMapModel = new SetupMapModel(this);
// Presenters
findLayersPresenter = new FindLayersPresenter(findLayers, mapComponent, mapModel);
setupMapPresenter = new SetupMapPresenter(getSetupMapModel(), modifyLayers, mapComponent, mapModel);
exportOptionsPresenter = new ExportOptionsPresenter(exportOptions);
exportOptions.addListener(setupMapPresenter);
refresher = new Refresher();
addComponent(refresher);
setCaption("ExpressZip");
setSizeFull();
splDivider.setSplitPosition(351, UNITS_PIXELS);
mainLayout.setSizeFull();
mainLayout.addComponent(mapToolbar);
mainLayout.addComponent(splDivider);
mainLayout.setExpandRatio(splDivider, 1f);
splDivider.setSizeFull();
splDivider.addComponent(left);
splDivider.addComponent(right);
setContent(mainLayout);
right.setSpacing(true);
right.setSizeFull();
left.setSizeFull();
left.addComponent(findLayers);
setTheme("ExpressZip");
// http://docs.geotools.org/latest/userguide/library/referencing/order.html
System.setProperty("org.geotools.referencing.forceXY", "true");
right.addComponent(mapComponent);
right.setExpandRatio(mapComponent, 1f);
try {
findLayersPresenter.paneEntered();
} catch (Exception e) {
logger.error("Failed setting up map", e);
showNotification("Setting Up Map Failed", "Check logs on server", Notification.TYPE_ERROR_MESSAGE);
}
}
示例12: initLayout
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
private void initLayout() {
HorizontalSplitPanel splitPanel = new HorizontalSplitPanel();
VerticalLayout rulesOverview = new VerticalLayout();
splitPanel.addComponent(rulesOverview);
splitPanel.addComponent(ruleEditor);
rulesOverview.addComponent(rulesTable);
rulesOverview.addComponent(addButton);
rulesOverview.setSizeFull();
rulesOverview.setExpandRatio(rulesTable, 1);
rulesTable.setSizeFull();
addButton.setWidth("100%");
ruleEditor.setMargin(true);
ruleEditor.setVisible(false);
splitPanel.setHeight("100%");
splitPanel.setMargin(true);
splitPanel.setWidth("100%");
splitPanel.setSizeFull();
logPathField.addValidator(new AbstractStringValidator(null) {
@Override
protected boolean isValidString(String value) {
try {
if (value == null) {
setErrorMessage("Invalid path: can not be null");
return false;
}
File file = new File(value);
if (!file.exists()) {
setErrorMessage("Invalid path");
return false;
}
File parent = new File(file.getParent());
return parent.canWrite() || file.canWrite();
} catch (Exception ex) {
setErrorMessage("Invalid path: " + ex.getMessage());
return false;
}
}
});
logPathField.setImmediate(true);
logPathField.setWidth("100%");
logPathField.setValue(config.getLogFilePath());
VerticalLayout confLayout = new VerticalLayout();
confLayout.setMargin(true);
confLayout.addComponent(logPathField);
confLayout.addComponent(splitPanel);
addComponent(confLayout);
}
示例13: initLayout
import com.vaadin.ui.HorizontalSplitPanel; //导入方法依赖的package包/类
private void initLayout() {
// main container
VerticalLayout container = new VerticalLayout();
container.setSizeFull();
setContent(container);
container.setMargin(true);
// header
container.addComponent(header);
initHeader();
// main content which contains photolist and image panel
content.setSizeFull();
container.addComponent(content);
// split panel in main content for photolist and image panel
HorizontalSplitPanel split = new HorizontalSplitPanel();
content.addComponent(split);
// header is 1:10 of the full container
// container.setExpandRatio(header, 1);
container.setExpandRatio(content, 1);
content.setExpandRatio(split, 1);
// Adding panels to split container
split.addComponent(left);
split.addComponent(right);
left.addComponent(photoList);
left.setSizeFull();
left.setExpandRatio(photoList, 1); // photolist expands
photoList.setSizeFull();
split.setSplitPosition(33f);
split.setSizeFull();
// setting footer for version info
initFooter();
// set container for gallery data
images.setBeanIdProperty("id");
// creating right side's image panel
initImagePanel();
// show credits
try {
credits.setValue(service.getCredits());
} catch (Exception e) {
Notification.show(e.getMessage(), "", Notification.Type.ERROR_MESSAGE);
}
}