本文整理了Java中com.google.gwt.user.cellview.client.Header.render()
方法的一些代码示例,展示了Header.render()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.render()
方法的具体详情如下:
包路径:com.google.gwt.user.cellview.client.Header
类名称:Header
方法名:render
[英]Render the header.
[中]呈现标题。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Renders a given Header into a given ElementBuilderBase. This method ensures
* that the CellTable widget will handle events events originating in the
* Header.
*
* @param <H> the data type of the header
* @param out the {@link ElementBuilderBase} to render into. The builder
* should be a child element of a row returned by {@link #startRow}
* and must be in a state that allows both attributes and elements to
* be added
* @param context the {@link Context} of the header being rendered
* @param header the {@link Header} to render
*/
protected final <H> void renderHeader(ElementBuilderBase<?> out, Context context, Header<H> header) {
// Generate a unique ID for the header.
String headerId = idToHeaderMap.getKey(header);
if (headerId == null) {
headerId = "header-" + Document.get().createUniqueId();
idToHeaderMap.put(headerId, header);
}
out.attribute(HEADER_ATTRIBUTE, headerId);
// Render the cell into the builder.
SafeHtmlBuilder sb = new SafeHtmlBuilder();
header.render(context, sb);
out.html(sb.toSafeHtml());
}
代码示例来源:origin: stephenh/tessell
/** Instead of rendering the cell directly, give the header a chance to run it's render logic. */
@Override
public void render(Cell.Context context, X value, SafeHtmlBuilder sb) {
header.asHeader().render(context, sb);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Renders a given Header into a given ElementBuilderBase. This method ensures
* that the CellTable widget will handle events events originating in the
* Header.
*
* @param <H> the data type of the header
* @param out the {@link ElementBuilderBase} to render into. The builder
* should be a child element of a row returned by {@link #startRow}
* and must be in a state that allows both attributes and elements to
* be added
* @param context the {@link Context} of the header being rendered
* @param header the {@link Header} to render
*/
protected final <H> void renderHeader(ElementBuilderBase<?> out, Context context, Header<H> header) {
// Generate a unique ID for the header.
String headerId = idToHeaderMap.getKey(header);
if (headerId == null) {
headerId = "header-" + Document.get().createUniqueId();
idToHeaderMap.put(headerId, header);
}
out.attribute(HEADER_ATTRIBUTE, headerId);
// Render the cell into the builder.
SafeHtmlBuilder sb = new SafeHtmlBuilder();
header.render(context, sb);
out.html(sb.toSafeHtml());
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Renders a given Header into a given ElementBuilderBase. This method ensures
* that the CellTable widget will handle events events originating in the
* Header.
*
* @param <H> the data type of the header
* @param out the {@link ElementBuilderBase} to render into. The builder
* should be a child element of a row returned by {@link #startRow}
* and must be in a state that allows both attributes and elements to
* be added
* @param context the {@link Context} of the header being rendered
* @param header the {@link Header} to render
*/
protected final <H> void renderHeader(ElementBuilderBase<?> out, Context context, Header<H> header) {
// Generate a unique ID for the header.
String headerId = idToHeaderMap.getKey(header);
if (headerId == null) {
headerId = "header-" + Document.get().createUniqueId();
idToHeaderMap.put(headerId, header);
}
out.attribute(HEADER_ATTRIBUTE, headerId);
// Render the cell into the builder.
SafeHtmlBuilder sb = new SafeHtmlBuilder();
header.render(context, sb);
out.html(sb.toSafeHtml());
}
内容来源于网络,如有侵权,请联系作者删除!