本文整理汇总了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);
}
}
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
});
}
示例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);
}
示例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);
}
});
}
示例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);
}
示例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();
}
示例15: getViewport
import com.google.gwt.user.client.Window; //导入方法依赖的package包/类
Rectangle getViewport() {
return new Rectangle(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.getClientHeight());
}