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


Java PaintException类代码示例

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


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

示例1: paintAdditionalData

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintAdditionalData(PaintTarget target) throws PaintException {
    if (reqFirstRowToPaint == -1 && items instanceof AggregationContainer && isAggregatable()
            && !((AggregationContainer) items).getAggregationPropertyIds().isEmpty() && isShowTotalAggregation()
            && Table.AggregationStyle.TOP.equals(getAggregationStyle())) {
        paintAggregationRow(target, ((AggregationContainer) items).aggregate(new Context(items.getItemIds())));
    }

    // paint cuba-ids

    AppUI current = AppUI.getCurrent();
    if (current != null && current.isTestMode()) {
        ArrayList<String> visibleColOrder = new ArrayList<>();
        for (Object columnId : visibleColumns) {
            if (!isColumnCollapsed(columnId)) {
                visibleColOrder.add(columnId.toString());
            }
        }
        target.addAttribute("colcubaids", visibleColOrder.toArray());
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:CubaTreeTable.java

示例2: paintAggregationRow

import com.vaadin.server.PaintException; //导入依赖的package包/类
protected void paintAggregationRow(PaintTarget target, Map<Object, Object> aggregations) throws PaintException {
    target.startTag("arow");
    for (final Object columnId : visibleColumns) {
        if (columnId == null || isColumnCollapsed(columnId)) {
            continue;
        }

        if (getCellStyleGenerator() != null) {
            String cellStyle = getCellStyleGenerator().getStyle(this, null, columnId);
            if (cellStyle != null && !cellStyle.equals("")) {
                target.addAttribute("style-"
                        + columnIdMap.key(columnId), cellStyle + "-ag");
            }
        }

        String value = (String) aggregations.get(columnId);
        target.addText(value);
    }
    target.endTag("arow");
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:21,代码来源:CubaTreeTable.java

示例3: paintAdditionalData

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintAdditionalData(PaintTarget target) throws PaintException {
    if (reqFirstRowToPaint == -1) {
        boolean hasAggregation = items instanceof AggregationContainer && isAggregatable()
                && !((AggregationContainer) items).getAggregationPropertyIds().isEmpty();

        if (hasAggregation && isShowTotalAggregation()
                && Table.AggregationStyle.TOP.equals(getAggregationStyle())) {
            Context context = new Context(getAggregationItemIds());
            paintAggregationRow(target, ((AggregationContainer) items).aggregate(context));
        }
    }

    // paint cuba-ids

    AppUI current = AppUI.getCurrent();
    if (current != null && current.isTestMode()) {
        ArrayList<String> visibleColOrder = new ArrayList<>();
        for (Object columnId : visibleColumns) {
            if (!isColumnCollapsed(columnId)) {
                visibleColOrder.add(columnId.toString());
            }
        }
        target.addAttribute("colcubaids", visibleColOrder.toArray());
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:27,代码来源:CubaTable.java

示例4: paintRowAttributes

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintRowAttributes(PaintTarget target, Object itemId) throws PaintException {
    super.paintRowAttributes(target, itemId);

    boolean hasAggregation = items instanceof AggregationContainer && isAggregatable()
            && !((AggregationContainer) items).getAggregationPropertyIds().isEmpty();

    boolean hasGroups = hasGroups();
    if (hasGroups) {
        if (isGroup(itemId)) {
            target.addAttribute("colKey", columnIdMap.key(getGroupProperty(itemId)));
            target.addAttribute("groupKey", groupIdMap.key(itemId));
            if (isExpanded(itemId))
                target.addAttribute("expanded", true);

            final Object propertyValue = getGroupPropertyValue(itemId);
            target.addAttribute("groupCaption", formatGroupPropertyValue(itemId, propertyValue));

            if (hasAggregation) {
                paintGroupAggregation(target, itemId,
                        ((AggregationContainer) items).aggregate(new GroupAggregationContext(this, itemId)));
            }
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:26,代码来源:CubaGroupTable.java

示例5: paintAdditionalItemParams

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintAdditionalItemParams(PaintTarget target, MenuItem item) throws PaintException {
    if (shortcuts != null && shortcuts.containsKey(item)) {
        String shortcut = shortcuts.get(item);
        if (shortcut != null) {
            target.addAttribute("shortcut", shortcut);
        }
    }
    if (testIds != null && testIds.containsKey(item)) {
        String testIdValue = testIds.get(item);
        if (testIdValue != null) {
            target.addAttribute("tid", testIdValue);
        }
    }
    if (cubaIds != null && cubaIds.containsKey(item)) {
        String idValue = cubaIds.get(item);
        if (idValue != null) {
            target.addAttribute("cid", idValue);
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:CubaMenuBar.java

示例6: paintContent

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
    super.paintContent(target);

    target.addAttribute(DRAG_SOURCE, dragSourceIdPrefix);

    int countDropTarget = 0;
    for (String prefix : validDropTargetIdPrefixes) {
        target.addAttribute(DROP_TARGET + countDropTarget, prefix);
        countDropTarget++;
    }
    target.addAttribute(DROP_TARGET_COUNT, countDropTarget);

    int countDropAreas = 0;
    for (String dropArea : validDropAreaIds) {
        target.addAttribute(DROP_AREA + countDropAreas, dropArea);
        countDropAreas++;
    }
    target.addAttribute(DROP_AREA_COUNT, countDropAreas);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:21,代码来源:ServerViewComponentClientCriterion.java

示例7: paintActions

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintActions(PaintTarget target, Set<Action> actionSet) throws PaintException {
    super.paintActions(target, actionSet);

    if (shortcutActionManager != null) {
        shortcutActionManager.paintActions(null, target);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:9,代码来源:CubaTreeTable.java

示例8: paintContent

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (beforePaintListener != null) {
        beforePaintListener.run();
    }

    super.paintContent(target);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:9,代码来源:CubaTreeTable.java

示例9: paintContent

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
    super.paintContent(target);

    if (shortcutsManager != null) {
        shortcutsManager.paintActions(null, target);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:9,代码来源:CubaDateField.java

示例10: paintContent

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
    super.paintContent(target);

    if (hasGroups()) {
        final Collection groupProperties = getGroupProperties();
        final String[] groupColumns = new String[groupProperties.size()];

        int index = 0;
        for (final Object groupColumnId : groupProperties) {
            groupColumns[index++] = columnIdMap.key(groupColumnId);
        }
        target.addVariable(this, "groupColumns", groupColumns);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:16,代码来源:CubaGroupTable.java

示例11: paintGroupAggregation

import com.vaadin.server.PaintException; //导入依赖的package包/类
protected void paintGroupAggregation(PaintTarget target, Object groupId, Map<Object, Object> aggregations)
        throws PaintException {
    boolean paintGroupProperty = false;

    final Collection groupProperties = getGroupProperties();
    final Object groupProperty = getGroupProperty(groupId);

    for (final Object columnId : visibleColumns) {
        if (columnId == null || isColumnCollapsed(columnId)) {
            continue;
        }

        if (groupProperties.contains(columnId) && !paintGroupProperty) {
            if (columnId.equals(groupProperty)) {
                paintGroupProperty = true;
            }
            continue;
        }

        if (getCellStyleGenerator() != null) {
            String cellStyle = getCellStyleGenerator().getStyle(this, null, columnId);
            if (cellStyle != null && !cellStyle.equals("")) {
                target.addAttribute("style-" + columnIdMap.key(columnId), cellStyle + "-ag");
            }
        }

        String value = (String) aggregations.get(columnId);
        if (value != null) {
            target.addText(value);
        } else {
            target.addText("");
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:35,代码来源:CubaGroupTable.java

示例12: paintContent

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (beforePaintListener != null) {
        beforePaintListener.run();
    }

    if (isNodeCaptionsAsHtml()) {
        target.addAttribute("nodeCaptionsAsHtml", true);
    }
    super.paintContent(target);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:12,代码来源:CubaTree.java

示例13: paintItem

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintItem(
        PaintTarget target,
        Object itemId,
        LinkedList<String> selectedKeys,
        LinkedList<String> expandedKeys
) throws PaintException {
    super.paintItem(target, itemId, selectedKeys, expandedKeys);

    if (itemIds.indexOf(itemId) >= 0) {
        target.addAttribute("widgetIndex", itemIds.indexOf(itemId));
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:14,代码来源:CubaWidgetsTree.java

示例14: paintItem

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
protected void paintItem(PaintTarget target, Object itemId)
        throws PaintException {
    super.paintItem(target, itemId);

    if (styleGenerator != null) {
        String style = styleGenerator.generateStyle(this, itemId, isSelected(itemId));
        if (!StringUtils.isEmpty(style)) {
            target.addAttribute("style", style);
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:13,代码来源:CubaTwinColSelect.java

示例15: paintContent

import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
    super.paintContent(target);
    int paintedComponents = 0;
    for (String cId : componentIds) {
        target.addAttribute(COMPONENT + paintedComponents, cId);
        paintedComponents++;
    }
    target.addAttribute(COMPONENT_COUNT, paintedComponents);
    target.addAttribute(MODE, verificationMode.getShort());
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:12,代码来源:ServerItemIdClientCriterion.java


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