当前位置: 首页>>代码示例>>Java>>正文


Java Element类代码示例

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


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

示例1: build

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
public static void build(JQueryCore<?> element) {
    element.append($("<a></a>").text(SimpleWebPage.class.getSimpleName()).attr("href", 
            ((WebPageUrl)SimpleWebPage.class.getAnnotation(WebPageUrl.class)).value()));
    element.append((Element) $("<br></br>"));
    element.append($("<a></a>").text(ServiceWebPage.class.getSimpleName()).attr("href", 
            ((WebPageUrl)ServiceWebPage.class.getAnnotation(WebPageUrl.class)).value()));
    element.append((Element) $("<br></br>"));
    element.append($("<a></a>").text(ChatWebPage.class.getSimpleName()).attr("href", 
            ((WebPageUrl)ChatWebPage.class.getAnnotation(WebPageUrl.class)).value()));
    element.append((Element) $("<br></br>"));
    element.append($("<a></a>").text(JQueryUiWebPage.class.getSimpleName()).attr("href", 
            ((WebPageUrl)JQueryUiWebPage.class.getAnnotation(WebPageUrl.class)).value()));
    element.append((Element) $("<br></br>"));
    element.append($("<a></a>").text(ExtJsWebPage.class.getSimpleName()).attr("href", 
            ((WebPageUrl)ExtJsWebPage.class.getAnnotation(WebPageUrl.class)).value()));        
    element.append((Element) $("<br></br>"));
    element.append($("<a></a>").text(AdminWebPage.class.getSimpleName()).attr("href", 
            ((WebPageUrl)AdminWebPage.class.getAnnotation(WebPageUrl.class)).value()));        
}
 
开发者ID:janScheible,项目名称:knorxx,代码行数:20,代码来源:MenuBuilder.java

示例2: render

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
@Override
 public void render() {
     final AbstractWebPage that = this;
     
     $(window).load((Event event, Element element) -> {
$(CONTAINER_ID).addClass(Appearance.STYLE_SCOPE_CLASS)
	.append((Element)$("<table/>").css("border", "3px solid #42B4E6")
		.append((Element)$("<tr/>")
			.append((Element)$("<td/>")
				.append((Element)$("<div></div>").attr("id", MENU_ID.substring(1)))
				.append((Element)$("<h1></div>").attr("id", TITLE_ID.substring(1)))
				.append((Element)$("<div></div>").attr("id", CONTENT_ID.substring(1)))
			)
		)
	);

         MenuBuilder.build($(MENU_ID));
         that.onLoad();
         return true;
     });
 }
 
开发者ID:janScheible,项目名称:knorxx,代码行数:22,代码来源:AbstractWebPage.java

示例3: createGui

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
private void createGui() {
    final ChatWebPage that = this;
    
    $(TITLE_ID).text("Chat WebPage").addClass(HEADING);

    $(CONTENT_ID).append(content = $("<div id=\"chatContent\"></div>"));
    $(CONTENT_ID).append(input = $("<input id=\"chatInput\" type=\"text\"></input>"));
    $(CONTENT_ID).append(status = $("<div id=\"chatStatus\"></div>"));

    input.keydown(new EventHandler() {
        @Override
        public boolean onEvent(Event event, Element THIS) {
            that.onInputKeyDown(event);
            return true;
        }
    });                
}
 
开发者ID:janScheible,项目名称:knorxx,代码行数:18,代码来源:ChatWebPage.java

示例4: cell

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
/**
 * rows and cols are 0-based
 */
public Cell cell(Object p1, Object p2) {
	// TODO need to handle fixed rows and cells also
	// this.rows, this.table contain only non-fixed rows
	Integer c = (Integer) p2, r = (Integer) p1;
	if (p2 == null) {
		c = ((JsCellReference) p1).col;
		r = ((JsCellReference) p1).row;
	}

	Integer trId = this.rowIndex(r, false);
	if (trId == null) {
		trId = this.fixedRows + 1;
	}
	// r = bind(r, 0, this.rows.length - 1);
	Element tr = this.rows.get(trId);
	TableCell td = $(tr).tdAtIndex(this.colIndex(c, false));
	return new Cell(this, r, c, td);
}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:22,代码来源:Sheet.java

示例5: init

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
public void init(AdminDescription desc) {
	final Admin that = this;
	this.desc = desc;
	$("#datasources").tabs(new TabsOptions<NetxiliaJQuery>() {
		{
			select = new UIEventHandler<TabsUI<NetxiliaJQuery>>() {
				public boolean onEvent(Event event, TabsUI<NetxiliaJQuery> ui, Element THIS) {
					if (ui.index < that.desc.datasources.$length()) {
						that.viewDatasource(that.desc.datasources.$get(ui.index));
					} else {
						that.newDatasource();
					}
					return false;
				}
			};
		}
	});
	$("#datasources").tabs("select", 0);
	that.viewDatasource(that.desc.datasources.$get(0));
	$("#createAdminForm").validate();
}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:22,代码来源:Admin.java

示例6: dlgDisconnected

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
/**
 * popup find dialog and selects the first cell matching.
 */
private void dlgDisconnected() {
	final Application that = this;
	$.nxdialog("disconnected", new NetxiliaDialogOptions() {
		{
			height = 250;
			closable = false;
			buttons = $map("Login", new Callback1<Element>() {
				public void $invoke(Element THIS) {
					$(THIS).dialog("close");
					window.location.reload();
				}
			});
		}
	});
}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:19,代码来源:Application.java

示例7: dlgStyles

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
private void dlgStyles() {
	final Application that = this;
	$.nxdialog("styles", new NetxiliaDialogOptions() {
		{
			modal = false;
			height = 200;
			buttons = $map("Apply", new Callback1<Element>() {
				public void $invoke(Element THIS) {
					NetxiliaJQuery $dlg = $(THIS);
					String styles = (String) $dlg.find("#selectedStyles").val();

					nx.resources.cells.applyStyle(that.desc.workbook, that.activeSheet.selection.ref(true), styles,
							"set", null);
				}
			});
		}
	});

}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:20,代码来源:Application.java

示例8: dlgAddFormatter

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
private void dlgAddFormatter() {
	final Application that = this;
	$("#addFormatter #formatterSourceWorkbook").val(this.activeSheet.desc.workbook);

	$.nxdialog("addFormatter", new NetxiliaDialogOptions() {
		{
			modal = true;
			height = 250;
			width = 350;
			buttons = $map("Apply", new Callback1<Element>() {
				public void $invoke(Element THIS) {
					String name = (String) $("#addFormatter #formatterName").val();
					String sourceWorkbook = (String) $("#addFormatter #formatterSourceWorkbook").val();
					String nameRef = (String) $("#addFormatter #formatterNameRange").val();
					String valueRef = (String) $("#addFormatter #formatterValueRange").val();

					nx.resources.formatters.setFormatter(that.desc.workbook, name, sourceWorkbook, nameRef,
							valueRef, null);
					// TODO should refresh the formatters list
					$(THIS).dialog("close");
				}
			});
		}
	});
}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:26,代码来源:Application.java

示例9: exportSheet

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
private void exportSheet() {
	if (this.sheet != null) {
		final Home that = this;
		$.nxdialog("exportSheets", new NetxiliaDialogOptions() {
			{
				height = 150;
				width = 300;
				buttons = $map("Export", new Callback1<Element>() {
					public void $invoke(Element THIS) {
						NetxiliaJQuery $frm = $("form", THIS);
						NetxiliaJQuery format = $("#format", $frm);
						NetxiliaJQuery $dlg = $(THIS);

						// $("#display").html("<iframe frameborder='no' width='100%' height='600' src='" +
						// that.desc.context + "/rest/sheets/" + that.workbook + "/" + that.sheet + "/" +
						// format.val() + "'></iframe>");
						window.open(that.desc.context + "/rest/sheets/" + that.workbook + "/" + that.sheet + "/"
								+ format.val(), "_blank");
						$dlg.dialog("close");
					}
				});
			}
		});
	}
}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:26,代码来源:Home.java

示例10: makeVisible

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
/**
 * scroll horizontally and vertically to make sure the given cell is visible. row, col are 0-based and take into
 * account row and column headers
 */
protected void makeVisible(int row, int col) {
	// scroll if necessary
	Element cell = ((TDJQueryHelpers) $(this.rows.get(row))).tdAtIndex(col);
	Bounds sel = ((BoundsPlugin) $(cell)).bounds("parent");
	Bounds div = ((BoundsPlugin) this.cellsDiv).scrollBounds();
	if (sel.b + 10 >= div.b) {
		this.cellsDiv.scrollTop(sel.b + 10 - div.h);
	}

	sel.l = this._columnLeft(col) - this._columnLeft(1); // the fixed columns don't scroll
	sel.r = sel.l + this.columnWidths.$get(col);

	if (sel.r + 10 >= div.r || col < this.firstVisibleCol) {
		this.scrollLeft(sel.l);
	}

}
 
开发者ID:netxilia,项目名称:netxilia,代码行数:22,代码来源:NXTable.java

示例11: render

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
@Override
public void render() {
    final TestWebPage that = this;
    
    $(window).load(new EventHandler() {
        @Override
        public boolean onEvent(Event event, Element element) {
            that.onLoad();
            return true;
        }
    });
}
 
开发者ID:janScheible,项目名称:knorxx,代码行数:13,代码来源:TestWebPage.java

示例12: createGui

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
private void createGui() {
     final ChatWebPage that = this;
     
     $(TITLE_ID).text("Chat WebPage").addClass(HEADING_STYLE);

     $(CONTENT_ID).append(content = $("<div id=\"chatContent\"></div>"));
     $(CONTENT_ID).append(input = $("<input id=\"chatInput\" type=\"text\"></input>"));
     $(CONTENT_ID).append(status = $("<div id=\"chatStatus\"></div>"));

     input.keydown((Event event, Element THIS) ->  {
that.onInputKeyDown(event);
return true;
     });                
 }
 
开发者ID:janScheible,项目名称:knorxx,代码行数:15,代码来源:ChatWebPage.java

示例13: onLoad

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
@Override
 public void onLoad() {
     $(TITLE_ID).text("JQuery UI WebPage").addClass(HEADING_STYLE);
     ButtonOptions buttonOptions = new ButtonOptions();
     buttonOptions.label = ((Date)getModel().$get(MY_MODEL_KEY)).toGMTString();
     $("#" + MY_CONTENT_ID).button(buttonOptions).click((Event ev, Element THIS) -> {
alert("clicked :-)");
return true;
     });
 }
 
开发者ID:janScheible,项目名称:knorxx,代码行数:11,代码来源:JQueryUiWebPage.java

示例14: onLoad

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
@Override
public void onLoad() {
    $(TITLE_ID).text(HEADING).addClass(Appearance.HEADING_STYLE);
    $(CONTENT_ID).append($("<div></div>").text("JavaScript... tss... ;-)").addClass(Appearance.HIGHLIGHT_STYLE));
    
    $(CONTENT_ID).append((Element)$("<h2>TODOs</h2>"));

    JQueryCore list = $("<ul></ul>");        
    list.append("<li>Support of promises??? (e.g. https://github.com/kriskowal/q)</li>");        
     
    $(CONTENT_ID).append(list);
}
 
开发者ID:janScheible,项目名称:knorxx,代码行数:13,代码来源:SimpleWebPage.java

示例15: onLoad

import org.stjs.javascript.dom.Element; //导入依赖的package包/类
@Override
public void onLoad() {
    $(TITLE_ID).text("Gui WebPage").addClass(HEADING);
    ButtonOptions buttonOptions = new ButtonOptions();
    buttonOptions.label = ((Date)getModel().$get(MY_MODEL_KEY)).toGMTString();
    $("#" + MY_CONTENT_ID).button(buttonOptions).click(new EventHandler() {
        @Override
        public boolean onEvent(Event ev, Element THIS) {
            alert("clicked :-)");
            return true;
        }
    });
}
 
开发者ID:janScheible,项目名称:knorxx,代码行数:14,代码来源:GuiWebPage.java


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