• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RendererCellReference类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
                   final SimplePanel panel) {
    if (componentConnector != null) {

        // render chart widgets deferred so measurements are correct. Do not render
        // normal component widgets deferred as it causes some flicker when rerendering the grid
        if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    panel.setWidget(componentConnector.getWidget());
                }
            });
        } else {
            panel.setWidget(componentConnector.getWidget());
        }
    } else {
        panel.clear();
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:ComponentRenderer.java


示例2: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
   public void render(RendererCellReference cell, double[] data,
   	            FlowPanel widget) {
	SparklinesGWT s = (SparklinesGWT) widget.getWidget(0);
	updateSettings(s);
 
	HTML html = (HTML) widget.getWidget(1);
	double change = data[data.length - 1] - data[0];
	double min = data[0];
	double max = data[1];
	for (int i = 1; i < data.length; i++) {
		if (data[i] < min) {
			min = data[i];
		}
		if (data[i] > max) {
			max = data[i];
		}
	}
	s.setData(data);
	s.setDisplayRange((int) (min - 5), (int) (max + 5));
	if (change >= 0) {
		html.setStyleName("going-up");
	} else {
		html.setStyleName("going-down");
	}
}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:27,代码来源:SparklineRendererConnector.java


示例3: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, Date selectedValue,
                   VMyPopupCalendar dateField) {

    Element e = dateField.getElement();

    if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
        e.setPropertyString(ROW_KEY_PROPERTY,
                getRowKey((JsonObject) cell.getRow()));
    }
    // Generics issue, need a correctly typed column.

    if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
            .getColumn(cell.getColumnIndex()))) {
        e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
                .getColumn(cell.getColumnIndex())));
    }
    
    // Setting and showing the date from the Grid
    dateField.setCurrentDate(selectedValue);
    dateField.buildDate();
    
    if(dateField.isEnabled() != cell.getColumn().isEditable()) {
        dateField.setEnabled(cell.getColumn().isEditable());
    }
}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:27,代码来源:DateFieldRendererConnector.java


示例4: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, String selectedValue,
                   VTextField textField) {

    Element e = textField.getElement();

    if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
        e.setPropertyString(ROW_KEY_PROPERTY,
                getRowKey((JsonObject) cell.getRow()));
    }
    // Generics issue, need a correctly typed column.

    if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
            .getColumn(cell.getColumnIndex()))) {
        e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
                .getColumn(cell.getColumnIndex())));
    }

    textField.setValue(selectedValue);
    
    if(textField.isEnabled() != cell.getColumn().isEditable()) {
        textField.setEnabled(cell.getColumn().isEditable());
    }
}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:25,代码来源:TextFieldRendererConnector.java


示例5: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
     public void render(RendererCellReference cell, String text, Button button) {

Element e = button.getElement();

         if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
             e.setPropertyString(ROW_KEY_PROPERTY,
                     getRowKey((JsonObject) cell.getRow()));
         }
         if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
                 .getColumn(cell.getColumnIndex()))) {
             e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
                     .getColumn(cell.getColumnIndex())));
         }

         if (htmlContentAllowed) {
             button.setHTML(text);
     	} else {
     		button.setText(text);    		
         }
     	button.setEnabled(true);
     }
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:23,代码来源:HtmlButtonRendererConnector.java


示例6: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
     public void render(RendererCellReference cell, Boolean enable, Button button) {

Element e = button.getElement();

         if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
             e.setPropertyString(ROW_KEY_PROPERTY,
                     getRowKey((JsonObject) cell.getRow()));
         }
         if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
                 .getColumn(cell.getColumnIndex()))) {
             e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
                     .getColumn(cell.getColumnIndex())));
         }

 		String style = button.getStyleName();
 		if (style != null && style.contains("delete-confirm")) {
 			button.removeStyleName("delete-confirm");
 		}
     	if (htmlContentAllowed) {
             button.setHTML(getState().delete);
     	} else {
     		button.setText(getState().delete);    		
         }
     	button.setEnabled(enable);
     }
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:27,代码来源:DeleteButtonRendererConnector.java


示例7: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, String input, VLabel label) {
    Map<String, String> map = formatInput(input);
    String value = map.containsKey("value") ? map.get("value") : null;
    String style = map.containsKey("style") ? map.get("style") : null;
    String title = map.containsKey("title") ? map.get("title") : null;
    String id = map.containsKey("id") ? map.get("id") : null;

    if (value != null) {
        label.setHTML("<span>&#x" + Integer.toHexString(Integer.parseInt(value)) + ";</span>");
    } else {
        label.setHTML("<span></span>");
    }
    applyStyle(label, style);
    label.getElement().setId(id);
    label.getElement().setTitle(title);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:18,代码来源:HtmlLabelRenderer.java


示例8: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, RolloutRendererData text, VButton button) {
	final String creating = "CREATING";
	button.setText(text.getName());
	applystyle(button);
	// this is to allow the button to disappear, if the text is null
	button.setVisible(text.getName() != null);
	button.getElement().setId(new StringBuilder("link").append(".").append(text.getName()).toString());
	/*
	 * checking Rollout Status for applying button style. If Rollout status
	 * is not "CREATING", then the Rollout button is applying hyperlink
	 * style
	 */
	final boolean isStatusCreate = text.getStatus() != null && creating.equalsIgnoreCase(text.getStatus());
	if (isStatusCreate) {
		button.addStyleName(getStyle("boldhide"));
		button.setEnabled(false);
	} else {
		button.setEnabled(true);
	}
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:22,代码来源:RolloutRenderer.java


示例9: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, CellWrapper cellValue, HTML widget) {
	final int INTEND_IN_PIXELS = 19;
   	final String value=cellValue.getValue();
   	if(cellValue.hasChildren()) {
   		if(!widget.getElement().getClassName().contains("v-tree-grid-node")) {
   			widget.getElement().addClassName("v-tree-grid-node");
   		}
   		if(cellValue.isExpanded()){
   			widget.getElement().removeClassName("collapsed");
   			widget.getElement().addClassName("expanded");
   		}
   		else {
   			widget.getElement().removeClassName("expanded");
   			widget.getElement().addClassName("collapsed");
   		}
   	} else {
   		widget.getElement().removeClassName("v-tree-grid-node");
   		widget.getElement().removeClassName("collapsed");
   		widget.getElement().removeClassName("expanded");
   	}

	final int intend=INTEND_IN_PIXELS*cellValue.getLevel();
	widget.setHTML(value);
	widget.getElement().getStyle().setProperty("paddingLeft", intend+"px");
}
 
开发者ID:rogozinds,项目名称:GridTree,代码行数:27,代码来源:TreeNodeExpandButtonRenderer.java


示例10: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, ClickableText data, InlineHTML inlineHTML) {
    if (data.isHTML) {
        inlineHTML.setHTML(data.value);
    } else {
        inlineHTML.setText(data.value);
    }
    if (data.description != null) {
        inlineHTML.setTitle(data.description);
    }
}
 
开发者ID:phansson,项目名称:vaadin-clickabletextrenderer-v8,代码行数:12,代码来源:VClickableTextRendererAdv.java


示例11: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, String url, Image image) {
    super.render(cell, url, image);
    if (url == null) {
        image.getElement().getStyle().setDisplay(Style.Display.NONE);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:CubaImageRenderer.java


示例12: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, Object data, Widget widget) {

    JsonObject row = (JsonObject) cell.getRow();

    int depth = 0;
    boolean leaf = false;
    boolean collapsed = false;
    if (row.hasKey(GridState.JSONKEY_ROWDESCRIPTION)) {
        JsonObject rowDescription = row.getObject(GridState.JSONKEY_ROWDESCRIPTION);

        depth = (int) rowDescription.getNumber("depth");
        leaf = rowDescription.getBoolean("leaf");
        collapsed = rowDescription.getBoolean("collapsed");
    }

    HierarchyItem cellWidget = (HierarchyItem) widget;
    cellWidget.setDepth(depth);

    if (leaf) {
        cellWidget.setExpanderState(ExpanderState.LEAF);
    } else if (collapsed) {
        cellWidget.setExpanderState(ExpanderState.COLLAPSED);
    } else {
        cellWidget.setExpanderState(ExpanderState.EXPANDED);
    }

    // inner cell
    if (innerRenderer instanceof WidgetRenderer) {
        ((WidgetRenderer) innerRenderer).render(cell, data, ((HierarchyItem) widget).content);
    } else {
        innerRenderer.render(new HierarchyRendererCellReferenceWrapper(cell,
                ((HierarchyItem) widget).content.getElement()), data);
    }
}
 
开发者ID:vaadin,项目名称:tree-grid,代码行数:36,代码来源:HierarchyRenderer.java


示例13: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, String htmlString) {
	int rowIndex = cell.getRowIndex();
	String content = ""+rowIndex;
    cell.getElement()
            .setInnerSafeHtml(SafeHtmlUtils.fromSafeConstant(content));
}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:8,代码来源:RowIndexRendererConnector.java


示例14: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, Double data,
           RatingStarsWidget widget) {

	widget.setReadOnly(!(cell.getColumn().isEditable() && cell.getGrid().isEnabled()));
	Element e = widget.getElement();
	
      getState().value = data;
      
      if(e.getPropertyString(ROW_KEY_PROPERTY) != getRowKey((JsonObject) cell.getRow())) {
          e.setPropertyString(ROW_KEY_PROPERTY,
                  getRowKey((JsonObject) cell.getRow()));
      }
      // Generics issue, need a correctly typed column.

      if(e.getPropertyString(COLUMN_ID_PROPERTY) != getColumnId(getGrid()
              .getColumn(cell.getColumnIndex()))) {
          e.setPropertyString(COLUMN_ID_PROPERTY, getColumnId(getGrid()
                  .getColumn(cell.getColumnIndex())));
      }
	
	if (data == null) {
		widget.setValue(0.0);
	} else {
		widget.setValue(data);			
	}
}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:28,代码来源:RatingStarsRendererConnector.java


示例15: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(final RendererCellReference cell, final String text, final Button button) {
    final boolean buttonEnable = isButtonEnable(cell.getElement().getClassName());
    if (text != null) {
        button.setHTML(text);
    }
    applystyles(button, buttonEnable);
    // this is to allow the button to disappear, if the text is null
    button.setVisible(text != null);
    button.getElement().setId(UIComponentIdProvider.ROLLOUT_ACTION_ID + "." + cell.getColumnIndex());
    button.setEnabled(buttonEnable);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:13,代码来源:HtmlButtonRenderer.java


示例16: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(final RendererCellReference cell, final FontIconData iconMetadata, final Button button) {
    if (iconMetadata.getFontIconHtml() != null) {
        button.setHTML(iconMetadata.getFontIconHtml());
    }
    applyStyles(button, iconMetadata.isDisabled(), iconMetadata.getStyle());
    button.getElement().setId(iconMetadata.getId());
    button.getElement().setTitle(iconMetadata.getTitle());
    button.setEnabled(!iconMetadata.isDisabled());
    // this is to allow the button to disappear, if the text is null
    button.setVisible(iconMetadata.getFontIconHtml() != null);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:13,代码来源:GridButtonRenderer.java


示例17: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(final RendererCellReference cell, final Boolean data) {
	String output = "<center><span class=\"v-icon v-grid-cell-boolean ";
	if (data != null) {
		output = output + (data ? "boolean-true" : "boolean-false");
	} else {
		output = output + "boolean-null";
	}
	output = output + "\"></span></center>";
	cell.getElement()
			.setInnerHTML(output);
}
 
开发者ID:melistik,项目名称:vaadin-grid-util,代码行数:13,代码来源:VBooleanRenderer.java


示例18: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, String text, InlineHTML inlineHTML) {
    inlineHTML.setText(text);
}
 
开发者ID:phansson,项目名称:vaadin-clickabletextrenderer-v8,代码行数:5,代码来源:VClickableTextRenderer.java


示例19: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public abstract void render(RendererCellReference cell, T data, InlineHTML inlineHTML);
 
开发者ID:phansson,项目名称:vaadin-clickabletextrenderer-v8,代码行数:3,代码来源:AbstractClickableTextRenderer.java


示例20: render

import com.vaadin.client.widget.grid.RendererCellReference; //导入依赖的package包/类
@Override
public void render(RendererCellReference cell, Boolean data) {
    cell.getElement().setInnerHTML(getHtmlString(data));
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:5,代码来源:CubaCheckBoxRenderer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SADomain类代码示例发布时间:2022-05-23
下一篇:
Java DataSourceSource类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap