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


Java CheckboxGroupControl類代碼示例

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


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

示例1: getDataFieldColumnOptions

import org.kuali.rice.krad.uif.control.CheckboxGroupControl; //導入依賴的package包/類
/**
 * Construct the column options for a data field
 *
 * @param collectionGroup the collectionGroup in which the data field is defined
 * @param field the field to construction options for
 * @return options as valid for datatable
 */
protected String getDataFieldColumnOptions(int target, CollectionGroup collectionGroup, DataField field) {
    String sortType = null;

    if (!collectionGroup.isReadOnly()
            && (field instanceof InputField)
            && ((InputField) field).getControl() != null) {
        Control control = ((InputField) field).getControl();
        if (control instanceof SelectControl) {
            sortType = UifConstants.TableToolsValues.DOM_SELECT;
        } else if (control instanceof CheckboxControl || control instanceof CheckboxGroupControl) {
            sortType = UifConstants.TableToolsValues.DOM_CHECK;
        } else if (control instanceof RadioGroupControl) {
            sortType = UifConstants.TableToolsValues.DOM_RADIO;
        } else {
            sortType = UifConstants.TableToolsValues.DOM_TEXT;
        }
    } else {
        sortType = UifConstants.TableToolsValues.DOM_TEXT;
    }

    Class dataTypeClass = ObjectPropertyUtils.getPropertyType(collectionGroup.getCollectionObjectClass(),
            field.getPropertyName());

    return constructTableColumnOptions(target, true, dataTypeClass, sortType);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:33,代碼來源:RichTable.java

示例2: getDataFieldColumnOptions

import org.kuali.rice.krad.uif.control.CheckboxGroupControl; //導入依賴的package包/類
/**
 * Construct the column options for a data field
 *
 * @param target column index
 * @param collectionGroup the collectionGroup in which the data field is defined
 * @param field the field to construction options for
 * @return options as valid for datatable
 */
protected String getDataFieldColumnOptions(int target, CollectionGroup collectionGroup, DataField field) {
    String sortDataType = null;

    if (!Boolean.TRUE.equals(collectionGroup.getReadOnly())
            && (field instanceof InputField)
            && ((InputField) field).getControl() != null) {
        Control control = ((InputField) field).getControl();
        if (control instanceof SelectControl) {
            sortDataType = UifConstants.TableToolsValues.DOM_SELECT;
        } else if (control instanceof CheckboxControl || control instanceof CheckboxGroupControl) {
            sortDataType = UifConstants.TableToolsValues.DOM_CHECK;
        } else if (control instanceof RadioGroupControl) {
            sortDataType = UifConstants.TableToolsValues.DOM_RADIO;
        } else {
            sortDataType = UifConstants.TableToolsValues.DOM_TEXT;
        }
    } else {
        sortDataType = UifConstants.TableToolsValues.DOM_TEXT;
    }

    Class<?> dataTypeClass = ObjectPropertyUtils.getPropertyType(collectionGroup.getCollectionObjectClass(),
            field.getPropertyName());
    // check to see if field has custom sort type
    if (field.getSortAs() != null && field.getSortAs().length() > 0) {
        if (field.getSortAs().equals(UifConstants.TableToolsValues.CURRENCY)) {
            dataTypeClass = KualiDecimal.class;
        } else if (field.getSortAs().equals(UifConstants.TableToolsValues.DATE)) {
            dataTypeClass = java.sql.Date.class;
        } else if (field.getSortAs().equals(UifConstants.TableToolsValues.NUMERIC)) {
            dataTypeClass = Number.class;
        } else if (field.getSortAs().equals(UifConstants.TableToolsValues.STRING)) {
            dataTypeClass = String.class;
        }
    }

    boolean isSortable = true;
    if (field.isApplyMask()) {
        isSortable = false;
    }

    return constructTableColumnOptions(target, isSortable, collectionGroup.isUseServerPaging(), dataTypeClass,
            sortDataType);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:52,代碼來源:RichTable.java

示例3: getCheckboxGroupControl

import org.kuali.rice.krad.uif.control.CheckboxGroupControl; //導入依賴的package包/類
/**
 * Retrieves a new checkbox group control instance from Spring (initialized by the bean definition
 * with the given id)
 *
 * <p>
 * Return checkbox group set for vertical orientation
 * </p>
 *
 * @return CheckboxGroupControl
 */
public static CheckboxGroupControl getCheckboxGroupControl() {
    return (CheckboxGroupControl) getNewComponentInstance(CHECKBOX_GROUP_CONTROL);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:ComponentFactory.java

示例4: getCheckboxGroupControlHorizontal

import org.kuali.rice.krad.uif.control.CheckboxGroupControl; //導入依賴的package包/類
/**
 * Retrieves a new checkbox group control instance from Spring (initialized by the bean definition
 * with the given id)
 *
 * <p>
 * Return checkbox group set for horizontal orientation
 * </p>
 *
 * @return CheckboxGroupControl
 */
public static CheckboxGroupControl getCheckboxGroupControlHorizontal() {
    return (CheckboxGroupControl) getNewComponentInstance(CHECKBOX_GROUP_CONTROL_HORIZONTAL);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:ComponentFactory.java


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