微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

com.vaadin.server.PaintException的实例源码

项目:cuba    文件CubaTreeTable.java   
@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());
    }
}
项目:cuba    文件CubaTreeTable.java   
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");
}
项目:cuba    文件CubaTable.java   
@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());
    }
}
项目:cuba    文件CubaTable.java   
protected void paintAggregationRow(PaintTarget target,cellStyle + "-ag");
            }
        }

        String value = (String) aggregations.get(columnId);
        target.addText(value);
    }
    target.endTag("arow");
}
项目:cuba    文件CubaGroupTable.java   
@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)));
            }
        }
    }
}
项目:cuba    文件CubaMenuBar.java   
@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);
        }
    }
}
项目:hawkbit    文件ServerViewComponentClientCriterion.java   
@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);
}
项目:cuba    文件CubaTreeTable.java   
@Override
protected void paintActions(PaintTarget target,Set<Action> actionSet) throws PaintException {
    super.paintActions(target,actionSet);

    if (shortcutActionManager != null) {
        shortcutActionManager.paintActions(null,target);
    }
}
项目:cuba    文件CubaTreeTable.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (beforePaintListener != null) {
        beforePaintListener.run();
    }

    super.paintContent(target);
}
项目:cuba    文件CubaDateField.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    super.paintContent(target);

    if (shortcutsManager != null) {
        shortcutsManager.paintActions(null,target);
    }
}
项目:cuba    文件CubaTable.java   
@Override
protected void paintActions(PaintTarget target,target);
    }
}
项目:cuba    文件CubaTable.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (beforePaintListener != null) {
        beforePaintListener.run();
    }

    super.paintContent(target);
}
项目:cuba    文件CubaGroupTable.java   
@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);
    }
}
项目:cuba    文件CubaGroupTable.java   
protected void paintGroupAggregation(PaintTarget target,Object groupId,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,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("");
        }
    }
}
项目:cuba    文件CubaTree.java   
@Override
protected void paintActions(PaintTarget target,target);
    }
}
项目:cuba    文件CubaTree.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (beforePaintListener != null) {
        beforePaintListener.run();
    }

    if (isNodeCaptionsAsHtml()) {
        target.addAttribute("nodeCaptionsAsHtml",true);
    }
    super.paintContent(target);
}
项目:cuba    文件CubaWidgetsTree.java   
@Override
protected void paintItem(
        PaintTarget target,Object itemId,LinkedList<String> selectedKeys,LinkedList<String> expandedKeys
) throws PaintException {
    super.paintItem(target,selectedKeys,expandedKeys);

    if (itemIds.indexOf(itemId) >= 0) {
        target.addAttribute("widgetIndex",itemIds.indexOf(itemId));
    }
}
项目:cuba    文件CubaTwinColSelect.java   
@Override
protected void paintItem(PaintTarget target,Object itemId)
        throws PaintException {
    super.paintItem(target,itemId);

    if (styleGenerator != null) {
        String style = styleGenerator.generateStyle(this,isSelected(itemId));
        if (!StringUtils.isEmpty(style)) {
            target.addAttribute("style",style);
        }
    }
}
项目:hawkbit    文件ServerItemIdClientCriterion.java   
@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());
}
项目:hawkbit    文件ServerViewClientCriterion.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    int dropAreaStylesConfigCount = 0;
    for (String dropAreaEntry : dropAreaHints) {
        target.addAttribute(DROP_AREA_CONfig + dropAreaStylesConfigCount,dropAreaEntry);
        dropAreaStylesConfigCount++;
    }
    target.addAttribute(DROP_AREA_CONfig_COUNT,dropAreaStylesConfigCount);

    super.paintContent(target);
}
项目:context-menu    文件MenuBar.java   
/** Paint (serialise) the component for the client. */
@Override
public void paintContent(PaintTarget target) throws PaintException {
    target.addAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER,openRootOnHover);

    if (isHtmlContentAllowed()) {
        target.addAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED,true);
    }

    target.startTag("options");

    if (getWidth() > -1) {
        target.startTag("moreItem");
        target.addAttribute("text",moreItem.getText());
        if (moreItem.getIcon() != null) {
            target.addAttribute("icon",moreItem.getIcon());
        }
        target.endTag("moreItem");
    }

    target.endTag("options");
    target.startTag("items");

    // This generates the tree from the contents of the menu
    for (MenuItem item : getItems()) {
        paintItem(target,item);
    }

    target.endTag("items");
}
项目:vaadin-crichtextarea    文件CRichTextArea.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
   if (selectAll) {
      target.addAttribute("selectAll",true);
      selectAll = false;
   }

   if (fontName != null) {
      target.addAttribute("fontName",fontName);
   }

   if (fontSize != 0) {
      target.addAttribute("fontSize",fontSize);
   }

   if (insertHtml != null) {
      target.addAttribute("insertHtml",insertHtml);
      insertHtml = null;
   }

   // Adds the content as variable
   String value = getValue();
   if (value == null) {
      value = getNullRepresentation();
   }
   if (value == null) {
      throw new IllegalStateException(
              "Null values are not allowed if the null-representation is null");
   }
   target.addVariable(this,"text",value);

}
项目:vaadin-asyncfiltercomboBox    文件AsyncFilterComboBox.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    target.addAttribute(AsyncFilterComboBoxConstants.ATTR_FILTERCHANGE_EVENTMODE,getFilterChangeEventMode().toString());
    target.addAttribute(AsyncFilterComboBoxConstants.ATTR_FILTERCHANGE_TIMEOUT,getFilterChangeTimeout());

    super.paintContent(target);
}
项目:cuba    文件CubaOrderedActionsLayout.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (actionManager != null) {
        actionManager.paintActions(null,target);
    }
}
项目:cuba    文件CubaCssActionsLayout.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (actionManager != null) {
        actionManager.paintActions(null,target);
    }
}
项目:cuba    文件CubaGridLayout.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (actionManager != null) {
        actionManager.paintActions(null,target);
    }
}
项目:context-menu    文件MenuBar.java   
private void paintItem(PaintTarget target,MenuItem item)
        throws PaintException {
    if (!item.isVisible()) {
        return;
    }

    target.startTag("item");

    target.addAttribute("id",item.getId());

    if (item.getStyleName() != null) {
        target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE,item.getStyleName());
    }

    if (item.isSeparator()) {
        target.addAttribute("separator",true);
    } else {
        target.addAttribute("text",item.getText());

        Command command = item.getCommand();
        if (command != null) {
            target.addAttribute("command",true);
        }

        Resource icon = item.getIcon();
        if (icon != null) {
            target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON,icon);
        }

        if (!item.isEnabled()) {
            target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_disABLED,true);
        }

        String description = item.getDescription();
        if (description != null && description.length() > 0) {
            target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION,description);
        }
        if (item.isCheckable()) {
            // if the "checked" attribute is present (either true or false),// the item is checkable
            target.addAttribute(MenuBarConstants.ATTRIBUTE_CHECKED,item.isChecked());
        }
        if (item.hasChildren()) {
            for (MenuItem child : item.getChildren()) {
                paintItem(target,child);
            }
        }

    }

    target.endTag("item");
}
项目:vaadin-diagram    文件Diagram.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {
    if (getDropHandler() != null) {
        getDropHandler().getAcceptCriterion().paint(target);
    }
}
项目:AppletIntegration    文件AppletIntegration.java   
@Override
public void paintContent(PaintTarget target) throws PaintException {

    // Applet class
    if (appletClass == null) {
        // Do not paint anything of class is missing
        return;
    }
    target.addAttribute(VAppletIntegration.ATTR_APPLET_CLASS,appletClass);

    // Applet HTTP Session id
    String sid = getHttpSessionId();
    if (sid != null) {
        target.addAttribute(VAppletIntegration.ATTR_APPLET_SESSION,sid);
    }

    // Applet archives
    if (appletArchives != null) {
        target.addAttribute(VAppletIntegration.ATTR_APPLET_ARCHIVES,appletArchives.toArray(new String[appletArchives.size()]));
    }

    // Applet codebase
    if (codebase != null) {
        target.addAttribute(VAppletIntegration.ATTR_APPLET_CODEBASE,codebase);
    }

    // Applet name
    if (name != null) {
        target.addAttribute(VAppletIntegration.ATTR_APPLET_NAME,name);
    }

    // Applet parameters
    if (appletParams != null) {
        target.addAttribute(VAppletIntegration.ATTR_APPLET_ParaM_NAMES,appletParams);
    }

    // Commands
    if (command != null) {
        target.addAttribute(VAppletIntegration.ATTR_CMD,command);
        command = null;
    }

    if (commandParams != null) {
        target.addAttribute(VAppletIntegration.ATTR_CMD_ParaMS,commandParams);
        commandParams = null;
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。