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


Java ComponentBase类代码示例

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


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

示例1: testCopyUsingCloningWithSimpleCollectionGroupSucceeds

import org.kuali.rice.krad.uif.component.ComponentBase; //导入依赖的package包/类
/**
 * test {@link ComponentUtils#copyUsingCloning} using a CollectionGroup object
 */
@Test
public void testCopyUsingCloningWithSimpleCollectionGroupSucceeds() {
    CollectionGroup collectionGroupOriginal = initializeCollectionGroup();
    CollectionGroup collectionGroupCopy = CopyUtils.copy(collectionGroupOriginal);

    assertTrue(ComponentCopyPropertiesMatch(collectionGroupOriginal, collectionGroupCopy));

    for (int i = 0; i < collectionGroupOriginal.getAddLineItems().size(); i++) {
        assertTrue(ComponentCopyPropertiesMatch(
                CopyUtils.unwrap((ComponentBase) collectionGroupOriginal.getAddLineItems().get(i)),
                CopyUtils.unwrap((ComponentBase) collectionGroupCopy.getAddLineItems().get(i))));
    }

    for (int i = 0; i < collectionGroupOriginal.getAddLineActions().size(); i++) {
        assertTrue(ComponentCopyPropertiesMatch(
                CopyUtils.unwrap((Component) collectionGroupOriginal.getAddLineActions().get(i)),
                CopyUtils.unwrap((Component) collectionGroupCopy.getAddLineActions().get(i))));
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:ComponentUtilsTest.java

示例2: addCellStyling

import org.kuali.rice.krad.uif.component.ComponentBase; //导入依赖的package包/类
/**
 * Add the css style to the cellCssClasses by column index, later used by the aoColumnDefs
 *
 * @param manager the tableLayoutManager that contains the original fields
 */
private void addCellStyling(TableLayoutManager manager) {
    if (!CollectionUtils.isEmpty(manager.getAllRowFields())) {
        for (int index = 0; index < manager.getNumberOfColumns(); index++) {
            String cellStyleClasses = ((ComponentBase) manager.getAllRowFields().get(index))
                    .getWrapperCssClassesAsString();
            if (StringUtils.isNotBlank(cellStyleClasses)) {
                cellCssClasses.add(cellStyleClasses);
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:RichTable.java

示例3: addCellStyling

import org.kuali.rice.krad.uif.component.ComponentBase; //导入依赖的package包/类
/**
 * Add the css style to the cellCssClasses by column index, later used by the aoColumnDefs
 *
 * @param manager the tableLayoutManager that contains the original fields
 */
private void addCellStyling(TableLayoutManager manager) {
    if (manager.getAllRowFields() != null) {
        for (int index = 0; index < manager.getNumberOfColumns(); index++) {
            String cellStyleClasses = ((ComponentBase) manager.getAllRowFields().get(index))
                    .getCellStyleClassesAsString();
            cellCssClasses.add(cellStyleClasses);
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:15,代码来源:RichTable.java

示例4: ComponentCopyPropertiesMatch

import org.kuali.rice.krad.uif.component.ComponentBase; //导入依赖的package包/类
private boolean ComponentCopyPropertiesMatch(ComponentBase originalComponent, ComponentBase copiedComponent) {
    boolean result = true;

    List<String> missingComponentsToRefresh = originalComponent.getAdditionalComponentsToRefresh();
    missingComponentsToRefresh.removeAll(copiedComponent.getAdditionalComponentsToRefresh());
    if (!missingComponentsToRefresh.isEmpty()) result = false;

    List<String> missingAdditionalCssClasses = originalComponent.getAdditionalCssClasses();
    missingAdditionalCssClasses.removeAll(copiedComponent.getAdditionalCssClasses());
    if (!missingAdditionalCssClasses.isEmpty()) result = false;

    if (!originalComponent.getAlign().equals(copiedComponent.getAlign())) result = false;

    List<String> missingCellCssClasses = originalComponent.getCellCssClasses();
    missingCellCssClasses.removeAll(copiedComponent.getCellCssClasses());
    if (!missingCellCssClasses.isEmpty()) result = false;

    if (!originalComponent.getCellStyle().equals(copiedComponent.getCellStyle())) result = false;
    if (!originalComponent.getCellWidth().equals(copiedComponent.getCellWidth())) result = false;
    if (originalComponent.getColSpan() != copiedComponent.getColSpan()) result = false;
    if (!originalComponent.getConditionalRefresh().equals(copiedComponent.getConditionalRefresh())) result = false;

    List<String> missingCssClasses = originalComponent.getCssClasses();
    missingCssClasses.removeAll(copiedComponent.getCssClasses());
    if (!missingCssClasses.isEmpty()) result = false;

    Set dataAttributes = new HashSet(originalComponent.getDataAttributes().values());
    dataAttributes.removeAll(copiedComponent.getDataAttributes().values());
    if (!dataAttributes.isEmpty()) result = false;

    if (!originalComponent.getFinalizeMethodToCall().equals(copiedComponent.getFinalizeMethodToCall())) result = false;
    if (!originalComponent.getMethodToCallOnRefresh().equals(copiedComponent.getMethodToCallOnRefresh())) result = false;
    if (!originalComponent.getOnBlurScript().equals(copiedComponent.getOnBlurScript())) result = false;
    if (!originalComponent.getOnChangeScript().equals(copiedComponent.getOnChangeScript())) result = false;
    if (!originalComponent.getOnClickScript().equals(copiedComponent.getOnClickScript())) result = false;
    if (!originalComponent.getOnCloseScript().equals(copiedComponent.getOnCloseScript())) result = false;
    if (!originalComponent.getOnDblClickScript().equals(copiedComponent.getOnDblClickScript())) result = false;
    if (!originalComponent.getOnDocumentReadyScript().equals(copiedComponent.getOnDocumentReadyScript())) result = false;
    if (!originalComponent.getOnFocusScript().equals(copiedComponent.getOnFocusScript())) result = false;
    if (!originalComponent.getOnKeyDownScript().equals(copiedComponent.getOnKeyDownScript())) result = false;
    if (!originalComponent.getOnKeyPressScript().equals(copiedComponent.getOnKeyPressScript())) result = false;
    if (!originalComponent.getOnKeyUpScript().equals(copiedComponent.getOnKeyUpScript())) result = false;
    if (!originalComponent.getOnLoadScript().equals(copiedComponent.getOnLoadScript())) result = false;
    if (!originalComponent.getOnMouseDownScript().equals(copiedComponent.getOnMouseDownScript())) result = false;
    if (!originalComponent.getOnMouseMoveScript().equals(copiedComponent.getOnMouseMoveScript())) result = false;
    if (!originalComponent.getOnMouseOutScript().equals(copiedComponent.getOnMouseOutScript())) result = false;
    if (!originalComponent.getOnMouseOverScript().equals(copiedComponent.getOnMouseOverScript())) result = false;
    if (!originalComponent.getOnMouseUpScript().equals(copiedComponent.getOnMouseUpScript())) result = false;
    if (!originalComponent.getOnSubmitScript().equals(copiedComponent.getOnSubmitScript())) result = false;
    if (!originalComponent.getOnUnloadScript().equals(copiedComponent.getOnUnloadScript())) result = false;
    if (originalComponent.getOrder() != copiedComponent.getOrder()) result = false;
    if (!originalComponent.getPostRenderContent().equals(copiedComponent.getPostRenderContent())) result = false;
    if (!originalComponent.getPreRenderContent().equals(copiedComponent.getPreRenderContent())) result = false;
    if (!originalComponent.getProgressiveRender().equals(copiedComponent.getProgressiveRender())) result = false;
    if (originalComponent.getRequired() != copiedComponent.getRequired()) result = false;
    if (originalComponent.getRefreshTimer() != copiedComponent.getRefreshTimer()) result = false;

    List<String> missingRefreshWhenChangedPropertyNames = originalComponent.getRefreshWhenChangedPropertyNames();
    missingRefreshWhenChangedPropertyNames.removeAll(copiedComponent.getRefreshWhenChangedPropertyNames());
    if (!missingRefreshWhenChangedPropertyNames.isEmpty()) result = false;

    if (!originalComponent.getRenderedHtmlOutput().equals(copiedComponent.getRenderedHtmlOutput())) result = false;
    if (originalComponent.getRowSpan() != copiedComponent.getRowSpan()) result = false;
    if (!originalComponent.getStyle().equals(copiedComponent.getStyle())) result = false;
    if (!originalComponent.getTemplate().equals(copiedComponent.getTemplate())) result = false;
    if (!originalComponent.getTemplateName().equals(copiedComponent.getTemplateName())) result = false;

    Set templateOptions = new HashSet(originalComponent.getTemplateOptions().values());
    templateOptions.removeAll(copiedComponent.getTemplateOptions().values());
    if (!templateOptions.isEmpty()) result = false;

    if (!originalComponent.getTemplateOptionsJSString().equals(copiedComponent.getTemplateOptionsJSString())) result = false;
    if (!originalComponent.getTitle().equals(copiedComponent.getTitle())) result = false;
    if (!originalComponent.getValign().equals(copiedComponent.getValign())) result = false;
    if (!originalComponent.getWidth().equals(copiedComponent.getWidth())) result = false;

    return result;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:79,代码来源:ComponentUtilsTest.java


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