📄 mtwb.java
字号:
MainMenu = new Form(null, new Item[] {//GEN-BEGIN:MVDGetInit2
get_stringItem1(),
get_spacer2(),
get_TFaddress(),
get_spacer1(),
get_TFsearch(),
get_spacer3(),
get_status()
});
MainMenu.addCommand(get_exitCommand1());
MainMenu.addCommand(get_helpCommand1());
MainMenu.setCommandListener(this);//GEN-END:MVDGetInit2
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd2
return MainMenu;
}//GEN-END:MVDGetEnd2
/** This method returns instance for stringItem1 component and should be called instead of accessing stringItem1 field directly.//GEN-BEGIN:MVDGetBegin3
* @return Instance for stringItem1 component
*/
public StringItem get_stringItem1()
{
if (stringItem1 == null)
{//GEN-END:MVDGetBegin3
// Insert pre-init code here
stringItem1 = new StringItem("Mobile Text Web Browser", "");//GEN-LINE:MVDGetInit3
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd3
return stringItem1;
}//GEN-END:MVDGetEnd3
/** This method returns instance for spacer2 component and should be called instead of accessing spacer2 field directly.//GEN-BEGIN:MVDGetBegin5
* @return Instance for spacer2 component
*/
public Spacer get_spacer2()
{
if (spacer2 == null)
{//GEN-END:MVDGetBegin5
// Insert pre-init code here
spacer2 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit5
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd5
return spacer2;
}//GEN-END:MVDGetEnd5
/** This method returns instance for TFaddress component and should be called instead of accessing TFaddress field directly.//GEN-BEGIN:MVDGetBegin6
* @return Instance for TFaddress component
*/
public TextField get_TFaddress()
{
if (TFaddress == null)
{//GEN-END:MVDGetBegin6
// Insert pre-init code here
TFaddress = new TextField("Enter URL address:\n", "http://www.google.com", 120, TextField.URL);//GEN-BEGIN:MVDGetInit6
TFaddress.addCommand(get_cmdGo());
TFaddress.setItemCommandListener(this);//GEN-END:MVDGetInit6
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd6
return TFaddress;
}//GEN-END:MVDGetEnd6
/** This method returns instance for spacer1 component and should be called instead of accessing spacer1 field directly.//GEN-BEGIN:MVDGetBegin7
* @return Instance for spacer1 component
*/
public Spacer get_spacer1()
{
if (spacer1 == null)
{//GEN-END:MVDGetBegin7
// Insert pre-init code here
spacer1 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit7
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd7
return spacer1;
}//GEN-END:MVDGetEnd7
/** This method returns instance for TFsearch component and should be called instead of accessing TFsearch field directly.//GEN-BEGIN:MVDGetBegin8
* @return Instance for TFsearch component
*/
public TextField get_TFsearch()
{
if (TFsearch == null)
{//GEN-END:MVDGetBegin8
// Insert pre-init code here
TFsearch = new TextField("Search on Google:\n", null, 120, TextField.ANY);//GEN-BEGIN:MVDGetInit8
TFsearch.addCommand(get_cmdSearch());
TFsearch.setItemCommandListener(this);//GEN-END:MVDGetInit8
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd8
return TFsearch;
}//GEN-END:MVDGetEnd8
/** This method returns instance for exitCommand1 component and should be called instead of accessing exitCommand1 field directly.//GEN-BEGIN:MVDGetBegin9
* @return Instance for exitCommand1 component
*/
public Command get_exitCommand1()
{
if (exitCommand1 == null)
{//GEN-END:MVDGetBegin9
// Insert pre-init code here
exitCommand1 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit9
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd9
return exitCommand1;
}//GEN-END:MVDGetEnd9
/** This method returns instance for cmdGo component and should be called instead of accessing cmdGo field directly.//GEN-BEGIN:MVDGetBegin11
* @return Instance for cmdGo component
*/
public Command get_cmdGo()
{
if (cmdGo == null)
{//GEN-END:MVDGetBegin11
// Insert pre-init code here
cmdGo = new Command("Go", Command.ITEM, 1);//GEN-LINE:MVDGetInit11
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd11
return cmdGo;
}//GEN-END:MVDGetEnd11
/** This method returns instance for Browser component and should be called instead of accessing Browser field directly.//GEN-BEGIN:MVDGetBegin13
* @return Instance for Browser component
*/
public Form get_Browser()
{
if (Browser == null)
{//GEN-END:MVDGetBegin13
// Insert pre-init code here
Browser = new Form(null, new Item[] {//GEN-BEGIN:MVDGetInit13
get_TFcontent(),
get_spacer4()
});
Browser.addCommand(get_backCommand1());
Browser.setCommandListener(this);//GEN-END:MVDGetInit13
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd13
return Browser;
}//GEN-END:MVDGetEnd13
/** This method returns instance for cmdSearch component and should be called instead of accessing cmdSearch field directly.//GEN-BEGIN:MVDGetBegin14
* @return Instance for cmdSearch component
*/
public Command get_cmdSearch()
{
if (cmdSearch == null)
{//GEN-END:MVDGetBegin14
// Insert pre-init code here
cmdSearch = new Command("Search", Command.ITEM, 1);//GEN-LINE:MVDGetInit14
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd14
return cmdSearch;
}//GEN-END:MVDGetEnd14
/** This method returns instance for exitCommand2 component and should be called instead of accessing exitCommand2 field directly.//GEN-BEGIN:MVDGetBegin16
* @return Instance for exitCommand2 component
*/
public Command get_exitCommand2()
{
if (exitCommand2 == null)
{//GEN-END:MVDGetBegin16
// Insert pre-init code here
exitCommand2 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit16
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd16
return exitCommand2;
}//GEN-END:MVDGetEnd16
/** This method returns instance for backCommand1 component and should be called instead of accessing backCommand1 field directly.//GEN-BEGIN:MVDGetBegin18
* @return Instance for backCommand1 component
*/
public Command get_backCommand1()
{
if (backCommand1 == null)
{//GEN-END:MVDGetBegin18
// Insert pre-init code here
backCommand1 = new Command("Back", Command.BACK, 1);//GEN-LINE:MVDGetInit18
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd18
return backCommand1;
}//GEN-END:MVDGetEnd18
/** This method returns instance for TFcontent component and should be called instead of accessing TFcontent field directly.//GEN-BEGIN:MVDGetBegin20
* @return Instance for TFcontent component
*/
public StringItem get_TFcontent()
{
if (TFcontent == null)
{//GEN-END:MVDGetBegin20
// Insert pre-init code here
TFcontent = new StringItem("", "...\n");//GEN-LINE:MVDGetInit20
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd20
return TFcontent;
}//GEN-END:MVDGetEnd20
/** This method returns instance for spacer3 component and should be called instead of accessing spacer3 field directly.//GEN-BEGIN:MVDGetBegin21
* @return Instance for spacer3 component
*/
public Spacer get_spacer3()
{
if (spacer3 == null)
{//GEN-END:MVDGetBegin21
// Insert pre-init code here
spacer3 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit21
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd21
return spacer3;
}//GEN-END:MVDGetEnd21
/** This method returns instance for status component and should be called instead of accessing status field directly.//GEN-BEGIN:MVDGetBegin22
* @return Instance for status component
*/
public StringItem get_status()
{
if (status == null)
{//GEN-END:MVDGetBegin22
// Insert pre-init code here
status = new StringItem("Status", "Ready\n");//GEN-LINE:MVDGetInit22
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd22
return status;
}//GEN-END:MVDGetEnd22
/** This method returns instance for spacer4 component and should be called instead of accessing spacer4 field directly.//GEN-BEGIN:MVDGetBegin23
* @return Instance for spacer4 component
*/
public Spacer get_spacer4()
{
if (spacer4 == null)
{//GEN-END:MVDGetBegin23
// Insert pre-init code here
spacer4 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit23
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd23
return spacer4;
}//GEN-END:MVDGetEnd23
/** This method returns instance for helpCommand1 component and should be called instead of accessing helpCommand1 field directly.//GEN-BEGIN:MVDGetBegin24
* @return Instance for helpCommand1 component
*/
public Command get_helpCommand1()
{
if (helpCommand1 == null)
{//GEN-END:MVDGetBegin24
// Insert pre-init code here
helpCommand1 = new Command("Help", Command.HELP, 1);//GEN-LINE:MVDGetInit24
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd24
return helpCommand1;
}//GEN-END:MVDGetEnd24
/** This method returns instance for helpAlert component and should be called instead of accessing helpAlert field directly.//GEN-BEGIN:MVDGetBegin26
* @return Instance for helpAlert component
*/
public Alert get_helpAlert()
{
if (helpAlert == null)
{//GEN-END:MVDGetBegin26
// Insert pre-init code here
helpAlert = new Alert("Help", "Welcome to MTWB. With this program you may open HTML pages. This can be done by entering the URL into the appropriate box. You may also perform Google search by using another text box.", null, AlertType.INFO);//GEN-BEGIN:MVDGetInit26
helpAlert.setTimeout(-2);//GEN-END:MVDGetInit26
// Insert post-init code here
}//GEN-BEGIN:MVDGetEnd26
return helpAlert;
}//GEN-END:MVDGetEnd26
public void startApp()
{
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -