📄 twittering.java
字号:
}//GEN-BEGIN:MVDGetEnd8
return goToDirectMsgs;
}//GEN-END:MVDGetEnd8
/** This method returns instance for saveSettings component and should be called instead of accessing saveSettings field directly.//GEN-BEGIN:MVDGetBegin12
* @return Instance for saveSettings component
*/
public Command get_saveSettings()
{
if (saveSettings == null)
{//GEN-END:MVDGetBegin12
// Insert pre-init code here
saveSettings = new Command("Save", Command.SCREEN, 1);//GEN-LINE:MVDGetInit12
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd12
return saveSettings;
}//GEN-END:MVDGetEnd12
/** This method returns instance for exitSettings component and should be called instead of accessing exitSettings field directly.//GEN-BEGIN:MVDGetBegin14
* @return Instance for exitSettings component
*/
public Command get_exitSettings()
{
if (exitSettings == null)
{//GEN-END:MVDGetBegin14
// Insert pre-init code here
exitSettings = new Command("Back", Command.BACK, 1);//GEN-LINE:MVDGetInit14
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd14
return exitSettings;
}//GEN-END:MVDGetEnd14
/** This method returns instance for settingsUser component and should be called instead of accessing settingsUser field directly.//GEN-BEGIN:MVDGetBegin16
* @return Instance for settingsUser component
*/
public TextField get_settingsUser()
{
if (settingsUser == null)
{//GEN-END:MVDGetBegin16
// Insert pre-init code here
settingsUser = new TextField("Username", null, 120, TextField.ANY);//GEN-LINE:MVDGetInit16
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd16
return settingsUser;
}//GEN-END:MVDGetEnd16
/** This method returns instance for settingsPass component and should be called instead of accessing settingsPass field directly.//GEN-BEGIN:MVDGetBegin17
* @return Instance for settingsPass component
*/
public TextField get_settingsPass()
{
if (settingsPass == null)
{//GEN-END:MVDGetBegin17
// Insert pre-init code here
settingsPass = new TextField("Password", null, 120, TextField.ANY | TextField.PASSWORD);//GEN-LINE:MVDGetInit17
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd17
return settingsPass;
}//GEN-END:MVDGetEnd17
/** This method returns instance for whatAreYouDoing component and should be called instead of accessing whatAreYouDoing field directly.//GEN-BEGIN:MVDGetBegin18
* @return Instance for whatAreYouDoing component
*/
public TextField get_whatAreYouDoing()
{
if (whatAreYouDoing == null)
{//GEN-END:MVDGetBegin18
// Insert pre-init code here
whatAreYouDoing = new TextField("Characters Available: 160", null, 160, TextField.ANY);//GEN-BEGIN:MVDGetInit18
whatAreYouDoing.addCommand(get_sendTweetItem());
whatAreYouDoing.addCommand(get_clearTweet());
whatAreYouDoing.addCommand(get_saveWhatAreYouDoing());
whatAreYouDoing.setItemCommandListener(this);//GEN-END:MVDGetInit18
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd18
return whatAreYouDoing;
}//GEN-END:MVDGetEnd18
/** This method returns instance for sendTweetBtn component and should be called instead of accessing sendTweetBtn field directly.//GEN-BEGIN:MVDGetBegin19
* @return Instance for sendTweetBtn component
*/
public StringItem get_sendTweetBtn()
{
if (sendTweetBtn == null)
{//GEN-END:MVDGetBegin19
// Insert pre-init code here
sendTweetBtn = new StringItem("", "Update", javax.microedition.lcdui.Item.BUTTON);//GEN-BEGIN:MVDGetInit19
sendTweetBtn.addCommand(get_sendTweet());
sendTweetBtn.setItemCommandListener(this);
sendTweetBtn.setLayout(Item.LAYOUT_NEWLINE_BEFORE);//GEN-END:MVDGetInit19
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd19
return sendTweetBtn;
}//GEN-END:MVDGetEnd19
/** This method returns instance for spacer1 component and should be called instead of accessing spacer1 field directly.//GEN-BEGIN:MVDGetBegin20
* @return Instance for spacer1 component
*/
public Spacer get_spacer1()
{
if (spacer1 == null)
{//GEN-END:MVDGetBegin20
// Insert pre-init code here
spacer1 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit20
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd20
return spacer1;
}//GEN-END:MVDGetEnd20
/** This method returns instance for dmMsg component and should be called instead of accessing dmMsg field directly.//GEN-BEGIN:MVDGetBegin22
* @return Instance for dmMsg component
*/
public TextField get_dmMsg()
{
if (dmMsg == null)
{//GEN-END:MVDGetBegin22
// Insert pre-init code here
dmMsg = new TextField("Characters Available: 160", null, 160, TextField.ANY);//GEN-BEGIN:MVDGetInit22
dmMsg.addCommand(get_sendDirectMessageItem());
dmMsg.addCommand(get_clearDirectMsgText());
dmMsg.addCommand(get_saveDirectMessage());
dmMsg.setItemCommandListener(this);//GEN-END:MVDGetInit22
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd22
return dmMsg;
}//GEN-END:MVDGetEnd22
/** This method returns instance for sendDirectMessageBtn component and should be called instead of accessing sendDirectMessageBtn field directly.//GEN-BEGIN:MVDGetBegin23
* @return Instance for sendDirectMessageBtn component
*/
public StringItem get_sendDirectMessageBtn()
{
if (sendDirectMessageBtn == null)
{//GEN-END:MVDGetBegin23
// Insert pre-init code here
sendDirectMessageBtn = new StringItem("", "Send Direct Message", javax.microedition.lcdui.Item.BUTTON);//GEN-BEGIN:MVDGetInit23
sendDirectMessageBtn.addCommand(get_sendDirectMsg());
sendDirectMessageBtn.setItemCommandListener(this);//GEN-END:MVDGetInit23
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd23
return sendDirectMessageBtn;
}//GEN-END:MVDGetEnd23
/** This method returns instance for dmUserText component and should be called instead of accessing dmUserText field directly.//GEN-BEGIN:MVDGetBegin25
* @return Instance for dmUserText component
*/
public TextField get_dmUserText()
{
if (dmUserText == null)
{//GEN-END:MVDGetBegin25
// Insert pre-init code here
dmUserText = new TextField("Username", null, 120, TextField.ANY);//GEN-BEGIN:MVDGetInit25
dmUserText.addCommand(get_popupSelectUser());
dmUserText.addCommand(get_saveUsername());
dmUserText.addCommand(get_clearUserName());
dmUserText.setItemCommandListener(this);//GEN-END:MVDGetInit25
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd25
return dmUserText;
}//GEN-END:MVDGetEnd25
/** This method returns instance for lblDM component and should be called instead of accessing lblDM field directly.//GEN-BEGIN:MVDGetBegin26
* @return Instance for lblDM component
*/
public StringItem get_lblDM()
{
if (lblDM == null)
{//GEN-END:MVDGetBegin26
// Insert pre-init code here
lblDM = new StringItem("Direct Message", "");//GEN-LINE:MVDGetInit26
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd26
return lblDM;
}//GEN-END:MVDGetEnd26
/** This method returns instance for goToMainPage component and should be called instead of accessing goToMainPage field directly.//GEN-BEGIN:MVDGetBegin32
* @return Instance for goToMainPage component
*/
public Command get_goToMainPage()
{
if (goToMainPage == null)
{//GEN-END:MVDGetBegin32
// Insert pre-init code here
goToMainPage = new Command("Main Page", Command.SCREEN, 2);//GEN-LINE:MVDGetInit32
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd32
return goToMainPage;
}//GEN-END:MVDGetEnd32
/** This method returns instance for sendTweet component and should be called instead of accessing sendTweet field directly.//GEN-BEGIN:MVDGetBegin34
* @return Instance for sendTweet component
*/
public Command get_sendTweet()
{
if (sendTweet == null)
{//GEN-END:MVDGetBegin34
// Insert pre-init code here
sendTweet = new Command("Send Update", Command.ITEM, 1);//GEN-LINE:MVDGetInit34
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd34
return sendTweet;
}//GEN-END:MVDGetEnd34
/** This method returns instance for sendDirectMsg component and should be called instead of accessing sendDirectMsg field directly.//GEN-BEGIN:MVDGetBegin36
* @return Instance for sendDirectMsg component
*/
public Command get_sendDirectMsg()
{
if (sendDirectMsg == null)
{//GEN-END:MVDGetBegin36
// Insert pre-init code here
sendDirectMsg = new Command("Send Direct Message", Command.ITEM, 1);//GEN-LINE:MVDGetInit36
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd36
return sendDirectMsg;
}//GEN-END:MVDGetEnd36
/** This method returns instance for popupSelectUser component and should be called instead of accessing popupSelectUser field directly.//GEN-BEGIN:MVDGetBegin40
* @return Instance for popupSelectUser component
*/
public Command get_popupSelectUser()
{
if (popupSelectUser == null)
{//GEN-END:MVDGetBegin40
// Insert pre-init code here
popupSelectUser = new Command("Select User", Command.ITEM, 1);//GEN-LINE:MVDGetInit40
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd40
return popupSelectUser;
}//GEN-END:MVDGetEnd40
/** This method returns instance for clearTweet component and should be called instead of accessing clearTweet field directly.//GEN-BEGIN:MVDGetBegin46
* @return Instance for clearTweet component
*/
public Command get_clearTweet()
{
if (clearTweet == null)
{//GEN-END:MVDGetBegin46
// Insert pre-init code here
clearTweet = new Command("Clear All", Command.ITEM, 3);//GEN-LINE:MVDGetInit46
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd46
return clearTweet;
}//GEN-END:MVDGetEnd46
/** This method returns instance for clearDirectMsgText component and should be called instead of accessing clearDirectMsgText field directly.//GEN-BEGIN:MVDGetBegin48
* @return Instance for clearDirectMsgText component
*/
public Command get_clearDirectMsgText()
{
if (clearDirectMsgText == null)
{//GEN-END:MVDGetBegin48
// Insert pre-init code here
clearDirectMsgText = new Command("Clear All", Command.ITEM, 3);//GEN-LINE:MVDGetInit48
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd48
return clearDirectMsgText;
}//GEN-END:MVDGetEnd48
/** This method returns instance for formSelectUser component and should be called instead of accessing formSelectUser field directly.//GEN-BEGIN:MVDGetBegin56
* @return Instance for formSelectUser component
*/
public Form get_formSelectUser()
{
if (formSelectUser == null)
{//GEN-END:MVDGetBegin56
// Insert pre-init code here
formSelectUser = new Form("Select Friend", new Item[0]);//GEN-BEGIN:MVDGetInit56
formSelectUser.addCommand(get_refreshUserList());
formSelectUser.addCommand(get_backToMain());
formSelectUser.setCommandListener(this);//GEN-END:MVDGetInit56
// Insert post-init code here
append_friendList(data.getFriends(), formSelectUser);
}//GEN-BEGIN:MVDGetEnd56
return formSelectUser;
}//GEN-END:MVDGetEnd56
/** This method returns instance for refreshUserList component and should be called instead of accessing refreshUserList field directly.//GEN-BEGIN:MVDGetBegin57
* @return Instance for refreshUserList component
*/
public Command get_refreshUserList()
{
if (refreshUserList == null)
{//GEN-END:MVDGetBegin57
// Insert pre-init code here
refreshUserList = new Command("Refresh Friends List", Command.SCREEN, 1);//GEN-LINE:MVDGetInit57
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd57
return refreshUserList;
}//GEN-END:MVDGetEnd57
/** This method returns instance for backToMain component and should be called instead of accessing backToMain field directly.//GEN-BEGIN:MVDGetBegin61
* @return Instance for backToMain component
*/
public Command get_backToMain()
{
if (backToMain == null)
{//GEN-END:MVDGetBegin61
// Insert pre-init code here
backToMain = new Command("Back", Command.BACK, 1);//GEN-LINE:MVDGetInit61
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd61
return backToMain;
}//GEN-END:MVDGetEnd61
public void append_friendList(Vector v, Form form)
{
if (v != null)
{
for(int i=0; i < v.size(); i++)
{
StringItem friend = new StringItem("",v.elementAt(i).toString(), StringItem.BUTTON);
friend.setLayout(Item.LAYOUT_2 | Item.LAYOUT_NEWLINE_AFTER);
friend.addCommand(get_selectFriend());
friend.setItemCommandListener(this);
form.append(friend);
}
}
}
/** This method returns instance for selectFriend component and should be called instead of accessing selectFriend field directly.//GEN-BEGIN:MVDGetBegin64
* @return Instance for selectFriend component
*/
public Command get_selectFriend()
{
if (selectFriend == null)
{//GEN-END:MVDGetBegin64
// Insert pre-init code here
selectFriend = new Command("Select", Command.ITEM, 1);//GEN-LINE:MVDGetInit64
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd64
return selectFriend;
}//GEN-END:MVDGetEnd64
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -