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


Java Label.shouldTickerStart方法代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:30,代码来源:GenericListCellRenderer.java

示例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);
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:12,代码来源:DefaultLookAndFeel.java

示例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);
        }
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:12,代码来源:DefaultLookAndFeel.java


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