本文整理匯總了Java中com.haulmont.cuba.web.toolkit.ui.CubaVerticalActionsLayout.setComponentAlignment方法的典型用法代碼示例。如果您正苦於以下問題:Java CubaVerticalActionsLayout.setComponentAlignment方法的具體用法?Java CubaVerticalActionsLayout.setComponentAlignment怎麽用?Java CubaVerticalActionsLayout.setComponentAlignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.haulmont.cuba.web.toolkit.ui.CubaVerticalActionsLayout
的用法示例。
在下文中一共展示了CubaVerticalActionsLayout.setComponentAlignment方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateSummaryColumn
import com.haulmont.cuba.web.toolkit.ui.CubaVerticalActionsLayout; //導入方法依賴的package包/類
protected void updateSummaryColumn() {
summaryBox.removeAll();
CubaVerticalActionsLayout summaryLayout = (CubaVerticalActionsLayout) WebComponentsHelper.unwrap(summaryBox);
CubaVerticalActionsLayout summaryCaptionVbox = new CubaVerticalActionsLayout();
summaryCaptionVbox.setHeight("30px");
summaryCaptionVbox.setWidth("100%");
com.vaadin.ui.Label summaryCaption = new com.vaadin.ui.Label();
summaryCaption.setContentMode(ContentMode.HTML);
summaryCaption.setValue(getMessage("label.summaryCaption"));
summaryCaption.setWidthUndefined();
summaryCaptionVbox.addComponent(summaryCaption);
summaryCaptionVbox.setComponentAlignment(summaryCaption, com.vaadin.ui.Alignment.MIDDLE_CENTER);
summaryLayout.addComponent(summaryCaptionVbox);
FactAndPlan[] summariesByWeeks = calculateSummariesByWeeks();
FactAndPlan summaryForMonth = new FactAndPlan();
for (int i = 1; i < summariesByWeeks.length; i++) {
com.vaadin.ui.Label hourLabel = new com.vaadin.ui.Label();
hourLabel.setContentMode(ContentMode.HTML);
FactAndPlan summaryForTheWeek = summariesByWeeks[i];
if (summaryForTheWeek == null) {
summaryForTheWeek = new FactAndPlan();
}
if (summaryForTheWeek.isMatch()) {
hourLabel.setValue(formatMessage("label.hoursSummary",
summaryForTheWeek.fact.getHours(), summaryForTheWeek.fact.getMinutes()));
} else {
hourLabel.setValue(formatMessage("label.hoursSummaryNotMatch",
summaryForTheWeek.fact.getHours(), summaryForTheWeek.fact.getMinutes(),
summaryForTheWeek.plan.getHours(), summaryForTheWeek.plan.getMinutes()));
hourLabel.addStyleName("overtime");
}
hourLabel.setWidthUndefined();
summaryLayout.addComponent(hourLabel);
summaryLayout.setExpandRatio(hourLabel, 1);
summaryLayout.setComponentAlignment(hourLabel, com.vaadin.ui.Alignment.MIDDLE_CENTER);
summaryForMonth.fact.add(summaryForTheWeek.fact);
summaryForMonth.plan.add(summaryForTheWeek.plan);
}
if (summaryForMonth.isMatch()) {
monthSummary.setValue(formatMessage("label.monthSummaryFormat",
summaryForMonth.fact.getHours(), summaryForMonth.fact.getMinutes()));
monthSummary.setStyleName("month-summary");
} else {
monthSummary.setValue(formatMessage("label.monthSummaryFormatNotMatch",
summaryForMonth.fact.getHours(), summaryForMonth.fact.getMinutes(),
summaryForMonth.plan.getHours(), summaryForMonth.plan.getMinutes()));
monthSummary.setStyleName("month-summary-overtime");
}
}