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


Java GridLayout类代码示例

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


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

示例1: createSimpleGroupDefinitionTab

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private GridLayout createSimpleGroupDefinitionTab() {
    final GridLayout layout = new GridLayout();
    layout.setSpacing(true);
    layout.setColumns(3);
    layout.setRows(4);
    layout.setStyleName("marginTop");

    layout.addComponent(getLabel("caption.rollout.generate.groups"), 0, 0, 2, 0);

    layout.addComponent(getMandatoryLabel("prompt.number.of.groups"), 0, 1);
    layout.addComponent(noOfGroups, 1, 1);
    noOfGroups.addValidator(nullValidator);
    layout.addComponent(groupSizeLabel, 2, 1);

    layout.addComponent(getMandatoryLabel("prompt.tigger.threshold"), 0, 2);
    layout.addComponent(triggerThreshold, 1, 2);
    triggerThreshold.addValidator(nullValidator);
    layout.addComponent(getPercentHintLabel(), 2, 2);

    layout.addComponent(getMandatoryLabel("prompt.error.threshold"), 0, 3);
    layout.addComponent(errorThreshold, 1, 3);
    errorThreshold.addValidator(nullValidator);
    layout.addComponent(errorThresholdOptionGroup, 2, 3);

    return layout;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:27,代码来源:AddUpdateRolloutWindowLayout.java

示例2: buildHorizontalSplitPanel

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private HorizontalSplitPanel buildHorizontalSplitPanel() {
	// common part: create layout
	horizontalSplitPanel = new HorizontalSplitPanel();
	horizontalSplitPanel.setImmediate(false);
	horizontalSplitPanel.setWidth("100.0%");
	horizontalSplitPanel.setHeight("100.0%");
	horizontalSplitPanel.setMargin(false);
	
	// gridLayout_1
	gridLayoutCalendar = new GridLayout();
	gridLayoutCalendar.setImmediate(true);
	gridLayoutCalendar.setWidth("100.0%");
	gridLayoutCalendar.setHeight("100.0%");
	gridLayoutCalendar.setMargin(false);
	gridLayoutCalendar.setColumns(4);
	gridLayoutCalendar.setRows(3);
	horizontalSplitPanel.setSecondComponent(gridLayoutCalendar);
	
	return horizontalSplitPanel;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:21,代码来源:CalendarCardView.java

示例3: generateConditionList

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private void generateConditionList(GridLayout panelGrid) {
  VerticalLayout conditionsVerticalLayout = new VerticalLayout();
  conditionsVerticalLayout.setSizeUndefined();

  flowDTO.getConditionList().forEach(
      conditionDTO -> conditionsVerticalLayout
          .addComponent(new ConditionPanel(conditionDTO, conditionWidgetRepository,
              condDto -> {
                if (condDto == null) {
                  flowDTO.removeCondition(conditionDTO);
                  generateConditionList(panelGrid);
                }

                saveIfPossible();
              }
          )));

  panelGrid.removeComponent(0, 3);
  panelGrid.addComponent(conditionsVerticalLayout, 0, 3);
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:21,代码来源:FlowViewPanel.java

示例4: generateActionList

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private void generateActionList(GridLayout panelGrid) {
  VerticalLayout actionsVerticalLayout = new VerticalLayout();
  actionsVerticalLayout.setSizeUndefined();

  flowDTO.getActionList().forEach(actionDTO -> actionsVerticalLayout.addComponent(
      new ActionPanel(actionDTO, actionWidgetRepository, actDto -> {
        if (actDto == null) {
          flowDTO.removeAction(actionDTO);
          generateActionList(panelGrid);
        }

        saveIfPossible();
      })));

  panelGrid.removeComponent(1, 3);
  panelGrid.addComponent(actionsVerticalLayout, 1, 3);
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:18,代码来源:FlowViewPanel.java

示例5: getEingabeMethodeInfo

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private VerticalLayout getEingabeMethodeInfo () {
		VerticalLayout vl = new VerticalLayout();
		headline0 = new Label ("<h1>Eingabemethode</h1>");
		headline0.setContentMode(Label.CONTENT_XHTML);
		headline1 = new Label ("<h2>Methode zur Berechnung des Unternehmenswertes</h2>");
		headline1.setContentMode(Label.CONTENT_XHTML);
		
		gl = new GridLayout (2,6);
		gl.setSizeFull();
		gl.setColumnExpandRatio(1,  1.0f);
		
		gl.addComponent(iconFCF, 0, 0);
		gl.setComponentAlignment(iconFCF, Alignment.MIDDLE_CENTER);
		gl.addComponent(fcfHeadline, 1, 0);
		gl.addComponent(fcfText, 1, 1);
		
//		gl.addComponent(iconUKV, 0, 2);
//		gl.setComponentAlignment(iconUKV, Alignment.MIDDLE_CENTER);
//		gl.addComponent(ukvHeadline, 1, 2);
//		gl.addComponent(ukvText, 1, 3);
//		
//		gl.addComponent(iconGKV, 0 , 4);
//		gl.setComponentAlignment(iconGKV, Alignment.MIDDLE_CENTER);
//		gl.addComponent(gkvHeadline, 1, 4);
//		gl.addComponent(gkvText, 1, 5);
		
		vl.addComponent(headline0);
		vl.addComponent(headline1);
		vl.addComponent(gl);
		
		return vl;
	}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:33,代码来源:DescriptionViewImpl.java

示例6: createLayout

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
public void createLayout() {
	logger.debug ("createLayout");
	
	grid = new GridLayout(2, 4);
	planningLabel = new Label("Planungsprämissen:");
	companyValueLabel = new Label("Unternehmenswert:");
	planningLayout = new GridLayout();
	companyValue = new Label("30.000.000€");
	
	grid.setSizeFull();
	grid.setColumnExpandRatio(1, 5);
	
	grid.addComponent(planningLabel, 0, 0);
	grid.addComponent(planningLayout, 1, 0);
	grid.addComponent(companyValueLabel, 0, 1);
	grid.addComponent(companyValue, 1, 1);
	
	addComponent(grid);
	
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:21,代码来源:MoreScenarioResultViewImpl.java

示例7: buildLayout

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
protected void buildLayout() {

        mainLayout = new GridLayout(3, 2);
        mainLayout.setSpacing(true);
        comboLayout = new VerticalLayout();
        colorPickerLayout = new ColorPickerLayout();
        ColorPickerHelper.setRgbSliderValues(colorPickerLayout);
        contentLayout = new VerticalLayout();

        final HorizontalLayout colorLabelLayout = new HorizontalLayout();
        colorLabelLayout.setMargin(false);
        colorLabelLayout.addComponents(colorLabel, tagColorPreviewBtn);

        formLayout.addComponent(optiongroup);
        formLayout.addComponent(comboLayout);
        formLayout.addComponent(tagName);
        formLayout.addComponent(tagDesc);
        formLayout.addStyleName("form-lastrow");
        formLayout.setSizeFull();

        contentLayout.addComponent(formLayout);
        contentLayout.addComponent(colorLabelLayout);
        contentLayout.setComponentAlignment(formLayout, Alignment.MIDDLE_CENTER);
        contentLayout.setComponentAlignment(colorLabelLayout, Alignment.MIDDLE_LEFT);
        contentLayout.setSizeUndefined();

        mainLayout.setSizeFull();
        mainLayout.addComponent(contentLayout, 0, 0);

        colorPickerLayout.setVisible(false);
        mainLayout.addComponent(colorPickerLayout, 1, 0);
        mainLayout.setComponentAlignment(colorPickerLayout, Alignment.MIDDLE_CENTER);

        setCompositionRoot(mainLayout);
        tagName.focus();
    }
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:37,代码来源:AbstractCreateUpdateTagLayout.java

示例8: createMainLayout

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private GridLayout createMainLayout() {
    createDetailsAndUploadLayout();
    createUploadButtonLayout();
    mainLayout = new GridLayout(3, 2);
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    mainLayout.addComponent(filterByTypeLayout, 0, 0);
    mainLayout.addComponent(smTableLayout, 1, 0);
    mainLayout.addComponent(detailAndUploadLayout, 2, 0);
    mainLayout.addComponent(deleteActionsLayout, 1, 1);
    mainLayout.addComponent(uplaodButtonsLayout, 2, 1);
    mainLayout.setRowExpandRatio(0, 1.0F);
    mainLayout.setColumnExpandRatio(1, 0.5F);
    mainLayout.setColumnExpandRatio(2, 0.5F);
    mainLayout.setComponentAlignment(deleteActionsLayout, Alignment.BOTTOM_CENTER);
    mainLayout.setComponentAlignment(uplaodButtonsLayout, Alignment.BOTTOM_CENTER);
    return mainLayout;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:19,代码来源:UploadArtifactView.java

示例9: initPasswordFields

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
protected void initPasswordFields() {
  inputGrid = new GridLayout(2, 2);
  inputGrid.setSpacing(true);
  layout.addComponent(inputGrid);
  layout.setComponentAlignment(inputGrid, Alignment.MIDDLE_CENTER);
  
  Label newPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_NEW_PASSWORD));
  inputGrid.addComponent(newPasswordLabel);
  passwordField1 = new PasswordField();
  passwordField1.setWidth(150, UNITS_PIXELS);
  inputGrid.addComponent(passwordField1);
  passwordField1.focus();

  Label confirmPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_CONFIRM_PASSWORD));
  inputGrid.addComponent(confirmPasswordLabel);
  passwordField2 = new PasswordField();
  passwordField2.setWidth(150, UNITS_PIXELS);
  inputGrid.addComponent(passwordField2);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:ChangePasswordPopupWindow.java

示例10: ConfirmationDialogPopupWindow

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
public ConfirmationDialogPopupWindow(String title, String description) {
  setWidth(400, UNITS_PIXELS);
  setModal(true);
  setResizable(false);
  
  addStyleName(Reindeer.PANEL_LIGHT);
  
  layout = new GridLayout(2,2);
  layout.setMargin(true);
  layout.setSpacing(true);
  layout.setSizeFull();
  
  setContent(layout);
  
  I18nManager i18nManager = ExplorerApp.get().getI18nManager();
  if(title != null) {
    setCaption(title);
  } else {
    setCaption(i18nManager.getMessage(Messages.CONFIRMATION_DIALOG_DEFAULT_TITLE));
  }
  
  initLabel(description);
  initButtons(i18nManager);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:25,代码来源:ConfirmationDialogPopupWindow.java

示例11: addTaskEventText

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) {
  VerticalLayout layout = new VerticalLayout();
  layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT);
  layout.setWidth("100%");
  eventGrid.addComponent(layout);
  
  // Actual text
  Label text = taskEventTextResolver.resolveText(taskEvent);
  text.setWidth("100%");
  layout.addComponent(text);
  
  // Time
  Label time = new Label(new HumanTime(i18nManager).format(taskEvent.getTime()));
  time.setSizeUndefined();
  time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME);
  layout.addComponent(time);
  
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:TaskEventsPanel.java

示例12: PropertyNamedCell

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
public PropertyNamedCell(GridLayout propertiesLayout) {
    this.txtName = new TextField();
    this.txtName.setWidth("100%");
    this.txtName.setNullSettingAllowed(false);
    propertiesLayout.addComponent(this.txtName);
    
    this.txtColumn = new TextField();
    this.txtColumn.setWidth("100%");
    this.txtColumn.setNullSettingAllowed(false);
    propertiesLayout.addComponent(this.txtColumn);
    
    this.txtRow = new TextField();
    this.txtRow.setWidth("100%");
    this.txtRow.setNullSettingAllowed(false);
    propertiesLayout.addComponent(this.txtRow);
}
 
开发者ID:UnifiedViews,项目名称:Plugins,代码行数:17,代码来源:PropertyNamedCell.java

示例13: buildSubForm

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private AbstractComponentContainer buildSubForm(SubForm subForm, Map<String, AbstractComponent> mapComponents,
		List<String> fieldIdList, Map<String, Object> extraObjects) {
	//panel.setCaption(formEditor.getName());
	GridLayout layout = new GridLayout(subForm.getColumns(), subForm.getRows());
	layout.setWidth("100%");
	layout.setSpacing(true);
	for (int row = 0; row < subForm.getRows(); row++) {
		for (int column = 0; column < subForm.getColumns(); column++) {
			Component component = subForm.getField(row, column);
			if (component == null) {
				layout.addComponent(new Label("&nbsp;", Label.CONTENT_XHTML));
			} else if (component instanceof Field) {
				Field editor = (Field) component;
				if (editor != null) {
					layout.addComponent(buildField(editor, mapComponents, fieldIdList, extraObjects));
				}
			} else {
				buildComponent(component, mapComponents, fieldIdList, extraObjects);
			}
		}
	}
	return layout;
}
 
开发者ID:frincon,项目名称:abstractform,代码行数:24,代码来源:VaadinFormToolkit.java

示例14: setLayout

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
private void setLayout() {
	VerticalLayout mainLayout = new VerticalLayout();
	GridLayout buttonsAndTotalLayout = new GridLayout(3,1);
	HorizontalLayout buttonsLayout = new HorizontalLayout();
	VerticalLayout secondLayout = new VerticalLayout();
	HorizontalLayout totalLayout = new HorizontalLayout();
	mainLayout.addComponent(createTable());
	buttonsLayout.addComponent(addRowButton);
	buttonsLayout.addComponent(editButton);
	secondLayout.setSizeFull();
	totalLayout.setSizeFull();
	totalLayout.addComponent(createTotal());

	buttonsAndTotalLayout.setHeight(100, Unit.PIXELS);
	buttonsAndTotalLayout.addComponent(buttonsLayout, 0, 0);
	buttonsAndTotalLayout.setComponentAlignment(buttonsLayout, Alignment.TOP_LEFT);
	buttonsAndTotalLayout.addComponent(totalLayout,2,0);
	buttonsAndTotalLayout.setComponentAlignment(totalLayout, Alignment.MIDDLE_RIGHT);
	buttonsLayout.setMargin(true);
	buttonsAndTotalLayout.setSizeFull();
	mainLayout.addComponent(buttonsAndTotalLayout);
	setContent(mainLayout);
	mainLayout.setSizeFull();
	mainLayout.setSpacing(true);
	
}
 
开发者ID:nyholmniklas,项目名称:vaadinInvoiceGenerator,代码行数:27,代码来源:InvoiceRowPanel.java

示例15: initialize

import com.vaadin.ui.GridLayout; //导入依赖的package包/类
@Override
public void initialize() {
    entityManager = getSite().getSiteContext().getObject(EntityManager.class);

    final GridLayout gridLayout = new GridLayout(1, 2);
    gridLayout.setSizeFull();
    gridLayout.setMargin(false);
    gridLayout.setSpacing(true);
    gridLayout.setRowExpandRatio(1, 1f);
    setViewContent(gridLayout);

    auditLogEntryEditor = new ValidatingEditor(FieldSetDescriptorRegister.getFieldSetDescriptor(
            AuditLogEntry.class).getFieldDescriptors());
    auditLogEntryEditor.setReadOnly(true);
    auditLogEntryEditor.setCaption("AuditLogEntry");
    auditLogEntryEditor.addListener(this);
    gridLayout.addComponent(auditLogEntryEditor, 0, 0);

    final HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSpacing(true);
    gridLayout.addComponent(buttonLayout, 0, 1);

}
 
开发者ID:bubblecloud,项目名称:ilves,代码行数:24,代码来源:AuditLogEntryFlowlet.java


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