我创建了 LWUIT 标签。我想识别最终用户的标签点击事件,需要放置一些逻辑?如何识别标签点击事件?
这是我的代码:
topnews = new Vector();
topstory = new Vector();
cinemanews = new Vector();
newsList = new List(topnews);
newsList.setScrollVisible(false);
newsList.setRenderer(new NewsListCellRenderer());
myNewsList = new List(topstory);
myNewsList.setScrollVisible(false);
myNewsList.setRenderer(new NewsListCellRenderer());
cinemaNewsList = new List(cinemanews);
cinemaNewsList.setScrollVisible(false);
cinemaNewsList.setRenderer(new NewsListCellRenderer());
Tabs tabs = new Tabs();
tabs.addTab("Topnews", newsList);
tabs.addTab("TopStory", myNewsList);
tabs.addTab("CinemaNews", cinemaNewsList);
tabs.addTabsFocusListener(new FocusListener() {
public void focusGained(Component cmpnt) {
//how to identify the enduser tab click event here?
}
}
谢谢,