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


Java Panel.addComponent方法代码示例

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


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

示例1: initOptionGroups

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void initOptionGroups() {
        detInput = new Panel("Zukünftige Perioden (deterministisch):");
        deterministicInput.addItem(InputType.DIRECT);
        deterministicInput.addItem(InputType.GESAMTKOSTENVERFAHREN);
        deterministicInput.addItem(InputType.UMSATZKOSTENVERFAHREN);
        detInput.addStyleName(Reindeer.PANEL_LIGHT);
        detInput.addComponent(deterministicInput);
        
        stoInput = new Panel("Vergangene Perioden (stochastisch):");
        stochasticInput.addItem(InputType.DIRECT);
        stochasticInput.addItem(InputType.GESAMTKOSTENVERFAHREN);
        stochasticInput.addItem(InputType.UMSATZKOSTENVERFAHREN);
        stoInput.addStyleName(Reindeer.PANEL_LIGHT);
        stoInput.addComponent(stochasticInput);
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:16,代码来源:MethodViewImpl.java

示例2: addDropPanel

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void addDropPanel() {
  Panel dropPanel = new Panel();
  DragAndDropWrapper dragAndDropWrapper = new DragAndDropWrapper(dropPanel);
  dragAndDropWrapper.setDropHandler(this);
  dragAndDropWrapper.setWidth("80%");
  addComponent(dragAndDropWrapper);
  setComponentAlignment(dragAndDropWrapper, Alignment.MIDDLE_CENTER);
  
  Label dropLabel = new Label(i18nManager.getMessage(Messages.UPLOAD_DROP));
  dropLabel.setSizeUndefined();
  dropPanel.addComponent(dropLabel);
  ((VerticalLayout)dropPanel.getContent()).setComponentAlignment(dropLabel, Alignment.MIDDLE_CENTER);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:UploadComponent.java

示例3: 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

示例4: 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

示例5: addJobState

import com.vaadin.ui.Panel; //导入方法依赖的package包/类
protected void addJobState() {
  Label processDefinitionHeader = new Label(i18nManager.getMessage(Messages.JOB_HEADER_EXECUTION));
  processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_H3);
  processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
  processDefinitionHeader.setWidth(100, UNITS_PERCENTAGE);
  addComponent(processDefinitionHeader);
  
  VerticalLayout layout = new VerticalLayout();
  layout.setSpacing(true);
  layout.setSizeFull();
  layout.setMargin(true,false, true, false);
  
  addDetailComponent(layout);
  setDetailExpandRatio(layout, 1.0f);
  
  // Exceptions
  if(job.getExceptionMessage() != null) {
    // Number of retries
    Label retrieslabel = new Label(getRetriesLabel(job));
    layout.addComponent(retrieslabel);
    
    // Exception
    Label exceptionMessageLabel = new Label(i18nManager.getMessage(Messages.JOB_ERROR) 
            + ": " + job.getExceptionMessage());
    exceptionMessageLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_MESSAGE);
    layout.addComponent(exceptionMessageLabel);
    
    // Add Exception stacktrace
    String stack = managementService.getJobExceptionStacktrace(job.getId());
    
    Label stackTraceLabel = new Label(stack);
    stackTraceLabel.setContentMode(Label.CONTENT_PREFORMATTED);
    stackTraceLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_TRACE);
    stackTraceLabel.setSizeFull();
    
    Panel stackPanel = new Panel();
    stackPanel.setWidth(100, UNITS_PERCENTAGE);
    stackPanel.setSizeFull();
    stackPanel.setScrollable(true);
    stackPanel.addComponent(stackTraceLabel);
    
    layout.addComponent(stackPanel);
    layout.setExpandRatio(stackPanel, 1.0f);
  } else {
    Label noException = new Label(i18nManager.getMessage(Messages.JOB_NOT_EXECUTED));
    layout.addComponent(noException);
    layout.setExpandRatio(noException, 1.0f);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:50,代码来源:JobDetailPanel.java


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