本文整理了Java中com.google.gwt.uibinder.rebind.XMLElement.getNamespaceUri()
方法的一些代码示例,展示了XMLElement.getNamespaceUri()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLElement.getNamespaceUri()
方法的具体详情如下:
包路径:com.google.gwt.uibinder.rebind.XMLElement
类名称:XMLElement
方法名:getNamespaceUri
[英]Gets this element's namespace URI.
[中]获取此元素的命名空间URI。
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isValidChildElement(XMLElement parent, XMLElement child) {
if (child != null && child.getNamespaceUri() != null
&& child.getNamespaceUri().equals(parent.getNamespaceUri())
&& uiChildMethods.containsKey(child.getLocalName())) {
return true;
} else {
return false;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isElementType(XMLElement parent, XMLElement child, String type) {
return parent.getNamespaceUri().equals(child.getNamespaceUri())
&& type.equals(child.getLocalName());
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isElementType(XMLElement parent, XMLElement child, String type) {
return parent.getNamespaceUri().equals(child.getNamespaceUri())
&& type.equals(child.getLocalName());
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isElementType(XMLElement parent, XMLElement child, String type) {
return parent.getNamespaceUri().equals(child.getNamespaceUri())
&& type.equals(child.getLocalName());
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isPositionElement(XMLElement parent, XMLElement child) {
if (!parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
if (!AT.equals(child.getLocalName())) {
return false;
}
return true;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isValidChildElement(XMLElement parent, XMLElement child) {
if (!parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
if (!DOCK_NAMES.containsKey(child.getLocalName())) {
return false;
}
// Made it through the gauntlet.
return true;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isElementType(XMLElement parent, XMLElement child, String type) {
return parent.getNamespaceUri().equals(child.getNamespaceUri())
&& type.equals(child.getLocalName());
}
代码示例来源: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
public String interpretElement(XMLElement elem) throws UnableToCompleteException {
if (writer.useLazyWidgetBuilders() && writer.isElementAssignableTo(elem, SafeHtml.class)) {
FieldWriter childField = writer.parseElementToField(elem);
return writer.tokenForSafeHtmlExpression(elem, childField.getNextReference());
}
if (writer.isImportedElement(elem)) {
writer.die(elem, "Not allowed in an HTML context");
}
if (elem.getNamespaceUri() != null && !writer.isBinderElement(elem)) {
// It's not a widget, and it's not a ui: element.
writer.die(elem, "Prefix \"%s:\" has unrecognized xmlns \"%s\" (bad import?)",
elem.getPrefix(), elem.getNamespaceUri());
}
return pipe.interpretElement(elem);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
String ns = child.getNamespaceUri();
String tagName = child.getLocalName();
if (!ns.equals(elem.getNamespaceUri())) {
writer.die(elem, "Invalid DockPanel child namespace: " + ns);
代码示例来源:origin: com.google.gwt/gwt-servlet
public void parse(XMLElement elem, String fieldName, JClassType type,
UiBinderWriter writer) throws UnableToCompleteException {
for (XMLElement child : elem.consumeChildElements()) {
String ns = child.getNamespaceUri();
String tagName = child.getLocalName();
if (ns != null && ns.equals(elem.getNamespaceUri())
&& localTagNameIsCell(tagName)) {
// It's a cell element, so parse its single child as a widget.
XMLElement widget = child.consumeSingleChildElement();
FieldWriter childField = writer.parseElementToField(widget);
writer.addStatement("%1$s.add(%2$s);", fieldName, childField.getNextReference());
// Parse the cell tag's alignment & size attributes.
parseCellAttributes(child, fieldName, childField, writer);
} else {
if (!writer.isWidgetElement(child)) {
writer.die(elem, "Expected a widget or <%s:%s>, found %s",
elem.getPrefix(), CELL_TAG.toLowerCase(Locale.ROOT), child);
}
// It's just a normal child, so parse it as a widget.
FieldWriter childField = writer.parseElementToField(child);
writer.addStatement("%1$s.add(%2$s);", fieldName, childField.getNextReference());
}
}
}
代码示例来源:origin: com.jhickman/gxt-uibinder
private boolean isValidElement(XMLElement parent, XMLElement child) {
if ( ! parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
return "CheckBox".equals(child.getLocalName());
}
}
代码示例来源:origin: net.wetheinter/gwt-user
private boolean isValidChildElement(XMLElement parent, XMLElement child) {
if (!parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
if (!DOCK_NAMES.containsKey(child.getLocalName())) {
return false;
}
// Made it through the gauntlet.
return true;
}
}
代码示例来源:origin: net.wetheinter/gwt-user
private boolean isElementType(XMLElement parent, XMLElement child, String type) {
return parent.getNamespaceUri().equals(child.getNamespaceUri())
&& type.equals(child.getLocalName());
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
private boolean isPositionElement(XMLElement parent, XMLElement child) {
if (!parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
if (!AT.equals(child.getLocalName())) {
return false;
}
return true;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
private boolean isElementType(XMLElement parent, XMLElement child, String type) {
return parent.getNamespaceUri().equals(child.getNamespaceUri())
&& type.equals(child.getLocalName());
}
}
代码示例来源:origin: net.wetheinter/gwt-user
private boolean isPositionElement(XMLElement parent, XMLElement child) {
if (!parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
if (!AT.equals(child.getLocalName())) {
return false;
}
return true;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
private boolean isValidChildElement(XMLElement parent, XMLElement child) {
if (!parent.getNamespaceUri().equals(child.getNamespaceUri())) {
return false;
}
if (!DOCK_NAMES.containsKey(child.getLocalName())) {
return false;
}
// Made it through the gauntlet.
return true;
}
}
代码示例来源:origin: com.jhickman/gxt-uibinder
@Override
public Boolean interpretElement(XMLElement elem) throws UnableToCompleteException {
return (namespaceUri != null && namespaceUri.equals(elem.getNamespaceUri()))
&& (localName != null && localName.equals(elem.getLocalName()));
}
}
代码示例来源:origin: com.jhickman/gxt-uibinder
public Boolean interpretElement(XMLElement elem) throws UnableToCompleteException {
if ( namespaceUri != null && namespaceUri.equals(elem.getNamespaceUri())) {
for(SupportedChildLocalNames supported : SupportedChildLocalNames.values()) {
if (supported.toString().equals(elem.getLocalName())) {
return true;
}
}
}
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!