本文整理汇总了Java中com.codename1.ui.Label.shouldTickerStart方法的典型用法代码示例。如果您正苦于以下问题:Java Label.shouldTickerStart方法的具体用法?Java Label.shouldTickerStart怎么用?Java Label.shouldTickerStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.codename1.ui.Label
的用法示例。
在下文中一共展示了Label.shouldTickerStart方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setComponentValueWithTickering
import com.codename1.ui.Label; //导入方法依赖的package包/类
private void setComponentValueWithTickering(Component cmp, Object value, Component l, Component rootRenderer) {
setComponentValue(cmp, value, l, rootRenderer);
if(cmp instanceof Label) {
if(selectionListener) {
if(l instanceof List) {
((List)l).addActionListener(mon);
}
parentList = l;
}
Label label = (Label)cmp;
if(label.shouldTickerStart() && Display.getInstance().shouldRenderSelection()) {
if(!label.isTickerRunning()) {
parentList = l;
if(parentList != null) {
Form f = parentList.getComponentForm();
if(f != null) {
f.registerAnimated(mon);
label.startTicker(cmp.getUIManager().getLookAndFeel().getTickerSpeed(), true);
}
}
}
} else {
if(label.isTickerRunning()) {
label.stopTicker();
}
label.setTextPosition(0);
}
}
}
示例2: focusGained
import com.codename1.ui.Label; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public void focusGained(Component cmp) {
if(cmp instanceof Label) {
Label l = (Label) cmp;
if (l.isTickerEnabled() && l.shouldTickerStart() && Display.getInstance().shouldRenderSelection(cmp)) {
((Label) cmp).startTicker(getTickerSpeed(), true);
}
}
}
示例3: focusGained
import com.codename1.ui.Label; //导入方法依赖的package包/类
/**
* @inheritDoc
*/
public void focusGained(Component cmp) {
if(cmp instanceof Label) {
Label l = (Label) cmp;
if (l.isTickerEnabled() && l.shouldTickerStart() && Display.getInstance().shouldRenderSelection(cmp)) {
((Label) cmp).startTicker(getTickerSpeed(), true);
}
}
}