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


Java Orientation類代碼示例

本文整理匯總了Java中org.kuali.rice.krad.uif.UifConstants.Orientation的典型用法代碼示例。如果您正苦於以下問題:Java Orientation類的具體用法?Java Orientation怎麽用?Java Orientation使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Orientation類屬於org.kuali.rice.krad.uif.UifConstants包,在下文中一共展示了Orientation類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BoxLayoutManager

import org.kuali.rice.krad.uif.UifConstants.Orientation; //導入依賴的package包/類
public BoxLayoutManager() {
    super();

    itemStyle = "";
    orientation = Orientation.HORIZONTAL;
    itemStyleClasses = new ArrayList<String>();
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:BoxLayoutManager.java

示例2: performFinalize

import org.kuali.rice.krad.uif.UifConstants.Orientation; //導入依賴的package包/類
/**
 * Sets the item span style
 *
 * @see org.kuali.rice.krad.uif.layout.LayoutManagerBase#performFinalize(org.kuali.rice.krad.uif.view.View,
 *      java.lang.Object, org.kuali.rice.krad.uif.container.Container)
 */
@Override
public void performFinalize(View view, Object model, Container container) {
    super.performFinalize(view, model, container);

    if (StringUtils.isBlank(itemStyle)) {
        itemStyle = "";
    }

    if (StringUtils.isNotEmpty(padding)) {
        if (orientation.equals(Orientation.VERTICAL)) {
            // set item to block which will cause a line break and margin
            // bottom for padding
            itemStyle += CssConstants.getCssStyle(Padding.PADDING_BOTTOM, padding);
        } else {
            // set margin right for padding
            itemStyle += CssConstants.getCssStyle(Padding.PADDING_RIGHT, padding);
        }
    }

    // classes to identify this layout in jQuery and to clear the float correctly in all browsers
    this.addStyleClass("clearfix");

    for (Component c : container.getItems()) {
        if (c != null) {
            // add item styles to the the item
            List<String> styleClasses = c.getCssClasses();
            if (orientation.equals(Orientation.HORIZONTAL)) {
                styleClasses.add("uif-boxLayoutHorizontalItem");
                styleClasses.addAll(this.getItemStyleClasses());
            } else {
                styleClasses.add("uif-boxLayoutVerticalItem");
                styleClasses.addAll(this.getItemStyleClasses());
                styleClasses.add("clearfix");
            }
            c.setCssClasses(styleClasses);

            if (c.getStyle() != null && !c.getStyle().endsWith(";")) {
                c.appendToStyle(";" + this.getItemStyle());
            } else {
                c.appendToStyle(this.getItemStyle());
            }
        }
    }
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:51,代碼來源:BoxLayoutManager.java

示例3: getOrientation

import org.kuali.rice.krad.uif.UifConstants.Orientation; //導入依賴的package包/類
/**
 * Indicates whether the components should be rendered in a horizontal or
 * vertical column
 *
 * @return orientation configured for layout
 */
@BeanTagAttribute
public Orientation getOrientation() {
    return this.orientation;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:11,代碼來源:BoxLayoutManager.java

示例4: setOrientation

import org.kuali.rice.krad.uif.UifConstants.Orientation; //導入依賴的package包/類
/**
 * Setter for the orientation for layout
 *
 * @param orientation
 */
public void setOrientation(Orientation orientation) {
    this.orientation = orientation;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:BoxLayoutManager.java

示例5: getOrientation

import org.kuali.rice.krad.uif.UifConstants.Orientation; //導入依賴的package包/類
/**
 * Indicates whether the components should be rendered in a horizontal or
 * vertical column
 *
 * @return orientation configured for layout
 */
@BeanTagAttribute(name = "orientation", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
public Orientation getOrientation() {
    return this.orientation;
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:11,代碼來源:BoxLayoutManager.java


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