黑莓jre4.5,突出显示URL

发布于 2025-01-06 07:43:56 字数 149 浏览 0 评论 0原文

我有一个扩展Field的对象,我使用paint方法使用graphics.drawText绘制文本。我想要一个 url,当用户滚动它时,它会突出显示。单击时,它会调用浏览器访问该链接。

就像黑莓中的正常行为一样。

请指导我。

谢谢, 阿里

I have an object that extends Field, I use the paint method to draw text using graphics.drawText. I want to have url, and when the user scrolls over it, it gets highlighted. and when clicked it invokes the browser to the link.

like the normal behaviour in the blackberry.

Please direct me.

Thanks,
Aly

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风铃鹿 2025-01-13 07:43:56

您可以使用 LabelField 作为按钮,如下所示:

LabelField labelField = new LabelField("label to show",FOCUSABLE){
    protected boolean invokeAction(int action) {
        if ( action == ACTION_INVOKE){
            // browsing...
        }
        return super.invokeAction( action );
    }
};

You can use LabelField as a button like this:

LabelField labelField = new LabelField("label to show",FOCUSABLE){
    protected boolean invokeAction(int action) {
        if ( action == ACTION_INVOKE){
            // browsing...
        }
        return super.invokeAction( action );
    }
};
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文