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


Java Window.getScrollLeft方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.Window.getScrollLeft方法的典型用法代码示例。如果您正苦于以下问题:Java Window.getScrollLeft方法的具体用法?Java Window.getScrollLeft怎么用?Java Window.getScrollLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.Window的用法示例。


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

示例1: continueDrawingCurve

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
protected void continueDrawingCurve(int clientX, int clientY) {
    int newX = clientX - canv.getAbsoluteLeft() + Window.getScrollLeft();
    int newY = clientY - canv.getAbsoluteTop() + Window.getScrollTop();

    if (getDistance(x, y, newX, newY) > dist_buffer) {
        ctx.beginPath();
        ctx.setLineWidth(5);
        ctx.setStrokeStyle(color);
        ctx.moveTo(x, y);
        ctx.lineTo(newX, newY);
        ctx.moveTo(newX, newY);
        ctx.closePath();
        ctx.stroke();
        points.add(new Point(x, y, color));
        (points.get(points.size() - 1)).draw(this);
        x = newX;
        y = newY;
        if (lastUpdateTime + updateTime < new Date().getTime()) {
            endDrawingCurve(clientX, clientY);
        }
    }
}
 
开发者ID:LiogkyTeam,项目名称:DrowGutt,代码行数:23,代码来源:CanvasWidget.java

示例2: position

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
private void position(final UIObject relativeObject, int offsetWidth, int offsetHeight) {
	int textBoxOffsetWidth = relativeObject.getOffsetWidth();
	int offsetWidthDiff = offsetWidth - textBoxOffsetWidth;
	int left = relativeObject.getAbsoluteLeft();
	if (offsetWidthDiff > 0) {
		int windowRight = Window.getClientWidth() + Window.getScrollLeft();
		int windowLeft = Window.getScrollLeft();
		int distanceToWindowRight = windowRight - left;
		int distanceFromWindowLeft = left - windowLeft;
		if (distanceToWindowRight < offsetWidth && distanceFromWindowLeft >= offsetWidthDiff) {
			left -= offsetWidthDiff;
		}
	}
	int top = relativeObject.getAbsoluteTop();
	int windowTop = Window.getScrollTop();
	int windowBottom = Window.getScrollTop() + Window.getClientHeight();
	int distanceFromWindowTop = top - windowTop;
	int distanceToWindowBottom = windowBottom - (top + relativeObject.getOffsetHeight());
	if (distanceToWindowBottom < offsetHeight && distanceFromWindowTop >= offsetHeight) {
		top -= offsetHeight;
	} else {
		top += relativeObject.getOffsetHeight();
	}
	setPopupPosition(left, top);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:26,代码来源:FilterBox.java

示例3: refreshPage

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public static void refreshPage() {
	String url = Window.Location.getHref();
	if (url.indexOf('#') >= 0)
		url = url.substring(0, url.lastIndexOf('#'));
	url += "#" + Window.getScrollLeft() + ":" + Window.getScrollTop();
	Window.Location.assign(url);
	new Timer() {
		@Override
		public void run() {
			Window.Location.reload();
		}
	}.schedule(100);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:14,代码来源:Refresh.java

示例4: endDrawingRect

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
protected void endDrawingRect(int clientX, int clientY, int thickness){
    int x1 = clientX - canv.getAbsoluteLeft() + Window.getScrollLeft();
    int y1 = clientY - canv.getAbsoluteTop() + Window.getScrollTop();
    Context2d ctx = canv.getContext2d();
    ctx.beginPath();
    ctx.setLineWidth(thickness);
    ctx.setStrokeStyle("000000");
    ctx.strokeRect(min(x, x1), min(y, y1), abs(x - x1), abs(y - y1));
    ctx.closePath();
    Rectangle Rect = new Rectangle(min(x, x1), min(y, y1), max(x, x1), max(y, y1));
    x = 0;
    y = 0;
}
 
开发者ID:LiogkyTeam,项目名称:DrowGutt,代码行数:14,代码来源:CanvasWidget.java

示例5: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(iAttribute.getId() == null ? MESSAGES.pageAddInstructorAttribute() : MESSAGES.pageEditInstructorAttribute());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:InstructorAttributeEdit.java

示例6: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(iGroup.getId() == null ? MESSAGES.pageAddRoomGroup() : MESSAGES.pageEditRoomGroup());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:RoomGroupEdit.java

示例7: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(MESSAGES.pageRoomDetail());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:RoomDetail.java

示例8: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(iFeature.getId() == null ? MESSAGES.pageAddRoomFeature() : MESSAGES.pageEditRoomFeature());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:RoomFeatureEdit.java

示例9: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(MESSAGES.pageEditRoomsDepartments());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:RoomDepartmentsEdit.java

示例10: __search

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public static void __search() {
	final int left = Window.getScrollLeft();
	final int top = Window.getScrollTop();
	NotAssignedClassesPage page = (NotAssignedClassesPage)RootPanel.get("UniTimeGWT:Body").getWidget(0);
	page.search(new AsyncCallback<Boolean>() {
		@Override
		public void onFailure(Throwable caught) {
		}
		@Override
		public void onSuccess(Boolean result) {
			if (result)
				Window.scrollTo(left, top);
		}
	});
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:16,代码来源:NotAssignedClassesPage.java

示例11: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(MESSAGES.pageEventDetail());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:EventDetail.java

示例12: __search

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public static void __search() {
	final int left = Window.getScrollLeft();
	final int top = Window.getScrollTop();
	AssignedClassesPage page = (AssignedClassesPage)RootPanel.get("UniTimeGWT:Body").getWidget(0);
	page.search(new AsyncCallback<Boolean>() {
		@Override
		public void onFailure(Throwable caught) {
		}
		@Override
		public void onSuccess(Boolean result) {
			if (result)
				Window.scrollTo(left, top);
		}
	});
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:16,代码来源:AssignedClassesPage.java

示例13: openDialog

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
@Override
public void openDialog(String title, String source, String width, String height, boolean noCacheTS) {
	if (isShowing()) hideDialog();
	GwtHint.hideHint();
	
	iScrollLeft = Window.getScrollLeft(); iScrollTop = Window.getScrollTop();
	Window.scrollTo(0, 0);

	LoadingWidget.getInstance().show("Loading " + title + " ...");
	setText(title);
	if (noCacheTS) {
		String hash = null;
		int hashIdx = source.lastIndexOf('#');
		if (hashIdx >= 0) {
			hash = source.substring(hashIdx);
			source = source.substring(0, hashIdx);
		}
		iFrame.setUrl(source + (source.indexOf('?') >= 0 ? "&" : "?") + "noCacheTS=" + new Date().getTime() + (hash == null ? "" : hash));
	} else {
		iFrame.setUrl(source);
	}
	iCheckLoadingWidgetIsShowing.schedule(30000);
	
	History.newItem(title, false);
	iPopup.setPopupPosition(0, 0);
	iPopup.show();
	RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:29,代码来源:MobileUniTimeFrameDialogImpl.java

示例14: show

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
public void show() {
	UniTimePageLabel.getInstance().setPageName(iEvent.getId() == null ? MESSAGES.pageAddEvent() : MESSAGES.pageEditEvent());
	setVisible(true);
	iLastScrollLeft = Window.getScrollLeft();
	iLastScrollTop = Window.getScrollTop();
	onShow();
	Window.scrollTo(0, 0);
	if (iForm.getRowFormatter().isVisible(iSessionRow)) {
		iSession.setFilter(this);
		iForm.setWidget(iSessionRow, 1, iSession);
	}
	iFileUpload.check();
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:14,代码来源:EventAdd.java

示例15: getViewport

import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
Rectangle getViewport() {
    return new Rectangle(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.getClientHeight());
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:4,代码来源:ViewportHelper.java


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