當前位置: 首頁>>代碼示例>>Java>>正文


Java Panel.setHeight方法代碼示例

本文整理匯總了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);
	}
 
開發者ID:mhus,項目名稱:cherry-web,代碼行數:21,代碼來源:SimplePageLayout.java

示例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);

    }
 
開發者ID:pontusbostrom,項目名稱:VaadinGraphvizComponent,代碼行數:35,代碼來源:UMLDemoView.java

示例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;
}
 
開發者ID:apache,項目名稱:incubator-openaz,代碼行數:16,代碼來源:RegexpEditorComponent.java

示例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;
}
 
開發者ID:apache,項目名稱:incubator-openaz,代碼行數:16,代碼來源:RangeEditorComponent.java

示例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);
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:37,代碼來源:AbstractTableLayout.java

示例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);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:12,代碼來源:EmailDetailPanel.java

示例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);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:32,代碼來源:ProcessDefinitionInfoComponent.java

示例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;
	}
 
開發者ID:vianneyfaivre,項目名稱:Persephone,代碼行數:60,代碼來源:LogsPage.java

示例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;
}
 
開發者ID:IBM-Cloud,項目名稱:onprem-integration-demo,代碼行數:7,代碼來源:AnalyzeView.java


注:本文中的com.vaadin.ui.Panel.setHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。