本文整理汇总了Java中com.google.gwt.dom.client.HeadElement类的典型用法代码示例。如果您正苦于以下问题:Java HeadElement类的具体用法?Java HeadElement怎么用?Java HeadElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HeadElement类属于com.google.gwt.dom.client包,在下文中一共展示了HeadElement类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: load
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
public static void load(Chronoscope.URLResolver resolver, final String libName,
final String version, final Command callback) {
if (!injectedLoader) {
final ScriptElement se = Document.get().createScriptElement();
// se.setSrc(intrinsics.getCachedUrl("http://www.google.com/jsapi?callback=" + JSAPI_CALLBACK));
se.setSrc("http://www.google.com/jsapi?callback=" + JSAPI_CALLBACK);
final HeadElement he = HeadElement.as(Document.get().getElementsByTagName("head").getItem(0));
exportHandler(new Command() {
public void execute() {
injectedLoader=true;
he.removeChild(se);
nativeLoad(libName, version, callback);
}
});
he.appendChild(se);
} else {
nativeLoad(libName, version, callback);
}
}
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:23,代码来源:GoogleLoader.java
示例2: setMultiRowDragDecoration
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
/**
* Styles a multi-row selection with the number of elements.
*
* @param drag
* the current drag event holding the context.
*/
void setMultiRowDragDecoration(VDragEvent drag) {
Widget widget = drag.getTransferable().getDragSource().getWidget();
if (widget instanceof VScrollTable) {
VScrollTable table = (VScrollTable) widget;
int rowCount = table.selectedRowKeys.size();
Element dragCountElement = Document.get().getElementById(SP_DRAG_COUNT);
if (rowCount > 1 && table.selectedRowKeys.contains(table.focusedRow.getKey())) {
if (dragCountElement == null) {
dragCountElement = Document.get().createStyleElement();
dragCountElement.setId(SP_DRAG_COUNT);
HeadElement head = HeadElement.as(Document.get().getElementsByTagName(HeadElement.TAG).getItem(0));
head.appendChild(dragCountElement);
}
SafeHtml formattedCssStyle = getDraggableTemplate().multiSelectionStyle(determineActiveTheme(drag),
String.valueOf(rowCount));
StyleElement dragCountStyleElement = StyleElement.as(dragCountElement);
dragCountStyleElement.setInnerSafeHtml(formattedCssStyle);
} else if (dragCountElement != null) {
dragCountElement.removeFromParent();
}
}
}
开发者ID:eclipse,项目名称:hawkbit,代码行数:31,代码来源:ViewClientCriterion.java
示例3: onModuleLoad
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
public void onModuleLoad() {
final String linkTxt = Resources.INSTANCE.linkTxt().getText();
final Document document = Document.get();
HeadElement headElement = document.getHead();
if (headElement == null) {
headElement = document.createHeadElement();
document.appendChild(headElement);
}
LinkElement linkElement = document.createLinkElement();
linkElement.setType("text/css");
linkElement.setRel("stylesheet");
linkElement.setHref(linkTxt);
headElement.appendChild(linkElement);
}
开发者ID:ainslec,项目名称:gwt-promptly,代码行数:15,代码来源:Init.java
示例4: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private HeadElement getHead() {
if(this.head == null) {
Element element = Document.get().getElementsByTagName(HEAD_TAG_NAME).getItem(0);
assert element != null : ERROR_HEAD_NOT_FOUND;
this.head = HeadElement.as(element);
}
return this.head;
}
开发者ID:baldram,项目名称:tristar-eye,代码行数:9,代码来源:LinkElementInjector.java
示例5: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private static HeadElement getHead() {
if (head == null) {
Element element = Document.get().getElementsByTagName("head").getItem(0);
assert element != null : "HTML Head element required";
head = HeadElement.as(element);
}
return head;
}
开发者ID:ahome-it,项目名称:ahome-touch,代码行数:9,代码来源:CSS.java
示例6: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private static HeadElement getHead() {
if (head == null) {
Element element = Document.get().getElementsByTagName("head").getItem(0);
assert element != null : "HTML Head element required";
HeadElement headElement = HeadElement.as(element);
head = headElement;
}
return head;
}
开发者ID:ahome-it,项目名称:ahome-touch,代码行数:10,代码来源:JsInjector.java
示例7: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
/**
* Gets the head tag element.
*
* @return the head tag element
*/
protected HeadElement getHead() {
if (this.head == null) {
Element elt = Document.get().getElementsByTagName("head").getItem(0);
assert elt != null : "The host HTML page does not have a <head> element" + " which is required by this injector";
this.head = HeadElement.as(elt);
}
return this.head;
}
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:14,代码来源:DefaultThemeController.java
示例8: injectStyleSheet
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
public static void injectStyleSheet(String href, String id) {
HeadElement head = getHead();
LinkElement element = createLinkElement();
element.setHref(href);
element.setId(id);
head.appendChild(element);
}
开发者ID:ahome-it,项目名称:ahome-core,代码行数:8,代码来源:CSSUtil.java
示例9: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private static HeadElement getHead() {
if (head == null) {
Element element = Document.get().getElementsByTagName("head")
.getItem(0);
assert element != null : "HTML Head element required";
head = HeadElement.as(element);
}
return head;
}
开发者ID:ahome-it,项目名称:ahome-core,代码行数:10,代码来源:CSSUtil.java
示例10: inject
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
public static void inject(String javascript) {
HeadElement head = getHead();
new Timer() {
public void run() {
// goJsPlumb();
goJS();
}
}.schedule(1);
ScriptElement element = createScriptElement();
element.setText(javascript);
head.appendChild(element);
}
开发者ID:wso2,项目名称:cloud-dev-studio,代码行数:16,代码来源:ESBJavaScriptInjector.java
示例11: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private static HeadElement getHead() {
if (head == null) {
Element element = Document.get().getElementsByTagName("head").getItem(0);
assert element != null : "HTML Head element required";
HeadElement head = HeadElement.as(element);
ESBJavaScriptInjector.head = head;
}
return ESBJavaScriptInjector.head;
}
开发者ID:wso2,项目名称:cloud-dev-studio,代码行数:10,代码来源:ESBJavaScriptInjector.java
示例12: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private static HeadElement getHead() {
if (head == null) {
Element element = Document.get().getElementsByTagName("head")
.getItem(0);
assert element != null : "HTML Head element required";
HeadElement head = HeadElement.as(element);
JSLibInjector.head = head;
}
return JSLibInjector.head;
}
开发者ID:wso2,项目名称:cloud-dev-studio,代码行数:11,代码来源:JSLibInjector.java
示例13: getHead
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
private static HeadElement getHead() {
if (head == null) {
Element element = Document.get().getElementsByTagName("head").getItem(0);
assert element != null : "HTML Head element required";
HeadElement head = HeadElement.as(element);
PlusOne.head = head;
}
return PlusOne.head;
}
开发者ID:nodchip,项目名称:QMAClone,代码行数:10,代码来源:PlusOne.java
示例14: intject
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
public static void intject(String javaScript) {
HeadElement head = getHead();
ScriptElement element = createScriptElement();
element.setText(javaScript);
head.appendChild(element);
}
开发者ID:ahome-it,项目名称:ahome-touch,代码行数:7,代码来源:JsInjector.java
示例15: inject
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
public static void inject(String javascript) {
HeadElement head = getHead();
ScriptElement element = createScriptElement();
element.setText(javascript);
head.appendChild(element);
}
开发者ID:wso2,项目名称:cloud-dev-studio,代码行数:7,代码来源:JSLibInjector.java
示例16: injectStyleSheet
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
/**
* Injects the css url code into a
* {@code <link rel="stylesheet" href="...." />} element in the document
* header.
*
* @param javascript
* the JavaScript code
*/
public static void injectStyleSheet(String href) {
HeadElement head = getHead();
LinkElement element = createLinkElement();
element.setHref(href);
head.appendChild(element);
}
开发者ID:ahome-it,项目名称:ahome-touch,代码行数:15,代码来源:CSS.java
示例17: getHeadElement
import com.google.gwt.dom.client.HeadElement; //导入依赖的package包/类
/**
* Convenience method for getting the document's head element.
*
* @return the document's head element
*/
private native HeadElement getHeadElement() /*-{
return $doc.getElementsByTagName("head")[0];
}-*/;
开发者ID:Peergos,项目名称:Peergos,代码行数:9,代码来源:Showcase.java
注:本文中的com.google.gwt.dom.client.HeadElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论