本文整理汇总了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());
}
}
示例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");
}
示例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());
}
}
示例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)));
}
}
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
}
示例8: paintContent
import com.vaadin.server.PaintException; //导入依赖的package包/类
@Override
public void paintContent(PaintTarget target) throws PaintException {
if (beforePaintListener != null) {
beforePaintListener.run();
}
super.paintContent(target);
}
示例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);
}
}
示例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);
}
}
示例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("");
}
}
}
示例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);
}
示例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));
}
}
示例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);
}
}
}
示例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());
}