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


Java CssConstants类代码示例

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


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

示例1: performFinalize

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * The following is performed:
 *
 * <ul>
 * <li>If the active tab id is configured, set the active plugin option</li>
 * </ul>
 */
@Override
public void performFinalize(Object model, LifecycleElement parent) {
    super.performFinalize(model, parent);

    if (parent instanceof TabGroup) {
        if (position.equals(UifConstants.Position.LEFT) || position.equals(UifConstants.Position.RIGHT)) {
            tabNavClass = tabNavClass + " col-sm-3";
            tabContentClass = tabContentClass + " col-sm-9";
        }

        if (position.equals(UifConstants.Position.LEFT)) {
            ((TabGroup) parent).addStyleClass(CssConstants.Tabs.TABS_LEFT);
        } else if (position.equals(UifConstants.Position.RIGHT)) {
            ((TabGroup) parent).addStyleClass(CssConstants.Tabs.TABS_RIGHT);
        } else if (position.equals(UifConstants.Position.BOTTOM)) {
            ((TabGroup) parent).addStyleClass(CssConstants.Tabs.TABS_BOTTOM);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:Tabs.java

示例2: performFinalize

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Finalize the help widget for usage
 *
 * <p>
 * In addition to the standard finalization the following tasks are performed:
 * <li>Build the external help Url</li>
 * <li>Set the javascript action which opens the external help in window</li>
 * <li>Set render to false if help not configured</li>
 * </p>
 *
 * {@inheritDoc}
 */
@Override
public void performFinalize(Object model, LifecycleElement parent) {
    super.performFinalize(model, parent);

    buildExternalHelp(parent);
    buildTooltipHelp(parent);

    // if help is not configured don't render the component
    if (StringUtils.isBlank(this.externalHelpUrl) && StringUtils.isBlank(this.tooltipHelpContent)) {
        setRender(false);
    }

    // Change to icon only look and feel if not associated with an input
    if (parent != null && !(parent instanceof InputField) && helpAction != null) {
        helpAction.getLibraryCssClasses().remove(CssConstants.Classes.BTN);
        helpAction.getLibraryCssClasses().remove(CssConstants.Classes.BTN_DEFAULT);
        helpAction.getLibraryCssClasses().add(CssConstants.Classes.ICON_ONLY_BUTTON);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:Help.java

示例3: getCssClassString

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Gets the css class string to use on the cell div of this item, by concatnating the appropriate css
 * classes based on the size values set on this object
 *
 * @return the css class string that represents the size of the "cell" div for this item at different screen sizes
 */
public String getCssClassString() {
    if (cssClassString != null) {
        return cssClassString;
    }

    cssClassString = "";

    concatenateSizeStyle(xsSize, CssConstants.CssGrid.XS_COL_PREFIX, 1);

    concatenateSizeStyle(smSize, CssConstants.CssGrid.SM_COL_PREFIX, 1);
    concatenateSizeStyle(smOffset, CssConstants.CssGrid.SM_OFFSET_PREFIX, 0);

    concatenateSizeStyle(mdSize, CssConstants.CssGrid.MD_COL_PREFIX, 1);
    concatenateSizeStyle(mdOffset, CssConstants.CssGrid.MD_OFFSET_PREFIX, 0);

    concatenateSizeStyle(lgSize, CssConstants.CssGrid.LG_COL_PREFIX, 1);
    concatenateSizeStyle(lgOffset, CssConstants.CssGrid.LG_OFFSET_PREFIX, 0);

    cssClassString = cssClassString.trim();

    return cssClassString;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:CssGridSizes.java

示例4: buildActionColumn

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Creates a field group instance that contains the actions for the row.
 *
 * <p>Field group is created by copying
 * {@link org.kuali.rice.krad.uif.layout.TableLayoutManager#getActionFieldPrototype()}, then the line
 * actions from the line context are moved to the field group</p>
 *
 * @return field group instance containing the actions
 */
protected FieldGroup buildActionColumn() {
    FieldGroup lineActionsField = ComponentUtils.copy(tableLayoutManager.getActionFieldPrototype(),
            lineBuilderContext.getIdSuffix());

    ContextUtils.updateContextForLine(lineActionsField, collectionGroup, lineBuilderContext.getCurrentLine(),
            lineBuilderContext.getLineIndex(), lineBuilderContext.getIdSuffix());

    // lineActionsField.setRowSpan(rowSpan);
    lineActionsField.setItems(lineBuilderContext.getLineActions());

    if (lineActionsField.getWrapperCssClasses() != null && !lineActionsField.getWrapperCssClasses().contains(
            CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS)) {
        lineActionsField.getWrapperCssClasses().add(CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS);
    } else {
        lineActionsField.setWrapperCssClasses(Arrays.asList(CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS));
    }

    // setCellAttributes(lineActionsField);

    return lineActionsField;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:TableRowBuilder.java

示例5: addActionColumn

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Creates a field group wrapper for the given actions based on
 * {@link TableLayoutManagerBase#getActionFieldPrototype()}.
 *
 * @param collectionGroup collection group being built
 * @param idSuffix id suffix for the action field
 * @param currentLine line object for the current line being built
 * @param lineIndex index of the line being built
 * @param rowSpan number of rows the action field should span
 * @param actions action components that should be to the field group
 */
protected void addActionColumn(CollectionGroup collectionGroup, String idSuffix, Object currentLine, int lineIndex,
        int rowSpan, List<? extends Component> actions) {
    FieldGroup lineActionsField = ComponentUtils.copy(getActionFieldPrototype(), idSuffix);

    ContextUtils.updateContextForLine(lineActionsField, collectionGroup, currentLine, lineIndex, idSuffix);

    lineActionsField.setRowSpan(rowSpan);
    lineActionsField.setItems(actions);
    if (lineActionsField.getWrapperCssClasses() != null && !lineActionsField.getWrapperCssClasses().contains(
            CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS)) {
        lineActionsField.getWrapperCssClasses().add(CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS);
    } else {
        lineActionsField.setWrapperCssClasses(Arrays.asList(CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS));
    }

    setCellAttributes(lineActionsField);

    allRowFields.add(lineActionsField);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:TableLayoutManagerBase.java

示例6: setControlValueToLineIdentifier

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
protected static void setControlValueToLineIdentifier(Field selectField, Object line, String lineBindingPath) {
    if (selectField instanceof InputField) {
        Control selectControl = ((InputField) selectField).getControl();

        if (selectControl != null) {
            selectControl.addStyleClass(CssConstants.Classes.SELECT_FIELD_STYLE_CLASS);

            if (selectControl instanceof ValueConfiguredControl) {
                String lineIdentifier
                        = KRADServiceLocatorWeb.getLegacyDataAdapter().getDataObjectIdentifierString(line);

                if (StringUtils.isBlank(lineIdentifier)) {
                    lineIdentifier = lineBindingPath;
                }

                ((ValueConfiguredControl) selectControl).setValue(lineIdentifier);
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:CollectionLayoutUtils.java

示例7: performFinalize

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Sets the supportTitleMessage if one has not been set and unified header is being used, based on the value
 * of page title
 *
 * {@inheritDoc}
 */
@Override
public void performFinalize(Object model, LifecycleElement parent) {
    super.performFinalize(model, parent);

    View view = ViewLifecycle.getView();
    if (supportTitleMessage != null &&
            view.getCurrentPage() != null && view.getCurrentPage().getHeader() != null &&
            view.isUnifiedHeader()) {
        Header pageHeader = view.getCurrentPage().getHeader();

        // hide page header text
        pageHeader.addStyleClass(CssConstants.Classes.HIDE_HEADER_TEXT_STYLE_CLASS);

        Message pageHeaderMessage = pageHeader.getRichHeaderMessage();

        if (pageHeaderMessage != null && StringUtils.isBlank(supportTitleMessage.getMessageText())) {
            pageHeaderMessage.addStyleClass(CssConstants.Classes.SUPPORT_TITLE_STYLE_CLASS);

            // use page header rich content
            supportTitleMessage = pageHeaderMessage;
        } else if (StringUtils.isNotBlank(pageHeader.getHeaderText()) && StringUtils.isBlank(
                supportTitleMessage.getMessageText())) {
            // use set page header text
            supportTitleMessage.setMessageText(pageHeader.getHeaderText().trim());
        }
    }

    // Add content container classes
    this.getCssClasses().addAll(0, view.getContentContainerCssClasses());

    // Add sticky data attribute marker
    if (this.isSticky()) {
        this.addDataAttribute(UifConstants.DataAttributes.STICKY, "true");
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:42,代码来源:ViewHeader.java

示例8: applyOnChangeForSave

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * If {@link CollectionGroup#isRenderSaveLineActions()} is true and the line has been added by the user, on change
 * script is added to any controls in the line to enable the save action.
 *
 * @param lineFields list of line fields
 */
protected void applyOnChangeForSave(List<Field> lineFields) {
    boolean isLineNewlyAdded = ((UifFormBase) lineBuilderContext.getModel()).isAddedCollectionItem(
            lineBuilderContext.getCurrentLine());
    boolean saveLineEnabled = lineBuilderContext.getCollectionGroup().isRenderSaveLineActions();

    if (!isLineNewlyAdded && !saveLineEnabled) {
        return;
    }

    for (Field field : lineFields) {
        boolean isInputField = (field instanceof InputField);
        if (field.isHidden() || Boolean.TRUE.equals(field.getReadOnly()) || !isInputField) {
            continue;
        }

        // if control null, assign default
        InputField inputField = (InputField) field;
        if (inputField.getControl() == null) {
            inputField.setControl(ComponentFactory.getTextControl());
        }

        ControlBase control = (ControlBase) ((InputField) field).getControl();

        String onBlurScript = UifConstants.JsFunctions.COLLECTION_LINE_CHANGED + "(this, '" +
                CssConstants.Classes.NEW_COLLECTION_ITEM + "');";
        onBlurScript = ScriptUtils.appendScript(control.getOnBlurScript(), onBlurScript);

        control.setOnBlurScript(onBlurScript);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:37,代码来源:CollectionGroupLineBuilder.java

示例9: setupAddLineControlValidation

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Add additional information to a field in the add line to allow for correct add control selection.
 *
 * @param lineField field instance for the line
 * @param selectors list of selectors
 * @param suffix id suffix to add
 */
protected void setupAddLineControlValidation(InputField lineField, List<String> selectors, String suffix) {
    Control control = lineField.getControl();

    // ignore automatic validation and grab the selector for manual validation
    if (control != null) {
        control.addStyleClass(CssConstants.Classes.IGNORE_VALID);
        selectors.add("#" + lineField.getId() + suffix);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:CollectionGroupLineBuilder.java

示例10: buildCSSforScrollPane

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
private void buildCSSforScrollPane(Component parent) {
    if (StringUtils.isNotBlank(getHeight())) {
        if (!StringUtils.contains(parent.getStyle(), CssConstants.HEIGHT)) {
            parent.appendToStyle(CssConstants.HEIGHT + getHeight() +";");
        }

        if (!StringUtils.contains(parent.getStyle(), CssConstants.OVERFLOW)) {
            parent.appendToStyle(CssConstants.OVERFLOW + "auto;");
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:Scrollpane.java

示例11: addLeftClearCssClass

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Adds a class (or classeees) which will clear the left float for wrapped content at each screen size, which
 * will prevent natural float from taking available space instead of wrapping to a new "row".
 *
 * @param cellCssClasses the set of css classes to add the left clear class to
 */
protected void addLeftClearCssClass(List<String> cellCssClasses) {
    String classString = getCellStyleClassesAsString(cellCssClasses);

    // We explicitly check for the col prefix to avoid unnecessary class additions since the clear will be
    // inherited from a smaller size screen if no size/offset has been specified for this size specifically
    // see KRAD css grid css
    if (lgTotalSize > 12) {
        if (classString.contains(CssConstants.CssGrid.LG_COL_PREFIX)) {
            cellCssClasses.add(0, CssConstants.CssGrid.LG_CLEAR_LEFT);
        }
        lgTotalSize = lgTotalSize - 12;
    }

    if (mdTotalSize > 12) {
        if (classString.contains(CssConstants.CssGrid.MD_COL_PREFIX)) {
            cellCssClasses.add(0, CssConstants.CssGrid.MD_CLEAR_LEFT);
        }
        mdTotalSize = mdTotalSize - 12;
    }

    if (smTotalSize > 12) {
        if (classString.contains(CssConstants.CssGrid.SM_COL_PREFIX)) {
            cellCssClasses.add(0, CssConstants.CssGrid.SM_CLEAR_LEFT);
        }
        smTotalSize = smTotalSize - 12;
    }

    if (xsTotalSize > 12) {
        cellCssClasses.add(0, CssConstants.CssGrid.XS_CLEAR_LEFT);
        xsTotalSize = xsTotalSize - 12;
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:39,代码来源:CssGridLayoutManagerBase.java

示例12: setCellAttributes

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Moves the width, align, and valign settings of the component to the corresponding cell properties (if not
 * already configured)
 *
 * @param component instance to adjust settings for
 */
protected void setCellAttributes(Component component) {
    if (StringUtils.isNotBlank(component.getWidth()) && StringUtils.isBlank(component.getCellWidth())) {
        component.setCellWidth(component.getWidth());
        component.setWidth("");
    }

    if (StringUtils.isNotBlank(component.getAlign()) && !StringUtils.contains(component.getWrapperStyle(),
            CssConstants.TEXT_ALIGN)) {
        if (component.getWrapperStyle() == null) {
            component.setWrapperStyle("");
        }

        component.setWrapperStyle(
                component.getWrapperStyle() + CssConstants.TEXT_ALIGN + component.getAlign() + ";");
        component.setAlign("");
    }

    if (StringUtils.isNotBlank(component.getValign()) && !StringUtils.contains(component.getWrapperStyle(),
            CssConstants.VERTICAL_ALIGN)) {
        if (component.getWrapperStyle() == null) {
            component.setWrapperStyle("");
        }

        component.setWrapperStyle(
                component.getWrapperStyle() + CssConstants.VERTICAL_ALIGN + component.getValign() + ";");
        component.setValign("");
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:35,代码来源:GridLayoutManagerBase.java

示例13: addActionHeader

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Adds the action header
 */
protected void addActionHeader(int rowCount, int cellPosition) {
    getActionFieldPrototype().setLabelRendered(true);
    getActionFieldPrototype().setRowSpan(rowCount);
    if (getActionFieldPrototype().getWrapperCssClasses() != null && !getActionFieldPrototype()
            .getWrapperCssClasses().contains(CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS)) {
        getActionFieldPrototype().getWrapperCssClasses().add(CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS);
    } else {
        getActionFieldPrototype().setWrapperCssClasses(Arrays.asList(
                CssConstants.Classes.ACTION_COLUMN_STYLE_CLASS));
    }

    addHeaderField(getActionFieldPrototype(), cellPosition);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:TableLayoutManagerBase.java

示例14: buildCSSforScrollPane

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
private void buildCSSforScrollPane(Component parent) {
    LayoutManager layoutManager = ((Group) parent).getLayoutManager();
    if (StringUtils.isNotBlank(getHeight())) {
        if (!StringUtils.contains(layoutManager.getStyle(), CssConstants.HEIGHT)) {
            layoutManager.appendToStyle(CssConstants.HEIGHT + getHeight() +";");
        }

        if (!StringUtils.contains(layoutManager.getStyle(), CssConstants.OVERFLOW)) {
            layoutManager.appendToStyle(CssConstants.OVERFLOW + "auto;");
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:13,代码来源:Scrollpane.java

示例15: setCellAttributes

import org.kuali.rice.krad.uif.CssConstants; //导入依赖的package包/类
/**
 * Moves the width, align, and valign settings of the component to the corresponding cell properties (if not
 * already configured)
 * 
 * @param component instance to adjust settings for
 */
protected void setCellAttributes(Component component) {
    if (StringUtils.isNotBlank(component.getWidth()) && StringUtils.isBlank(component.getCellWidth())) {
        component.setCellWidth(component.getWidth());
        component.setWidth("");
    }

    if (StringUtils.isNotBlank(component.getAlign()) && !StringUtils.contains(component.getCellStyle(),
            CssConstants.TEXT_ALIGN)) {
        if (component.getCellStyle() == null) {
            component.setCellStyle("");
        }

        component.setCellStyle(component.getCellStyle() + CssConstants.TEXT_ALIGN + component.getAlign() + ";");
        component.setAlign("");
    }

    if (StringUtils.isNotBlank(component.getValign()) && !StringUtils.contains(component.getCellStyle(),
            CssConstants.VERTICAL_ALIGN)) {
        if (component.getCellStyle() == null) {
            component.setCellStyle("");
        }

        component.setCellStyle(
                component.getCellStyle() + CssConstants.VERTICAL_ALIGN + component.getValign() + ";");
        component.setValign("");
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:34,代码来源:GridLayoutManager.java


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