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


Java Timer.schedule方法代码示例

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


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

示例1: onPlayerEvent

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Override
public void onPlayerEvent(PlayerEvent event) {
    if (testMode) {
        return;
    }

    if (event.getType() == PAGE_LOADED) {
        Timer timer = new Timer() {
            @Override
            public void run() {
                setEnabled(!isEnd());
                setStyleName();
            }
        };
        timer.schedule(300);
    } else if (event.getType() == BEFORE_FLOW) {
        setEnabled(false);
        setStyleName();
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:21,代码来源:NavigationButtonModule.java

示例2: VideoControlHideTimer

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Inject
public VideoControlHideTimer(@Assisted VideoFullScreenView view, EventsBus eventsBus) {
    this.view = view;
    this.eventsBus = eventsBus;
    view.getContainer().addDomHandler(this, TouchEndEvent.getType());
    view.getContainer().addDomHandler(this, ClickEvent.getType());
    view.getContainer().addDomHandler(this, MouseMoveEvent.getType());
    controlsHideTimer = new Timer() {

        @Override
        public void run() {
            hideCotrols();
        }
    };
    controlsHideTimer.schedule(CONTROLS_SHOW_TIME);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:17,代码来源:VideoControlHideTimer.java

示例3: addNotification

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
protected void addNotification(final Notification notification) {
	for (Iterator<Notification> i = iNotifications.iterator(); i.hasNext(); ) {
		Notification n = i.next();
		if (n.getText().equals(notification.getText())) {
			i.remove();
		}
	}
	iNotifications.add(notification);
	populate("slideup");
	
	Timer timer = new Timer() {
		@Override
		public void run() {
			iNotifications.remove(notification);
			populate(null);
		}
	};
	timer.schedule(10000);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:20,代码来源:MobileNotifications.java

示例4: UniTimePageHeader

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
private UniTimePageHeader() {
	iHeader = new PageHeader();

	getLeft().setCallback(new Callback() {
		@Override
		public void execute(Callback callback) {
			reloadSolverInfo(true, callback);
		}
	});

	reloadSessionInfo();
	reloadUserInfo();
	iTimer = new Timer() {
		@Override
		public void run() {
			reloadSolverInfo(getLeft().isPopupShowing(), null);
		}
	};
	iTimer.schedule(1000);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:21,代码来源:UniTimePageHeader.java

示例5: executeCommandPause

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
private void executeCommandPause(final PromptlyPanel panel) {
   panel.setBlockingHyperlinks(true);
   panel.append("Pausing for 3 seconds (all input ignored) ....");
   panel.setCommandLineMode(false /* is command line mode */, false /* is collect key events */, false /* is collect mouse events */);

   Timer t = new Timer() {
      
      @Override
      public void run() {
         panel.append("... and we are back !");
         panel.setBlockingHyperlinks(false);
         panel.setCommandLineMode(true /* is command line mode */, true /* is collect key events */, true /* is collect mouse events */);
      }
   };
   
   t.schedule(3000);
}
 
开发者ID:ainslec,项目名称:gwt-promptly,代码行数:18,代码来源:DemoUI.java

示例6: testNoEvents

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
/** Verify that no events are issued via newItem if there were not reqeuested. */
public void testNoEvents() {
  delayTestFinish(5000);

  addHistoryListenerImpl(event -> fail("onHistoryChanged should not have been called"));

  History.newItem("testNoEvents", false);

  timer =
      new Timer() {
        @Override
        public void run() {
          finishTest();
        }
      };
  timer.schedule(500);
}
 
开发者ID:tbroyer,项目名称:gwt-history,代码行数:18,代码来源:HistoryTest.java

示例7: testNoDoubleTokenUnEscaping

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
/**
 * Test to make sure that there is no double unescaping of hash values. See
 * https://bugzilla.mozilla.org/show_bug.cgi?id=483304
 */
@DoNotRunWith(Platform.HtmlUnitUnknown)
public void testNoDoubleTokenUnEscaping() {
  final String shouldBeEncoded = "abc%20abc";

  delayTestFinish(5000);

  History.newItem(shouldBeEncoded);
  History.newItem("someOtherToken");
  History.back();
  // allow browser to update the url
  timer =
      new Timer() {
        @Override
        public void run() {
          // make sure that value in url actually matches the original token
          assertEquals(shouldBeEncoded, History.getToken());
          finishTest();
        }
      };
  timer.schedule(200);
}
 
开发者ID:tbroyer,项目名称:gwt-history,代码行数:26,代码来源:HistoryTest.java

示例8: it

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
public static void it(String html) {
try {
    buildFrame(html);

    if (USE_TIMER) {
	Timer timer	= new Timer() {
		public void run() {
		    printFrame();
		}
	    };
	timer.schedule(TIMER_DELAY * 1000);
    } else {
	DeferredCommand.addCommand(new Command() {
		public void execute() {
		    printFrame();
		}
	    });
    }

} catch (Throwable exc) {
    Window.alert(exc.getMessage());
}
   }
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:24,代码来源:Print.java

示例9: GoogleDriveView

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Inject
GoogleDriveView(Binder uiBinder) {
    initWidget(uiBinder.createAndBindUi(this));
    splash.show();
    Timer t = new Timer() {
        @Override
        public void run() {
            splash.hide();
        }
    };
    t.schedule(5000);
    search.addCloseHandler(event -> {
        appNav.setVisible(true);
        searchNav.setVisible(false);
    });
    search.addKeyUpHandler(event -> {
        List<DriveDTO> filteredFiles = DataHelper.getAllDrives().stream().filter(dto -> dto.getFileName().toLowerCase().contains(search.getText().toLowerCase())).collect(Collectors.toList());
        populateFiles(filteredFiles);
    });
    populateFiles(DataHelper.getAllDrives());
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:22,代码来源:GoogleDriveView.java

示例10: GoogleContactsView

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Inject
GoogleContactsView(Binder uiBinder) {
    initWidget(uiBinder.createAndBindUi(this));
    splash.show();
    Timer t = new Timer() {
        @Override
        public void run() {
            splash.hide();
        }
    };
    t.schedule(5000);
    search.addCloseHandler(event -> {
        appNav.setVisible(true);
        searchNav.setVisible(false);
    });
    search.addKeyUpHandler(event -> {
        List<UserDTO> filteredUser = DataHelper.getAllUsers().stream().filter(dto -> dto.getName().toLowerCase().contains(search.getText().toLowerCase())).collect(Collectors.toList());
        populateUsers(filteredUser);
    });
    populateUsers(DataHelper.getAllUsers());
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:22,代码来源:GoogleContactsView.java

示例11: onChange

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Override
public void onChange(FolderEventConstant event) {
	if (event.equals(HasFolderEvent.FOLDER_CHANGED)) {
		Workflow.get().setTabFolderSelected();
		workflowManager.findProcessInstancesByNode(Workflow.get().getUuid());
	} else if (event.equals(HasFolderEvent.TAB_CHANGED)) {
		if (TabFolderComunicator.isWidgetExtensionVisible(this)) {
			Timer timer = new Timer() {
				@Override
				public void run() {
					workflowManager.fillWidth();
				}
			};
			timer.schedule(100);
		}
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:18,代码来源:TabFolderWorkflow.java

示例12: onChange

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Override
public void onChange(DocumentEventConstant event) {
	if (event.equals(HasDocumentEvent.DOCUMENT_CHANGED)) {
		Workflow.get().setTabDocumentSelected();
		workflowManager.findProcessInstancesByNode(Workflow.get().getUuid());
	} else if (event.equals(HasDocumentEvent.TAB_CHANGED)) {
		if (TabDocumentComunicator.isWidgetExtensionVisible(this)) {
			Timer timer = new Timer() {
				@Override
				public void run() {
					workflowManager.fillWidth();
				}
			};
			timer.schedule(100);
		}
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:18,代码来源:TabDocumentWorkflow.java

示例13: onChange

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
@Override
public void onChange(MailEventConstant event) {
	if (event.equals(HasMailEvent.MAIL_CHANGED)) {
		Workflow.get().setTabMailSelected();
		workflowManager.findProcessInstancesByNode(Workflow.get().getUuid());
	} else if (event.equals(HasMailEvent.TAB_CHANGED)) {
		if (TabMailComunicator.isWidgetExtensionVisible(this)) {
			Timer timer = new Timer() {
				@Override
				public void run() {
					workflowManager.fillWidth();
				}
			};
			timer.schedule(100);
		}
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:18,代码来源:TabMailWorkflow.java

示例14: logout

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
/**
 * logout
 */
private void logout(final HTML countDown, final int seconds) {
	Timer timer = new Timer() {
		@Override
		public void run() {
			countDown.setHTML(Main.i18n("ui.logout") + " " + secondsToHTML(seconds));

			if (seconds > 1) {
				logout(countDown, seconds - 1);
			} else {
				hide();
				Main.get().logoutPopup.logout();
			}
		}
	};

	timer.schedule(1000);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:21,代码来源:MsgPopup.java

示例15: logoutAfterChat

import com.google.gwt.user.client.Timer; //导入方法依赖的package包/类
/**
 * logoutAfterChat();
 */
private void logoutAfterChat() {
	Timer timer = new Timer() {
		@Override
		public void run() {
			if (!Main.get().mainPanel.bottomPanel.userInfo.isPendingToClose()) {
				authService.logout(callbackLogout);
			} else {
				logoutAfterChat();
			}
		}
	};

	timer.schedule(100); // Each minute seconds refreshing connected users
	Log.debug("Logout: void");
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:19,代码来源:LogoutPopup.java


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