本文整理了Java中com.google.gwt.uibinder.rebind.XMLElement.consumeImageResourceAttribute()
方法的一些代码示例,展示了XMLElement.consumeImageResourceAttribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLElement.consumeImageResourceAttribute()
方法的具体详情如下:
包路径:com.google.gwt.uibinder.rebind.XMLElement
类名称:XMLElement
方法名:consumeImageResourceAttribute
[英]Convenience method for parsing the named attribute as an ImageResource value or reference.
[中]将命名属性解析为ImageResource值或引用的方便方法。
代码示例来源:origin: com.google.gwt/gwt-servlet
public void parse(XMLElement elem, String fieldName, JClassType type,
UiBinderWriter writer) throws UnableToCompleteException {
if (hasImageResourceConstructor(writer.getOracle(), type)) {
String resource = elem.consumeImageResourceAttribute("resource");
if (null != resource) {
writer.setFieldInitializerAsConstructor(fieldName, resource);
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public Boolean interpretElement(XMLElement child)
throws UnableToCompleteException {
// CustomButton can only contain Face elements.
String ns = child.getNamespaceUri();
String faceName = child.getLocalName();
if (!ns.equals(elem.getNamespaceUri())) {
writer.die(elem, "Invalid child namespace: %s", ns);
}
if (!faceNames.contains(faceName)) {
writer.die(elem, "Invalid CustomButton face: %s:%s", ns, faceName);
}
HtmlInterpreter interpreter = HtmlInterpreter.newInterpreterForUiObject(
writer, fieldName);
String innerHtml = child.consumeInnerHtml(interpreter);
if (innerHtml.length() > 0) {
writer.addStatement("%s.%s().setHTML(%s);", fieldName,
faceNameGetter(faceName), writer.declareTemplateCall(innerHtml,
fieldName));
}
if (child.hasAttribute("image")) {
String image = child.consumeImageResourceAttribute("image");
writer.addStatement("%s.%s().setImage(new %s(%s));", fieldName,
faceNameGetter(faceName), IMAGE_CLASS, image);
}
return true; // We consumed it
}
});
代码示例来源:origin: com.google.gwt/gwt-servlet
String openImage = children.header.consumeImageResourceAttribute(OPEN_IMAGE);
String closedImage = children.header.consumeImageResourceAttribute(CLOSED_IMAGE);
String headerText = children.header.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(
writer));
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public void parse(XMLElement elem, String fieldName, JClassType type,
UiBinderWriter writer) throws UnableToCompleteException {
if (hasImageResourceConstructor(writer.getOracle(), type)) {
String resource = elem.consumeImageResourceAttribute("resource");
if (null != resource) {
writer.setFieldInitializerAsConstructor(fieldName, resource);
}
}
}
代码示例来源:origin: net.wetheinter/gwt-user
public void parse(XMLElement elem, String fieldName, JClassType type,
UiBinderWriter writer) throws UnableToCompleteException {
if (hasImageResourceConstructor(writer.getOracle(), type)) {
String resource = elem.consumeImageResourceAttribute("resource");
if (null != resource) {
writer.setFieldInitializerAsConstructor(fieldName, resource);
}
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public Boolean interpretElement(XMLElement child)
throws UnableToCompleteException {
// CustomButton can only contain Face elements.
String ns = child.getNamespaceUri();
String faceName = child.getLocalName();
if (!ns.equals(elem.getNamespaceUri())) {
writer.die(elem, "Invalid child namespace: %s", ns);
}
if (!faceNames.contains(faceName)) {
writer.die(elem, "Invalid CustomButton face: %s:%s", ns, faceName);
}
HtmlInterpreter interpreter = HtmlInterpreter.newInterpreterForUiObject(
writer, fieldName);
String innerHtml = child.consumeInnerHtml(interpreter);
if (innerHtml.length() > 0) {
writer.addStatement("%s.%s().setHTML(%s);", fieldName,
faceNameGetter(faceName), writer.declareTemplateCall(innerHtml,
fieldName));
}
if (child.hasAttribute("image")) {
String image = child.consumeImageResourceAttribute("image");
writer.addStatement("%s.%s().setImage(new %s(%s));", fieldName,
faceNameGetter(faceName), IMAGE_CLASS, image);
}
return true; // We consumed it
}
});
代码示例来源:origin: net.wetheinter/gwt-user
public Boolean interpretElement(XMLElement child)
throws UnableToCompleteException {
// CustomButton can only contain Face elements.
String ns = child.getNamespaceUri();
String faceName = child.getLocalName();
if (!ns.equals(elem.getNamespaceUri())) {
writer.die(elem, "Invalid child namespace: %s", ns);
}
if (!faceNames.contains(faceName)) {
writer.die(elem, "Invalid CustomButton face: %s:%s", ns, faceName);
}
HtmlInterpreter interpreter = HtmlInterpreter.newInterpreterForUiObject(
writer, fieldName);
String innerHtml = child.consumeInnerHtml(interpreter);
if (innerHtml.length() > 0) {
writer.addStatement("%s.%s().setHTML(%s);", fieldName,
faceNameGetter(faceName), writer.declareTemplateCall(innerHtml,
fieldName));
}
if (child.hasAttribute("image")) {
String image = child.consumeImageResourceAttribute("image");
writer.addStatement("%s.%s().setImage(new %s(%s));", fieldName,
faceNameGetter(faceName), IMAGE_CLASS, image);
}
return true; // We consumed it
}
});
代码示例来源:origin: net.wetheinter/gwt-user
String openImage = children.header.consumeImageResourceAttribute(OPEN_IMAGE);
String closedImage = children.header.consumeImageResourceAttribute(CLOSED_IMAGE);
String headerText = children.header.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(
writer));
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
String openImage = children.header.consumeImageResourceAttribute(OPEN_IMAGE);
String closedImage = children.header.consumeImageResourceAttribute(CLOSED_IMAGE);
String headerText = children.header.consumeInnerTextEscapedAsHtmlStringLiteral(new TextInterpreter(
writer));
内容来源于网络,如有侵权,请联系作者删除!