本文整理汇总了Java中elemental.util.Timer类的典型用法代码示例。如果您正苦于以下问题:Java Timer类的具体用法?Java Timer怎么用?Java Timer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Timer类属于elemental.util包,在下文中一共展示了Timer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MouseMovePauseDetector
import elemental.util.Timer; //导入依赖的package包/类
public MouseMovePauseDetector(Callback callback) {
this.callback = callback;
getRevisionWhenDragTimer =
new Timer() {
@Override
public void run() {
mousePaused();
}
};
}
示例2: delayedRemoveStaleInfoPopups
import elemental.util.Timer; //导入依赖的package包/类
private static void delayedRemoveStaleInfoPopups(final String markerClass) {
new Timer() {
@Override
public void run() {
removeStaleInfoPopups(markerClass);
}
}.schedule(100);
}
示例3: repeatTask
import elemental.util.Timer; //导入依赖的package包/类
@Override
protected void repeatTask(final Runnable runnable, int timeMS) {
new Timer() {
@Override
public void run() {
runnable.run();
}
}.scheduleRepeating(timeMS);
}
示例4: Tooltip
import elemental.util.Timer; //导入依赖的package包/类
private Tooltip(
AutoHideView<Void> view,
Resources res,
List<Element> targetElements,
PositionController.Positioner positioner,
TooltipRenderer renderer,
boolean shouldShowOnHover) {
super(view, new AutoHideModel());
this.positioner = positioner;
this.renderer = renderer;
this.css = res.tooltipCss();
this.targetElements = targetElements;
this.eventRemovers =
shouldShowOnHover ? attachToTargetElement() : new ArrayList<EventRemover>();
getView().setAnimationController(AnimationController.FADE_ANIMATION_CONTROLLER);
positionController = new PositionController(positioner, getView().getElement());
showTimer =
new Timer() {
@Override
public void run() {
show();
}
};
setDelay(HIDE_DELAY);
setCaptureOutsideClickOnClose(false);
getHoverController()
.setHoverListener(
new HoverController.HoverListener() {
@Override
public void onHover() {
if (isEnabled && !isShowing()) {
deferredShow();
}
}
});
}