本文整理汇总了Java中com.vaadin.ui.Panel.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Panel.setHeight方法的具体用法?Java Panel.setHeight怎么用?Java Panel.setHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Panel
的用法示例。
在下文中一共展示了Panel.setHeight方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimplePageLayout
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
public SimplePageLayout(CaoNode res) {
this.res = res;
p = new Panel();
un = new Panel();
h = new HorizontalLayout();
v = new VerticalLayout();
p.setContent(v);
// setSizeFull();
h.setWidth("100%");
p.addStyleName("v-scrollable");
p.setHeight("100%");
un.addStyleName("v-scrollable");
un.setHeight("100%");
un.setWidth("250px");
addComponent(p);
addComponent(un);
setExpandRatio(p, 1);
}
示例2: UMLDemoView
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
public UMLDemoView() {
component = new VizComponent();
graphName = "\"Class diagram\"";
Label label = new Label(
"This example show an (simplified) UML diagram of a (tiny) part of the Vaadin framework. "
+ "Nodes with HTML content is used for the classes. "
+ "When a class is clicked more detailed (here dummy) information is shown at the right of the diagram");
HorizontalLayout layout = new HorizontalLayout();
Panel panel = new Panel("Graph " + graphName);
panel.setHeight("600px");
panel.setWidth("800px");
panel.setContent(component);
layout.addComponent(panel);
classInfo = new Label("<h1> Class info </h1>", ContentMode.HTML);
layout.addComponent(classInfo);
layout.setSpacing(true);
layout.setComponentAlignment(panel, Alignment.TOP_LEFT);
layout.setComponentAlignment(classInfo, Alignment.TOP_LEFT);
addComponent(label);
addComponent(layout);
setMargin(true);
setSpacing(true);
createAndRenderGraph(width, height);
}
示例3: buildPanelTester
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@AutoGenerated
private Panel buildPanelTester() {
// common part: create layout
panelTester = new Panel();
panelTester.setCaption("Test The Expression");
panelTester.setImmediate(false);
panelTester.setWidth("-1px");
panelTester.setHeight("-1px");
// verticalLayout_2
verticalLayout_2 = buildVerticalLayout_2();
panelTester.setContent(verticalLayout_2);
return panelTester;
}
示例4: buildPanelTester
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@AutoGenerated
private Panel buildPanelTester() {
// common part: create layout
panelTester = new Panel();
panelTester.setCaption("Test Range Values");
panelTester.setImmediate(true);
panelTester.setWidth("-1px");
panelTester.setHeight("-1px");
// verticalLayout_2
verticalLayout_2 = buildVerticalLayout_2();
panelTester.setContent(verticalLayout_2);
return panelTester;
}
示例5: buildLayout
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void buildLayout() {
setSizeFull();
setSpacing(true);
setMargin(false);
setStyleName("group");
final VerticalLayout tableHeaderLayout = new VerticalLayout();
tableHeaderLayout.setSizeFull();
tableHeaderLayout.setSpacing(false);
tableHeaderLayout.setMargin(false);
tableHeaderLayout.setStyleName("table-layout");
tableHeaderLayout.addComponent(tableHeader);
tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER);
if (isShortCutKeysRequired()) {
final Panel tablePanel = new Panel();
tablePanel.setStyleName("table-panel");
tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
tablePanel.setContent(table);
tablePanel.addActionHandler(getShortCutKeysHandler());
tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
tableHeaderLayout.addComponent(tablePanel);
tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(tablePanel, 1.0F);
} else {
tableHeaderLayout.addComponent(table);
tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(table, 1.0F);
}
addComponent(tableHeaderLayout);
addComponent(detailsLayout);
setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
setComponentAlignment(detailsLayout, Alignment.TOP_CENTER);
setExpandRatio(tableHeaderLayout, 1.0F);
}
示例6: addHtmlContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void addHtmlContent(String html) {
Panel panel = new Panel();
panel.setWidth(800, UNITS_PIXELS);
panel.setHeight(300, UNITS_PIXELS);
content = new Label(html, Label.CONTENT_XHTML);
content.setHeight(100, UNITS_PERCENTAGE);
panel.addComponent(content);
addComponent(panel);
}
示例7: initImage
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void initImage() {
processImageContainer = new VerticalLayout();
Label processTitle = new Label(i18nManager.getMessage(Messages.PROCESS_HEADER_DIAGRAM));
processTitle.addStyleName(ExplorerLayout.STYLE_H3);
processImageContainer.addComponent(processTitle);
if(processDefinition.getDiagramResourceName() != null) {
StreamResource diagram = new ProcessDefinitionImageStreamResourceBuilder()
.buildStreamResource(processDefinition, repositoryService);
Embedded embedded = new Embedded(null, diagram);
embedded.setType(Embedded.TYPE_IMAGE);
embedded.setSizeUndefined();
Panel imagePanel = new Panel(); // using panel for scrollbars
imagePanel.addStyleName(Reindeer.PANEL_LIGHT);
imagePanel.setWidth(100, UNITS_PERCENTAGE);
imagePanel.setHeight(400, UNITS_PIXELS);
HorizontalLayout panelLayout = new HorizontalLayout();
panelLayout.setSizeUndefined();
imagePanel.setContent(panelLayout);
imagePanel.addComponent(embedded);
processImageContainer.addComponent(imagePanel);
} else {
Label noImageAvailable = new Label(i18nManager.getMessage(Messages.PROCESS_NO_DIAGRAM));
processImageContainer.addComponent(noImageAvailable);
}
addComponent(processImageContainer);
}
示例8: getLogsPanel
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Panel getLogsPanel(Application app, String logs, String propertyLoggingPath) {
// Logs text area
Label logsLabel = new Label(logs, ContentMode.PREFORMATTED);
logsLabel.setStyleName("app-logs");
// Create panel
VerticalLayout layout = new VerticalLayout(logsLabel);
layout.setSpacing(false);
layout.setSizeUndefined();
Panel panel = new Panel(String.format("Application Logs (from %s)", propertyLoggingPath), layout);
panel.setHeight(500, Unit.PIXELS);
scrollToBottom(panel);
// Auto refresh logs
ajaxRefreshInit(args -> {
int uiId = ((PersephoneUI)getUI()).getUIId();
LOGGER.trace("UI-{}: Logs Refresh Start", uiId);
// Get current session range
LogsRange currentSessionRange = ((PersephoneUI)getUI()).getUserData().getCurrentRange();
LOGGER.trace("UI-{}: Logs Refresh: Current Range: {}-{}", uiId, currentSessionRange.getStart(), currentSessionRange.getEnd());
// Get next logs range to retrieve
LogsRange nextRange = logsService.getLogsRange(app, currentSessionRange, bytesToRetrieveRefresh);
LOGGER.trace("UI-{}: Logs Refresh: Next Range: {}-{}", uiId, nextRange.getStart(), nextRange.getEnd());
// Update current range into user session
((PersephoneUI)getUI()).getUserData().setCurrentRange(nextRange);
// Get logs
String newLogs = logsService.getLogs(app, nextRange);
// Update UI
if(!StringUtils.isEmpty(newLogs)) {
String oldLogs = logsLabel.getValue();
// Too much logs displayed => let's strip them out
if(oldLogs.length() + newLogs.length() > bytesToDisplayMax) {
newLogs = oldLogs + newLogs;
LOGGER.trace("UI-{}: Logs Refresh: Too much logs are going to be displayed (length={}), it will be stripped to {} chars", uiId, newLogs.length(), bytesToDisplayMax);
newLogs = newLogs.substring(newLogs.length() - bytesToDisplayMax);
logsLabel.setValue(newLogs);
}
// max length not reached yet
else {
logsLabel.setValue(oldLogs + newLogs);
}
}
scrollToBottom(panel);
LOGGER.trace("UI-{} Logs Refresh End", uiId);
});
return panel;
}
示例9: wrapInPanel
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private static Panel wrapInPanel(Chart chart, String caption) {
Panel panel = new Panel(caption, chart);
panel.setHeight("300px");
chart.setSizeFull();
return panel;
}