本文整理汇总了Java中com.vaadin.ui.GridLayout.setColumnExpandRatio方法的典型用法代码示例。如果您正苦于以下问题:Java GridLayout.setColumnExpandRatio方法的具体用法?Java GridLayout.setColumnExpandRatio怎么用?Java GridLayout.setColumnExpandRatio使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.GridLayout
的用法示例。
在下文中一共展示了GridLayout.setColumnExpandRatio方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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);
}
示例3: 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;
}
示例4: RowLayout
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
private RowLayout(Step step) {
this.step = step;
label = getLabelProvider().getStepLabel(step);
divider = new CssLayout();
divider.addStyleName(STYLE_DIVIDER);
divider.setHeight(100, Unit.PERCENTAGE);
contentContainer = new Panel();
contentContainer.addStyleName(STYLE_CONTENT_CONTAINER);
contentContainer.addStyleName(ValoTheme.PANEL_BORDERLESS);
contentContainer.setSizeFull();
buttonBar = new HorizontalLayout();
buttonBar.addStyleName(STYLE_BUTTON_BAR);
buttonBar.setMargin(false);
buttonBar.setSpacing(true);
buttonBar.setWidth(100, Unit.PERCENTAGE);
buttonBar.setMargin(new MarginInfo(false, false, !isLastStep(step), false));
rootLayout = new GridLayout(2, 3);
rootLayout.setSizeFull();
rootLayout.setMargin(false);
rootLayout.setSpacing(false);
rootLayout.setColumnExpandRatio(1, 1);
rootLayout.setRowExpandRatio(1, 1);
rootLayout.addComponent(label, 0, 0, 1, 0);
rootLayout.addComponent(divider, 0, 1, 0, 2);
rootLayout.addComponent(contentContainer, 1, 1, 1, 1);
rootLayout.addComponent(buttonBar, 1, 2, 1, 2);
setCompositionRoot(rootLayout);
addStyleName(STYLE_COMPONENT);
setWidth(100, Unit.PERCENTAGE);
setActive(false);
}
示例5: getRootLayout
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
private GridLayout getRootLayout() {
GridLayout layout = new GridLayout(3, 2);
layout.setDefaultComponentAlignment(Alignment.TOP_LEFT);
layout.setMargin(new MarginInfo(false, true, true, true));
layout.setSpacing(true);
layout.setSizeFull();
layout.setRowExpandRatio(1, 1);
layout.setColumnExpandRatio(2, 1);
return layout;
}
示例6: getPrognoseMethodenInfos
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
private VerticalLayout getPrognoseMethodenInfos () {
VerticalLayout vl = new VerticalLayout();
infoText0 = new Label ("<h1>Prognosemethode</h1>");
infoText0.setContentMode(Label.CONTENT_XHTML);
infoText1 = new Label ("<h2>Methode zur Parametereingabe</h2>");
infoText1.setContentMode(Label.CONTENT_XHTML);
gl = new GridLayout(2,4);
gl.setSizeFull();
gl.setColumnExpandRatio(1, 1.0f);
gl.addComponent(iconStochastic, 0, 0);
gl.setComponentAlignment(iconStochastic, Alignment.MIDDLE_CENTER);
gl.addComponent(stochasticHeadline, 1, 0);
gl.addComponent(stochasticText, 1,1);
gl.addComponent(iconDeterministic,0, 2);
gl.setComponentAlignment(iconDeterministic, Alignment.MIDDLE_CENTER);
gl.addComponent(deterministicHeadline, 1,2);
gl.addComponent(deterministicText, 1, 3);
vl.addComponent(infoText0);
vl.addComponent(infoText1);
vl.addComponent(gl);
return vl;
}
示例7: getBerechnungsMethodeInfo
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
private VerticalLayout getBerechnungsMethodeInfo () {
VerticalLayout vl = new VerticalLayout();
headline0 = new Label ("<h1>Berechnungsmethoden</h1>");
headline0.setContentMode(Label.CONTENT_XHTML);
headline1 = new Label ("<h2>Methode zur Prognoseerstellung</h2>");
headline1.setContentMode(Label.CONTENT_XHTML);
gl = new GridLayout (2,6);
gl.setSizeFull();
gl.setColumnExpandRatio(1, 1.0f);
gl.addComponent(iconAPV, 0, 0);
gl.setComponentAlignment(iconAPV, Alignment.MIDDLE_CENTER);
gl.addComponent(apvHeadline, 1, 0);
gl.addComponent(apvText, 1, 1);
// gl.addComponent(iconFTE, 0, 2);
// gl.setComponentAlignment(iconFTE, Alignment.MIDDLE_CENTER);
// gl.addComponent(fteHeadline, 1, 2);
// gl.addComponent(fteText, 1, 3);
//
// gl.addComponent(iconWACC, 0 , 4);
// gl.setComponentAlignment(iconWACC, Alignment.MIDDLE_CENTER);
// gl.addComponent(waccHeadline, 1, 4);
// gl.addComponent(waccText, 1, 5);
vl.addComponent(headline0);
vl.addComponent(headline1);
vl.addComponent(gl);
return vl;
}
示例8: createMainLayout
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
private void createMainLayout() {
mainLayout = new GridLayout(4, 2);
mainLayout.setSizeFull();
mainLayout.setSpacing(true);
mainLayout.addComponent(filterByDSTypeLayout, 0, 0);
mainLayout.addComponent(distributionTableLayout, 1, 0);
mainLayout.addComponent(softwareModuleTableLayout, 2, 0);
mainLayout.addComponent(filterBySMTypeLayout, 3, 0);
mainLayout.addComponent(deleteActionsLayout, 1, 1, 2, 1);
mainLayout.setRowExpandRatio(0, 1.0F);
mainLayout.setColumnExpandRatio(1, 0.5F);
mainLayout.setColumnExpandRatio(2, 0.5F);
mainLayout.setComponentAlignment(deleteActionsLayout, Alignment.BOTTOM_CENTER);
}
示例9: initComponentLayout
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
protected void initComponentLayout() {
selectedComponentLayout = new GridLayout(1,2);
selectedComponentLayout.setSizeFull();
selectedComponentLayout.setMargin(true);
selectedComponentLayout.setSpacing(true);
selectedComponentLayout.addStyleName(ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_DETAIL);
windowLayout.addComponent(selectedComponentLayout);
windowLayout.setExpandRatio(selectedComponentLayout, 1.0f);
selectedComponentLayout.setRowExpandRatio(0, 1.0f);
selectedComponentLayout.setColumnExpandRatio(0, 1.0f);
}
示例10: CreateAttachmentPopupWindow
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
public CreateAttachmentPopupWindow() {
this.i18nManager = ExplorerApp.get().getI18nManager();
this.attachmentRendererManager = ExplorerApp.get().getAttachmentRendererManager();
this.taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
setCaption(i18nManager.getMessage(Messages.RELATED_CONTENT_ADD));
setWidth(700, UNITS_PIXELS);
setHeight(430, UNITS_PIXELS);
center();
setModal(true);
addStyleName(Reindeer.WINDOW_LIGHT);
layout = new HorizontalLayout();
layout.setSpacing(false);
layout.setMargin(true);
layout.setSizeFull();
setContent(layout);
initTable();
detailLayout = new GridLayout(1,2);
detailLayout.setSizeFull();
detailLayout.setMargin(true);
detailLayout.setSpacing(true);
detailLayout.addStyleName(ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_DETAIL);
layout.addComponent(detailLayout);
layout.setExpandRatio(detailLayout, 1.0f);
detailLayout.setRowExpandRatio(0, 1.0f);
detailLayout.setColumnExpandRatio(0, 1.0f);
initActions();
}
示例11: addDeploymentName
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
protected void addDeploymentName() {
GridLayout taskDetails = new GridLayout(3, 2);
taskDetails.setWidth(100, UNITS_PERCENTAGE);
taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
taskDetails.setSpacing(true);
taskDetails.setMargin(false, false, true, false);
// Add image
Embedded image = new Embedded(null, Images.DEPLOYMENT_50);
taskDetails.addComponent(image, 0, 0, 0, 1);
// Add deployment name
Label nameLabel = new Label();
if(deployment.getName() != null) {
nameLabel.setValue(deployment.getName());
} else {
nameLabel.setValue(i18nManager.getMessage(Messages.DEPLOYMENT_NO_NAME));
}
nameLabel.addStyleName(Reindeer.LABEL_H2);
taskDetails.addComponent(nameLabel, 1, 0, 2, 0);
// Add deploy time
PrettyTimeLabel deployTimeLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.DEPLOYMENT_DEPLOY_TIME),
deployment.getDeploymentTime(), null, true);
deployTimeLabel.addStyleName(ExplorerLayout.STYLE_DEPLOYMENT_HEADER_DEPLOY_TIME);
taskDetails.addComponent(deployTimeLabel, 1, 1);
taskDetails.setColumnExpandRatio(1, 1.0f);
taskDetails.setColumnExpandRatio(2, 1.0f);
addDetailComponent(taskDetails);
}
示例12: addHeader
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
protected void addHeader() {
GridLayout taskDetails = new GridLayout(3, 2);
taskDetails.setWidth(100, UNITS_PERCENTAGE);
taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
taskDetails.setSpacing(true);
taskDetails.setMargin(false, false, true, false);
// Add image
Embedded image = new Embedded(null, Images.JOB_50);
taskDetails.addComponent(image, 0, 0, 0, 1);
// Add job name
Label nameLabel = new Label(getJobLabel(job));
nameLabel.addStyleName(Reindeer.LABEL_H2);
taskDetails.addComponent(nameLabel, 1, 0, 2, 0);
// Add due date
PrettyTimeLabel dueDateLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.JOB_DUEDATE),
job.getDuedate(), i18nManager.getMessage(Messages.JOB_NO_DUEDATE), false);
dueDateLabel.addStyleName(ExplorerLayout.STYLE_JOB_HEADER_DUE_DATE);
taskDetails.addComponent(dueDateLabel, 1, 1);
taskDetails.setColumnExpandRatio(1, 1.0f);
taskDetails.setColumnExpandRatio(2, 1.0f);
addDetailComponent(taskDetails);
}
示例13: addHeader
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
protected void addHeader() {
GridLayout header = new GridLayout(3, 2);
header.setWidth(100, UNITS_PERCENTAGE);
header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
header.setSpacing(true);
header.setMargin(false, false, true, false);
// Add image
Embedded image = new Embedded(null, Images.PROCESS_50);
header.addComponent(image, 0, 0, 0, 1);
// Add task name
Label nameLabel = new Label(getProcessDisplayName(processDefinition, processInstance));
nameLabel.addStyleName(Reindeer.LABEL_H2);
header.addComponent(nameLabel, 1, 0, 2, 0);
// Add start time
PrettyTimeLabel startTimeLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.PROCESS_START_TIME),
historicProcessInstance.getStartTime(), null, true);
startTimeLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_START_TIME);
header.addComponent(startTimeLabel, 1, 1);
header.setColumnExpandRatio(1, 1.0f);
header.setColumnExpandRatio(2, 1.0f);
panelLayout.addComponent(header);
}
示例14: initHeader
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
protected void initHeader() {
GridLayout details = new GridLayout(2, 2);
details.setWidth(100, UNITS_PERCENTAGE);
details.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
details.setSpacing(true);
details.setMargin(false, false, true, false);
details.setColumnExpandRatio(1, 1.0f);
detailPanelLayout.addComponent(details);
// Image
Embedded image = new Embedded(null, Images.PROCESS_50);
details.addComponent(image, 0, 0, 0, 1);
// Name
Label nameLabel = new Label(getProcessDisplayName(processDefinition));
nameLabel.addStyleName(Reindeer.LABEL_H2);
details.addComponent(nameLabel, 1, 0);
// Properties
HorizontalLayout propertiesLayout = new HorizontalLayout();
propertiesLayout.setSpacing(true);
details.addComponent(propertiesLayout);
// Version
String versionString = i18nManager.getMessage(Messages.PROCESS_VERSION, processDefinition.getVersion());
Label versionLabel = new Label(versionString);
versionLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_VERSION);
propertiesLayout.addComponent(versionLabel);
// Add deploy time
PrettyTimeLabel deployTimeLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.PROCESS_DEPLOY_TIME),
deployment.getDeploymentTime(), null, true);
deployTimeLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_DEPLOY_TIME);
propertiesLayout.addComponent(deployTimeLabel);
}
示例15: initSubTasksLayout
import com.vaadin.ui.GridLayout; //导入方法依赖的package包/类
protected void initSubTasksLayout() {
subTaskLayout = new GridLayout();
subTaskLayout.setColumns(3);
subTaskLayout.addStyleName(ExplorerLayout.STYLE_TASK_SUBTASKS_LIST);
subTaskLayout.setWidth(99, UNITS_PERCENTAGE);
subTaskLayout.setColumnExpandRatio(2, 1.0f);
subTaskLayout.setSpacing(true);
layout.addComponent(subTaskLayout);
}