本文整理汇总了Java中org.apache.harmony.awt.PeriodicTimer类的典型用法代码示例。如果您正苦于以下问题:Java PeriodicTimer类的具体用法?Java PeriodicTimer怎么用?Java PeriodicTimer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PeriodicTimer类属于org.apache.harmony.awt包,在下文中一共展示了PeriodicTimer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ChoicePopupBox
import org.apache.harmony.awt.PeriodicTimer; //导入依赖的package包/类
public ChoicePopupBox(Choice choice) {
scrollLocation = 0;
this.choice = choice;
style = choice.popupStyle;
vAdj = new ScrollPaneAdjustable(choice, Adjustable.VERTICAL) {
private static final long serialVersionUID = 2280561825998835980L;
@Override
void repaintComponent(Rectangle r) {
if (isVisible()) {
repaint(r);
}
}
};
scrollable = new ChoiceScrollable();
listState = new ChoiceListState();
scrollController = new ScrollStateController(scrollable);
scrollbarController = vAdj.getStateController();
vAdj.addAdjustmentListener(scrollController);
nSkip = MAX_SKIP;
dragScrollTimer = new PeriodicTimer(25l, getAsyncHandler(getDragScrollHandler()));
}
示例2: createTimer
import org.apache.harmony.awt.PeriodicTimer; //导入依赖的package包/类
Object createTimer(final boolean isMagicTimer, final int delay) {
return isMagicTimer ? new PeriodicTimer(DEFAULT_MAGIC_DELAY,
(Runnable)getMagicAction())
: new PeriodicTimer(getCaretBlinkRate(),
(Runnable)getBlinkAction());
}
示例3: startTimer
import org.apache.harmony.awt.PeriodicTimer; //导入依赖的package包/类
void startTimer(final Object timer) {
((PeriodicTimer)timer).start();
}
示例4: stopTimer
import org.apache.harmony.awt.PeriodicTimer; //导入依赖的package包/类
void stopTimer(final Object timer) {
((PeriodicTimer)timer).stop();
}