Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 75.12 KB | None | 0 0
  1. package remotepcclient;
  2.  
  3. import javax.microedition.lcdui.*;
  4. import org.netbeans.microedition.lcdui.SplashScreen;
  5. import org.netbeans.microedition.lcdui.WaitScreen;
  6. import org.netbeans.microedition.util.SimpleCancellableTask;
  7.  
  8. /**
  9.  * @author Jakub Strnad
  10.  */
  11. public class GUI implements CommandListener {
  12.  
  13.     private CoreMIDlet midlet;
  14.     //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
  15.     private SplashScreen splashScreen;
  16.     private List mainMenu;
  17.     private List btSearchList;
  18.     private Form tcpForm;
  19.     private TextField serverAddrTF;
  20.     private TextField serverPortTF;
  21.     private TextBox btPwdTB;
  22.     private MyCanvas myCanvas;
  23.     private List settings;
  24.     private TextBox insertTextTB;
  25.     private Form advancedSettings;
  26.     private ChoiceGroup rotateGroup;
  27.     private TextField delayTF;
  28.     private Gauge mouseSpeedGG;
  29.     private List keySettings;
  30.     private WaitScreen tcpConnectWait;
  31.     private Alert tcpConnError;
  32.     private TextBox tcpPwdTB;
  33.     private WaitScreen tcpLoginWait;
  34.     private Alert tcpWrongPwd;
  35.     private WaitScreen btSearchWait;
  36.     private Alert btErrorAlert;
  37.     private Alert connectionLostAlert;
  38.     private WaitScreen btLoginWait;
  39.     private WaitScreen btConnectWait;
  40.     private Alert btWrongPwd;
  41.     private SetKeysCanvas setKeysCanvas;
  42.     private Command exitCmd;
  43.     private Command backCommand1;
  44.     private Command backCommand;
  45.     private Command btConnectCmd1;
  46.     private Command tcpConnCmd;
  47.     private Command btConnectCmd;
  48.     private Command disconnectCmd;
  49.     private Command settingsCmd1;
  50.     private Command insertTextCmd;
  51.     private Command insertOkCommand;
  52.     private Command cancelCommand;
  53.     private Command selectItemCmd;
  54.     private Command btSearchCmd;
  55.     private Command backCommand2;
  56.     private Command cancelCommand1;
  57.     private Command saveAdvSettings;
  58.     private Command selectItemCmd2;
  59.     private Command tcpSendPassCmd;
  60.     private Command backCommand3;
  61.     private Command okCommand;
  62.     private Command backCommand4;
  63.     private Command itemCommand;
  64.     private Command backCommand5;
  65.     private Command cancelCommand2;
  66.     private Command saveCmd;
  67.     private Image ikona128;
  68.     private Font font;
  69.     private Image connecting;
  70.     private Image keyico;
  71.     private Image btico;
  72.     //</editor-fold>//GEN-END:|fields|0|
  73.  
  74.     /**
  75.      * The GUI constructor.
  76.      * @param midlet the midlet used for getting
  77.      */
  78.     public GUI(CoreMIDlet midlet) {
  79.         this.midlet = midlet;
  80.     }
  81.  
  82.     //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
  83.     //</editor-fold>//GEN-END:|methods|0|
  84.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
  85.     /**
  86.      * Initilizes the application.
  87.      * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
  88.      */
  89.     private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
  90.         // write pre-initialize user code here
  91. //GEN-LINE:|0-initialize|1|0-postInitialize
  92.         // write post-initialize user code here
  93.     }//GEN-BEGIN:|0-initialize|2|
  94.     //</editor-fold>//GEN-END:|0-initialize|2|
  95.  
  96.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|2-switchDisplayable|0|2-preSwitch
  97.     /**
  98.      * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
  99.      * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
  100.      * @param nextDisplayable the Displayable to be set
  101.      */
  102.     public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|2-switchDisplayable|0|2-preSwitch
  103.         // write pre-switch user code here
  104.         Display display = getDisplay();//GEN-BEGIN:|2-switchDisplayable|1|2-postSwitch
  105.         if (alert == null) {
  106.             display.setCurrent(nextDisplayable);
  107.         } else {
  108.             display.setCurrent(alert, nextDisplayable);
  109.         }//GEN-END:|2-switchDisplayable|1|2-postSwitch
  110.         // write post-switch user code here
  111.     }//GEN-BEGIN:|2-switchDisplayable|2|
  112.     //</editor-fold>//GEN-END:|2-switchDisplayable|2|
  113.  
  114.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|4-commandAction|0|4-preCommandAction
  115.     /**
  116.      * Called by a system to indicated that a command has been invoked on a particular displayable.
  117.      * @param command the Command that was invoked
  118.      * @param displayable the Displayable where the command was invoked
  119.      */
  120.     public void commandAction(Command command, Displayable displayable) {//GEN-END:|4-commandAction|0|4-preCommandAction
  121.         // write pre-action user code here
  122.         if (displayable == advancedSettings) {//GEN-BEGIN:|4-commandAction|1|115-preAction
  123.             if (command == cancelCommand1) {//GEN-END:|4-commandAction|1|115-preAction
  124.                 // write pre-action user code here
  125.                 switchDisplayable(null, getSettings());//GEN-LINE:|4-commandAction|2|115-postAction
  126.                 // write post-action user code here
  127.             } else if (command == saveAdvSettings) {//GEN-LINE:|4-commandAction|3|113-preAction
  128.                 midlet.setRotated(getRotateGroup().isSelected(0));
  129.                 midlet.setMouseStep(getMouseSpeedGG().getValue());
  130.                 midlet.setDelay(Integer.parseInt(getDelayTF().getString()));
  131.                 switchDisplayable(null, getSettings());//GEN-LINE:|4-commandAction|4|113-postAction
  132.                 // write post-action user code here
  133.             }//GEN-BEGIN:|4-commandAction|5|200-preAction
  134.         } else if (displayable == btConnectWait) {
  135.             if (command == WaitScreen.FAILURE_COMMAND) {//GEN-END:|4-commandAction|5|200-preAction
  136.                 // write pre-action user code here
  137.                 switchDisplayable(null, getBtSearchList());//GEN-LINE:|4-commandAction|6|200-postAction
  138.                 // write post-action user code here
  139.             } else if (command == WaitScreen.SUCCESS_COMMAND) {//GEN-LINE:|4-commandAction|7|199-preAction
  140.                 // write pre-action user code here
  141.                 switchDisplayable(null, getBtPwdTB());//GEN-LINE:|4-commandAction|8|199-postAction
  142.                 // write post-action user code here
  143.             }//GEN-BEGIN:|4-commandAction|9|184-preAction
  144.         } else if (displayable == btLoginWait) {
  145.             if (command == WaitScreen.FAILURE_COMMAND) {//GEN-END:|4-commandAction|9|184-preAction
  146.                 // write pre-action user code here
  147.                 switchDisplayable(getBtWrongPwd(), getBtPwdTB());//GEN-LINE:|4-commandAction|10|184-postAction
  148.                 // write post-action user code here
  149.             } else if (command == WaitScreen.SUCCESS_COMMAND) {//GEN-LINE:|4-commandAction|11|183-preAction
  150.                 midlet.startNetThread();
  151.                 switchDisplayable(null, getMyCanvas());//GEN-LINE:|4-commandAction|12|183-postAction
  152.                 // write post-action user code here
  153.             }//GEN-BEGIN:|4-commandAction|13|191-preAction
  154.         } else if (displayable == btPwdTB) {
  155.             if (command == backCommand4) {//GEN-END:|4-commandAction|13|191-preAction
  156.                 // write pre-action user code here
  157.                 switchDisplayable(null, getBtSearchList());//GEN-LINE:|4-commandAction|14|191-postAction
  158.                 // write post-action user code here
  159.             } else if (command == btConnectCmd) {//GEN-LINE:|4-commandAction|15|51-preAction
  160.                 midlet.setPassword(getBtPwdTB().getString());
  161.                 switchDisplayable(null, getBtLoginWait());//GEN-LINE:|4-commandAction|16|51-postAction
  162.                 // write post-action user code here
  163.             }//GEN-BEGIN:|4-commandAction|17|31-preAction
  164.         } else if (displayable == btSearchList) {
  165.             if (command == List.SELECT_COMMAND) {//GEN-END:|4-commandAction|17|31-preAction
  166.                 // write pre-action user code here
  167.                 btSearchListAction();//GEN-LINE:|4-commandAction|18|31-postAction
  168.                 // write post-action user code here
  169.             } else if (command == backCommand) {//GEN-LINE:|4-commandAction|19|37-preAction
  170.                 // write pre-action user code here
  171.                 switchDisplayable(null, getMainMenu());//GEN-LINE:|4-commandAction|20|37-postAction
  172.                 // write post-action user code here
  173.             } else if (command == btConnectCmd1) {//GEN-LINE:|4-commandAction|21|43-preAction
  174.                 // write pre-action user code here
  175.                 switchDisplayable(null, getBtConnectWait());//GEN-LINE:|4-commandAction|22|43-postAction
  176.                 // write post-action user code here
  177.             } else if (command == btSearchCmd) {//GEN-LINE:|4-commandAction|23|84-preAction
  178.                 // write pre-action user code here
  179.                 switchDisplayable(null, getBtSearchWait());//GEN-LINE:|4-commandAction|24|84-postAction
  180.                 // write post-action user code here
  181.             }//GEN-BEGIN:|4-commandAction|25|171-preAction
  182.         } else if (displayable == btSearchWait) {
  183.             if (command == WaitScreen.FAILURE_COMMAND) {//GEN-END:|4-commandAction|25|171-preAction
  184.                 // write pre-action user code here
  185.                 switchDisplayable(getBtErrorAlert(), getMainMenu());//GEN-LINE:|4-commandAction|26|171-postAction
  186.                 // write post-action user code here
  187.             } else if (command == WaitScreen.SUCCESS_COMMAND) {//GEN-LINE:|4-commandAction|27|170-preAction
  188.                 // write pre-action user code here
  189.                 switchDisplayable(null, getBtSearchList());//GEN-LINE:|4-commandAction|28|170-postAction
  190.                 // write post-action user code here
  191.             }//GEN-BEGIN:|4-commandAction|29|165-preAction
  192.         } else if (displayable == connectionLostAlert) {
  193.             if (command == okCommand) {//GEN-END:|4-commandAction|29|165-preAction
  194.                 // write pre-action user code here
  195.                 switchDisplayable(null, getMainMenu());//GEN-LINE:|4-commandAction|30|165-postAction
  196.                 // write post-action user code here
  197.             }//GEN-BEGIN:|4-commandAction|31|79-preAction
  198.         } else if (displayable == insertTextTB) {
  199.             if (command == cancelCommand) {//GEN-END:|4-commandAction|31|79-preAction
  200.                 // write pre-action user code here
  201.                 switchDisplayable(null, getMyCanvas());//GEN-LINE:|4-commandAction|32|79-postAction
  202.                 // write post-action user code here
  203.             } else if (command == insertOkCommand) {//GEN-LINE:|4-commandAction|33|77-preAction
  204.                 midlet.insertText(getInsertTextTB().getString());
  205.                 switchDisplayable(null, getMyCanvas());//GEN-LINE:|4-commandAction|34|77-postAction
  206.                 // write post-action user code here
  207.             }//GEN-BEGIN:|4-commandAction|35|107-preAction
  208.         } else if (displayable == keySettings) {
  209.             if (command == List.SELECT_COMMAND) {//GEN-END:|4-commandAction|35|107-preAction
  210.                 // write pre-action user code here
  211.                 keySettingsAction();//GEN-LINE:|4-commandAction|36|107-postAction
  212.                 // write post-action user code here
  213.             } else if (command == backCommand5) {//GEN-LINE:|4-commandAction|37|218-preAction
  214.                 // write pre-action user code here
  215.                 switchDisplayable(null, getSettings());//GEN-LINE:|4-commandAction|38|218-postAction
  216.                 // write post-action user code here
  217.             } else if (command == itemCommand) {//GEN-LINE:|4-commandAction|39|221-preAction
  218.                 getSetKeysCanvas().setKeyName(getKeySettings().getString(getKeySettings().getSelectedIndex()));
  219.                 keySettingsAction();//GEN-LINE:|4-commandAction|40|221-postAction
  220.                 // write post-action user code here
  221.             }//GEN-BEGIN:|4-commandAction|41|16-preAction
  222.         } else if (displayable == mainMenu) {
  223.             if (command == List.SELECT_COMMAND) {//GEN-END:|4-commandAction|41|16-preAction
  224.                 // write pre-action user code here
  225.                 mainMenuAction();//GEN-LINE:|4-commandAction|42|16-postAction
  226.                 // write post-action user code here
  227.             } else if (command == exitCmd) {//GEN-LINE:|4-commandAction|43|25-preAction
  228.                 // write pre-action user code here
  229.                 midlet.exitMIDlet();
  230. //GEN-LINE:|4-commandAction|44|25-postAction
  231.                 // write post-action user code here
  232.             } else if (command == selectItemCmd) {//GEN-LINE:|4-commandAction|45|86-preAction
  233.                 // write pre-action user code here
  234.                 mainMenuAction();//GEN-LINE:|4-commandAction|46|86-postAction
  235.                 // write post-action user code here
  236.             }//GEN-BEGIN:|4-commandAction|47|69-preAction
  237.         } else if (displayable == myCanvas) {
  238.             if (command == disconnectCmd) {//GEN-END:|4-commandAction|47|69-preAction
  239.                 midlet.disconnect();
  240.                 switchDisplayable(null, getMainMenu());//GEN-LINE:|4-commandAction|48|69-postAction
  241.                 // write post-action user code here
  242.             } else if (command == insertTextCmd) {//GEN-LINE:|4-commandAction|49|67-preAction
  243.                 // write pre-action user code here
  244.                 switchDisplayable(null, getInsertTextTB());//GEN-LINE:|4-commandAction|50|67-postAction
  245.                 // write post-action user code here
  246.             } else if (command == settingsCmd1) {//GEN-LINE:|4-commandAction|51|71-preAction
  247.                 // write pre-action user code here
  248.                 switchDisplayable(null, getSettings());//GEN-LINE:|4-commandAction|52|71-postAction
  249.                 // write post-action user code here
  250.             }//GEN-BEGIN:|4-commandAction|53|236-preAction
  251.         } else if (displayable == setKeysCanvas) {
  252.             if (command == cancelCommand2) {//GEN-END:|4-commandAction|53|236-preAction
  253.                 // write pre-action user code here
  254.                 switchDisplayable(null, getKeySettings());//GEN-LINE:|4-commandAction|54|236-postAction
  255.                 // write post-action user code here
  256.             } else if (command == saveCmd) {//GEN-LINE:|4-commandAction|55|234-preAction
  257.                 midlet.getControls().put(setKeysCanvas.getLastKeyName(), new Integer(setKeysCanvas.getLastKeyCode()));
  258.                 switchDisplayable(null, getKeySettings());//GEN-LINE:|4-commandAction|56|234-postAction
  259.                 // write post-action user code here
  260.             }//GEN-BEGIN:|4-commandAction|57|57-preAction
  261.         } else if (displayable == settings) {
  262.             if (command == List.SELECT_COMMAND) {//GEN-END:|4-commandAction|57|57-preAction
  263.                 // write pre-action user code here
  264.                 settingsAction();//GEN-LINE:|4-commandAction|58|57-postAction
  265.                 // write post-action user code here
  266.             } else if (command == backCommand2) {//GEN-LINE:|4-commandAction|59|95-preAction
  267.                 // write pre-action user code here
  268.                 isConnected();//GEN-LINE:|4-commandAction|60|95-postAction
  269.                 // write post-action user code here
  270.             } else if (command == selectItemCmd2) {//GEN-LINE:|4-commandAction|61|122-preAction
  271.                 // write pre-action user code here
  272.                 settingsAction();//GEN-LINE:|4-commandAction|62|122-postAction
  273.                 // write post-action user code here
  274.             }//GEN-BEGIN:|4-commandAction|63|13-preAction
  275.         } else if (displayable == splashScreen) {
  276.             if (command == SplashScreen.DISMISS_COMMAND) {//GEN-END:|4-commandAction|63|13-preAction
  277.                 // write pre-action user code here
  278.                 switchDisplayable(null, getMainMenu());//GEN-LINE:|4-commandAction|64|13-postAction
  279.                 // write post-action user code here
  280.             }//GEN-BEGIN:|4-commandAction|65|128-preAction
  281.         } else if (displayable == tcpConnectWait) {
  282.             if (command == WaitScreen.FAILURE_COMMAND) {//GEN-END:|4-commandAction|65|128-preAction
  283.                 // write pre-action user code here
  284.                 switchDisplayable(getTcpConnError(), getTcpForm());//GEN-LINE:|4-commandAction|66|128-postAction
  285.                 // write post-action user code here
  286.             } else if (command == WaitScreen.SUCCESS_COMMAND) {//GEN-LINE:|4-commandAction|67|127-preAction
  287.                 // write pre-action user code here
  288.                 switchDisplayable(null, getTcpPwdTB());//GEN-LINE:|4-commandAction|68|127-postAction
  289.                 // write post-action user code here
  290.             }//GEN-BEGIN:|4-commandAction|69|39-preAction
  291.         } else if (displayable == tcpForm) {
  292.             if (command == backCommand1) {//GEN-END:|4-commandAction|69|39-preAction
  293.                 // write pre-action user code here
  294.                 switchDisplayable(null, getMainMenu());//GEN-LINE:|4-commandAction|70|39-postAction
  295.                 // write post-action user code here
  296.             } else if (command == tcpConnCmd) {//GEN-LINE:|4-commandAction|71|45-preAction
  297.                 midlet.setServerIpAddr(getServerAddrTF().getString());
  298.                 midlet.setServerPort(Integer.parseInt(getServerPortTF().getString()));
  299.                 switchDisplayable(null, getTcpConnectWait());//GEN-LINE:|4-commandAction|72|45-postAction
  300.                 // write post-action user code here
  301.             }//GEN-BEGIN:|4-commandAction|73|145-preAction
  302.         } else if (displayable == tcpLoginWait) {
  303.             if (command == WaitScreen.FAILURE_COMMAND) {//GEN-END:|4-commandAction|73|145-preAction
  304.                 // write pre-action user code here
  305.                 switchDisplayable(getTcpWrongPwd(), getTcpPwdTB());//GEN-LINE:|4-commandAction|74|145-postAction
  306.                 // write post-action user code here
  307.             } else if (command == WaitScreen.SUCCESS_COMMAND) {//GEN-LINE:|4-commandAction|75|144-preAction
  308.                 midlet.startNetThread();
  309.                 switchDisplayable(null, getMyCanvas());//GEN-LINE:|4-commandAction|76|144-postAction
  310.                 // write post-action user code here
  311.             }//GEN-BEGIN:|4-commandAction|77|155-preAction
  312.         } else if (displayable == tcpPwdTB) {
  313.             if (command == backCommand3) {//GEN-END:|4-commandAction|77|155-preAction
  314.                 // write pre-action user code here
  315.                 switchDisplayable(null, getTcpForm());//GEN-LINE:|4-commandAction|78|155-postAction
  316.                 // write post-action user code here
  317.             } else if (command == tcpSendPassCmd) {//GEN-LINE:|4-commandAction|79|142-preAction
  318.                 midlet.setPassword(getTcpPwdTB().getString());
  319.                 switchDisplayable(null, getTcpLoginWait());//GEN-LINE:|4-commandAction|80|142-postAction
  320.                 // write post-action user code here
  321.             }//GEN-BEGIN:|4-commandAction|81|4-postCommandAction
  322.         }//GEN-END:|4-commandAction|81|4-postCommandAction
  323.         // write post-action user code here
  324.     }//GEN-BEGIN:|4-commandAction|82|
  325.     //</editor-fold>//GEN-END:|4-commandAction|82|
  326.  
  327.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: splashScreen ">//GEN-BEGIN:|11-getter|0|11-preInit
  328.     /**
  329.      * Returns an initiliazed instance of splashScreen component.
  330.      * @return the initialized component instance
  331.      */
  332.     public SplashScreen getSplashScreen() {
  333.         if (splashScreen == null) {//GEN-END:|11-getter|0|11-preInit
  334.             // write pre-init user code here
  335.             splashScreen = new SplashScreen(getDisplay());//GEN-BEGIN:|11-getter|1|11-postInit
  336.             splashScreen.setTitle("splashScreen");
  337.             splashScreen.setCommandListener(this);
  338.             splashScreen.setFullScreenMode(true);
  339.             splashScreen.setImage(getIkona128());
  340.             splashScreen.setText(TextCz.APPNAME);
  341.             splashScreen.setTextFont(getFont());
  342.             splashScreen.setTimeout(3000);//GEN-END:|11-getter|1|11-postInit
  343.             // write post-init user code here
  344.         }//GEN-BEGIN:|11-getter|2|
  345.         return splashScreen;
  346.     }
  347.     //</editor-fold>//GEN-END:|11-getter|2|
  348.  
  349.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: mainMenu ">//GEN-BEGIN:|14-getter|0|14-preInit
  350.     /**
  351.      * Returns an initiliazed instance of mainMenu component.
  352.      * @return the initialized component instance
  353.      */
  354.     public List getMainMenu() {
  355.         if (mainMenu == null) {//GEN-END:|14-getter|0|14-preInit
  356.             // write pre-init user code here
  357.             mainMenu = new List(TextCz.APPNAME, Choice.IMPLICIT);//GEN-BEGIN:|14-getter|1|14-postInit
  358.             mainMenu.append(TextCz.BLUETOOTH, null);
  359.             mainMenu.append(TextCz.NETWORK, null);
  360.             mainMenu.append(TextCz.SETTINGS, null);
  361.             mainMenu.addCommand(getSelectItemCmd());
  362.             mainMenu.addCommand(getExitCmd());
  363.             mainMenu.setCommandListener(this);
  364.             mainMenu.setSelectedFlags(new boolean[] { false, false, false });//GEN-END:|14-getter|1|14-postInit
  365.             // write post-init user code here
  366.         }//GEN-BEGIN:|14-getter|2|
  367.         return mainMenu;
  368.     }
  369.     //</editor-fold>//GEN-END:|14-getter|2|
  370.  
  371.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: mainMenuAction ">//GEN-BEGIN:|14-action|0|14-preAction
  372.     /**
  373.      * Performs an action assigned to the selected list element in the mainMenu component.
  374.      */
  375.     public void mainMenuAction() {//GEN-END:|14-action|0|14-preAction
  376.         // enter pre-action user code here
  377.         String __selectedString = getMainMenu().getString(getMainMenu().getSelectedIndex());//GEN-BEGIN:|14-action|1|87-preAction
  378.         if (__selectedString != null) {
  379.             if (__selectedString.equals(TextCz.BLUETOOTH)) {//GEN-END:|14-action|1|87-preAction
  380.                 showBtConnectBtn(false); //nejprve tlacitko skryji
  381.                 switchDisplayable(null, getBtSearchList());//GEN-LINE:|14-action|2|87-postAction
  382.                 // write post-action user code here
  383.             } else if (__selectedString.equals(TextCz.NETWORK)) {//GEN-LINE:|14-action|3|88-preAction
  384.                 // write pre-action user code here
  385.                 switchDisplayable(null, getTcpForm());//GEN-LINE:|14-action|4|88-postAction
  386.                 // write post-action user code here
  387.             } else if (__selectedString.equals(TextCz.SETTINGS)) {//GEN-LINE:|14-action|5|89-preAction
  388.                 // write pre-action user code here
  389.                 switchDisplayable(null, getSettings());//GEN-LINE:|14-action|6|89-postAction
  390.                 // write post-action user code here
  391.             }//GEN-BEGIN:|14-action|7|14-postAction
  392.         }//GEN-END:|14-action|7|14-postAction
  393.         // enter post-action user code here
  394.     }//GEN-BEGIN:|14-action|8|
  395.     //</editor-fold>//GEN-END:|14-action|8|
  396.  
  397.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: showGui ">//GEN-BEGIN:|19-entry|0|20-preAction
  398.     /**
  399.      * Performs an action assigned to the showGui entry-point.
  400.      */
  401.     public void showGui() {//GEN-END:|19-entry|0|20-preAction
  402.         // write pre-action user code here
  403.         switchDisplayable(null, getSplashScreen());//GEN-LINE:|19-entry|1|20-postAction
  404.         // write post-action user code here
  405.     }//GEN-BEGIN:|19-entry|2|
  406.     //</editor-fold>//GEN-END:|19-entry|2|
  407.     //</editor-fold>
  408.  
  409.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: ikona128 ">//GEN-BEGIN:|22-getter|0|22-preInit
  410.     /**
  411.      * Returns an initiliazed instance of ikona128 component.
  412.      * @return the initialized component instance
  413.      */
  414.     public Image getIkona128() {
  415.         if (ikona128 == null) {//GEN-END:|22-getter|0|22-preInit
  416.             // write pre-init user code here
  417.             try {//GEN-BEGIN:|22-getter|1|22-@java.io.IOException
  418.                 ikona128 = Image.createImage("/ikona128.png");
  419.             } catch (java.io.IOException e) {//GEN-END:|22-getter|1|22-@java.io.IOException
  420.                 e.printStackTrace();
  421.             }//GEN-LINE:|22-getter|2|22-postInit
  422.             // write post-init user code here
  423.         }//GEN-BEGIN:|22-getter|3|
  424.         return ikona128;
  425.     }
  426.     //</editor-fold>//GEN-END:|22-getter|3|
  427.     //</editor-fold>
  428.  
  429.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCmd ">//GEN-BEGIN:|24-getter|0|24-preInit
  430.     /**
  431.      * Returns an initiliazed instance of exitCmd component.
  432.      * @return the initialized component instance
  433.      */
  434.     public Command getExitCmd() {
  435.         if (exitCmd == null) {//GEN-END:|24-getter|0|24-preInit
  436.             // write pre-init user code here
  437.             exitCmd = new Command(TextCz.EXIT, Command.EXIT, 0);//GEN-LINE:|24-getter|1|24-postInit
  438.             // write post-init user code here
  439.         }//GEN-BEGIN:|24-getter|2|
  440.         return exitCmd;
  441.     }
  442.     //</editor-fold>//GEN-END:|24-getter|2|
  443.  
  444.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btSearchList ">//GEN-BEGIN:|30-getter|0|30-preInit
  445.     /**
  446.      * Returns an initiliazed instance of btSearchList component.
  447.      * @return the initialized component instance
  448.      */
  449.     public List getBtSearchList() {
  450.         if (btSearchList == null) {//GEN-END:|30-getter|0|30-preInit
  451.             // write pre-init user code here
  452.             btSearchList = new List(TextCz.BLUETOOTH, Choice.IMPLICIT);//GEN-BEGIN:|30-getter|1|30-postInit
  453.             btSearchList.addCommand(getBtConnectCmd1());
  454.             btSearchList.addCommand(getBtSearchCmd());
  455.             btSearchList.addCommand(getBackCommand());
  456.             btSearchList.setCommandListener(this);//GEN-END:|30-getter|1|30-postInit
  457.             // write post-init user code here
  458.         }//GEN-BEGIN:|30-getter|2|
  459.         return btSearchList;
  460.     }
  461.     //</editor-fold>//GEN-END:|30-getter|2|
  462.  
  463.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: btSearchListAction ">//GEN-BEGIN:|30-action|0|30-preAction
  464.     /**
  465.      * Performs an action assigned to the selected list element in the btSearchList component.
  466.      */
  467.     public void btSearchListAction() {//GEN-END:|30-action|0|30-preAction
  468.         // enter pre-action user code here
  469.         String __selectedString = getBtSearchList().getString(getBtSearchList().getSelectedIndex());//GEN-LINE:|30-action|1|30-postAction
  470.         // enter post-action user code here
  471.     }//GEN-BEGIN:|30-action|2|
  472.     //</editor-fold>//GEN-END:|30-action|2|
  473.  
  474.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpForm ">//GEN-BEGIN:|33-getter|0|33-preInit
  475.     /**
  476.      * Returns an initiliazed instance of tcpForm component.
  477.      * @return the initialized component instance
  478.      */
  479.     public Form getTcpForm() {
  480.         if (tcpForm == null) {//GEN-END:|33-getter|0|33-preInit
  481.             // write pre-init user code here
  482.             tcpForm = new Form(TextCz.NETWORK, new Item[] { getServerAddrTF(), getServerPortTF() });//GEN-BEGIN:|33-getter|1|33-postInit
  483.             tcpForm.addCommand(getTcpConnCmd());
  484.             tcpForm.addCommand(getBackCommand1());
  485.             tcpForm.setCommandListener(this);//GEN-END:|33-getter|1|33-postInit
  486.             // write post-init user code here
  487.         }//GEN-BEGIN:|33-getter|2|
  488.         return tcpForm;
  489.     }
  490.     //</editor-fold>//GEN-END:|33-getter|2|
  491.  
  492.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btPwdTB ">//GEN-BEGIN:|46-getter|0|46-preInit
  493.     /**
  494.      * Returns an initiliazed instance of btPwdTB component.
  495.      * @return the initialized component instance
  496.      */
  497.     public TextBox getBtPwdTB() {
  498.         if (btPwdTB == null) {//GEN-END:|46-getter|0|46-preInit
  499.             // write pre-init user code here
  500.             btPwdTB = new TextBox(TextCz.PASSWORD, "", 100, TextField.ANY | TextField.PASSWORD | TextField.NON_PREDICTIVE);//GEN-BEGIN:|46-getter|1|46-postInit
  501.             btPwdTB.addCommand(getBtConnectCmd());
  502.             btPwdTB.addCommand(getBackCommand4());
  503.             btPwdTB.setCommandListener(this);//GEN-END:|46-getter|1|46-postInit
  504.             // write post-init user code here
  505.         }//GEN-BEGIN:|46-getter|2|
  506.         return btPwdTB;
  507.     }
  508.     //</editor-fold>//GEN-END:|46-getter|2|
  509.     //</editor-fold>
  510.  
  511.     //</editor-fold>
  512.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">//GEN-BEGIN:|36-getter|0|36-preInit
  513.     /**
  514.      * Returns an initiliazed instance of backCommand component.
  515.      * @return the initialized component instance
  516.      */
  517.     public Command getBackCommand() {
  518.         if (backCommand == null) {//GEN-END:|36-getter|0|36-preInit
  519.             // write pre-init user code here
  520.             backCommand = new Command(TextCz.BACK, Command.BACK, 0);//GEN-LINE:|36-getter|1|36-postInit
  521.             // write post-init user code here
  522.         }//GEN-BEGIN:|36-getter|2|
  523.         return backCommand;
  524.     }
  525.     //</editor-fold>//GEN-END:|36-getter|2|
  526.  
  527.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand1 ">//GEN-BEGIN:|38-getter|0|38-preInit
  528.     /**
  529.      * Returns an initiliazed instance of backCommand1 component.
  530.      * @return the initialized component instance
  531.      */
  532.     public Command getBackCommand1() {
  533.         if (backCommand1 == null) {//GEN-END:|38-getter|0|38-preInit
  534.             // write pre-init user code here
  535.             backCommand1 = new Command(TextCz.BACK, Command.BACK, 0);//GEN-LINE:|38-getter|1|38-postInit
  536.             // write post-init user code here
  537.         }//GEN-BEGIN:|38-getter|2|
  538.         return backCommand1;
  539.     }
  540.     //</editor-fold>//GEN-END:|38-getter|2|
  541.     //</editor-fold>
  542.  
  543.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btConnectCmd1 ">//GEN-BEGIN:|42-getter|0|42-preInit
  544.     /**
  545.      * Returns an initiliazed instance of btConnectCmd1 component.
  546.      * @return the initialized component instance
  547.      */
  548.     public Command getBtConnectCmd1() {
  549.         if (btConnectCmd1 == null) {//GEN-END:|42-getter|0|42-preInit
  550.             // write pre-init user code here
  551.             btConnectCmd1 = new Command(TextCz.CONNECT, Command.ITEM, 0);//GEN-LINE:|42-getter|1|42-postInit
  552.             // write post-init user code here
  553.         }//GEN-BEGIN:|42-getter|2|
  554.         return btConnectCmd1;
  555.     }
  556.     //</editor-fold>//GEN-END:|42-getter|2|
  557.  
  558.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpConnCmd ">//GEN-BEGIN:|44-getter|0|44-preInit
  559.     /**
  560.      * Returns an initiliazed instance of tcpConnCmd component.
  561.      * @return the initialized component instance
  562.      */
  563.     public Command getTcpConnCmd() {
  564.         if (tcpConnCmd == null) {//GEN-END:|44-getter|0|44-preInit
  565.             // write pre-init user code here
  566.             tcpConnCmd = new Command(TextCz.CONNECT, Command.OK, 0);//GEN-LINE:|44-getter|1|44-postInit
  567.             // write post-init user code here
  568.         }//GEN-BEGIN:|44-getter|2|
  569.         return tcpConnCmd;
  570.     }
  571.     //</editor-fold>//GEN-END:|44-getter|2|
  572.  
  573.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btConnectCmd ">//GEN-BEGIN:|50-getter|0|50-preInit
  574.     /**
  575.      * Returns an initiliazed instance of btConnectCmd component.
  576.      * @return the initialized component instance
  577.      */
  578.     public Command getBtConnectCmd() {
  579.         if (btConnectCmd == null) {//GEN-END:|50-getter|0|50-preInit
  580.             // write pre-init user code here
  581.             btConnectCmd = new Command(TextCz.CONNECT, Command.OK, 0);//GEN-LINE:|50-getter|1|50-postInit
  582.             // write post-init user code here
  583.         }//GEN-BEGIN:|50-getter|2|
  584.         return btConnectCmd;
  585.     }
  586.     //</editor-fold>//GEN-END:|50-getter|2|
  587.  
  588.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: myCanvas ">//GEN-BEGIN:|54-getter|0|54-preInit
  589.     /**
  590.      * Returns an initiliazed instance of myCanvas component.
  591.      * @return the initialized component instance
  592.      */
  593.     public MyCanvas getMyCanvas() {
  594.         if (myCanvas == null) {//GEN-END:|54-getter|0|54-preInit
  595.             // write pre-init user code here
  596.             myCanvas = new MyCanvas(midlet);//GEN-BEGIN:|54-getter|1|54-postInit
  597.             myCanvas.setTitle("");
  598.             myCanvas.addCommand(getInsertTextCmd());
  599.             myCanvas.addCommand(getSettingsCmd1());
  600.             myCanvas.addCommand(getDisconnectCmd());
  601.             myCanvas.setCommandListener(this);
  602.             myCanvas.setFullScreenMode(true);//GEN-END:|54-getter|1|54-postInit
  603.             // write post-init user code here
  604.         }//GEN-BEGIN:|54-getter|2|
  605.         return myCanvas;
  606.     }
  607.     //</editor-fold>//GEN-END:|54-getter|2|
  608.  
  609.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: settings ">//GEN-BEGIN:|56-getter|0|56-preInit
  610.     /**
  611.      * Returns an initiliazed instance of settings component.
  612.      * @return the initialized component instance
  613.      */
  614.     public List getSettings() {
  615.         if (settings == null) {//GEN-END:|56-getter|0|56-preInit
  616.             // write pre-init user code here
  617.             settings = new List(TextCz.SETTINGS, Choice.IMPLICIT);//GEN-BEGIN:|56-getter|1|56-postInit
  618.             settings.append(TextCz.SET_KEYS, null);
  619.             settings.append(TextCz.ADVANCED_SETTINGS, null);
  620.             settings.addCommand(getSelectItemCmd2());
  621.             settings.addCommand(getBackCommand2());
  622.             settings.setCommandListener(this);
  623.             settings.setSelectedFlags(new boolean[] { false, false });//GEN-END:|56-getter|1|56-postInit
  624.             // write post-init user code here
  625.         }//GEN-BEGIN:|56-getter|2|
  626.         return settings;
  627.     }
  628.     //</editor-fold>//GEN-END:|56-getter|2|
  629.  
  630.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: settingsAction ">//GEN-BEGIN:|56-action|0|56-preAction
  631.     /**
  632.      * Performs an action assigned to the selected list element in the settings component.
  633.      */
  634.     public void settingsAction() {//GEN-END:|56-action|0|56-preAction
  635.         // enter pre-action user code here
  636.         String __selectedString = getSettings().getString(getSettings().getSelectedIndex());//GEN-BEGIN:|56-action|1|104-preAction
  637.         if (__selectedString != null) {
  638.             if (__selectedString.equals(TextCz.SET_KEYS)) {//GEN-END:|56-action|1|104-preAction
  639.                 // write pre-action user code here
  640.                 switchDisplayable(null, getKeySettings());//GEN-LINE:|56-action|2|104-postAction
  641.                 // write post-action user code here
  642.             } else if (__selectedString.equals(TextCz.ADVANCED_SETTINGS)) {//GEN-LINE:|56-action|3|105-preAction
  643.                 getRotateGroup().setSelectedIndex(0, midlet.isRotated());
  644.                 getRotateGroup().setSelectedIndex(1, !midlet.isRotated());
  645.                 getMouseSpeedGG().setValue(midlet.getMouseStep());
  646.                 getDelayTF().setString(""+midlet.getDelay());
  647.                 switchDisplayable(null, getAdvancedSettings());//GEN-LINE:|56-action|4|105-postAction
  648.                 // write post-action user code here
  649.             }//GEN-BEGIN:|56-action|5|56-postAction
  650.         }//GEN-END:|56-action|5|56-postAction
  651.         // enter post-action user code here
  652.     }//GEN-BEGIN:|56-action|6|
  653.     //</editor-fold>//GEN-END:|56-action|6|
  654.  
  655.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertTextTB ">//GEN-BEGIN:|74-getter|0|74-preInit
  656.     /**
  657.      * Returns an initiliazed instance of insertTextTB component.
  658.      * @return the initialized component instance
  659.      */
  660.     public TextBox getInsertTextTB() {
  661.         if (insertTextTB == null) {//GEN-END:|74-getter|0|74-preInit
  662.             // write pre-init user code here
  663.             insertTextTB = new TextBox(TextCz.INSERT_TEXT, null, 500, TextField.ANY);//GEN-BEGIN:|74-getter|1|74-postInit
  664.             insertTextTB.addCommand(getInsertOkCommand());
  665.             insertTextTB.addCommand(getCancelCommand());
  666.             insertTextTB.setCommandListener(this);//GEN-END:|74-getter|1|74-postInit
  667.             // write post-init user code here
  668.         }//GEN-BEGIN:|74-getter|2|
  669.         return insertTextTB;
  670.     }
  671.     //</editor-fold>//GEN-END:|74-getter|2|
  672.  
  673.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertTextCmd ">//GEN-BEGIN:|66-getter|0|66-preInit
  674.     /**
  675.      * Returns an initiliazed instance of insertTextCmd component.
  676.      * @return the initialized component instance
  677.      */
  678.     public Command getInsertTextCmd() {
  679.         if (insertTextCmd == null) {//GEN-END:|66-getter|0|66-preInit
  680.             // write pre-init user code here
  681.             insertTextCmd = new Command(TextCz.INSERT_TEXT, Command.SCREEN, 0);//GEN-LINE:|66-getter|1|66-postInit
  682.             // write post-init user code here
  683.         }//GEN-BEGIN:|66-getter|2|
  684.         return insertTextCmd;
  685.     }
  686.     //</editor-fold>//GEN-END:|66-getter|2|
  687.  
  688.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: disconnectCmd ">//GEN-BEGIN:|68-getter|0|68-preInit
  689.     /**
  690.      * Returns an initiliazed instance of disconnectCmd component.
  691.      * @return the initialized component instance
  692.      */
  693.     public Command getDisconnectCmd() {
  694.         if (disconnectCmd == null) {//GEN-END:|68-getter|0|68-preInit
  695.             // write pre-init user code here
  696.             disconnectCmd = new Command(TextCz.DISCONNECT, Command.SCREEN, 0);//GEN-LINE:|68-getter|1|68-postInit
  697.             // write post-init user code here
  698.         }//GEN-BEGIN:|68-getter|2|
  699.         return disconnectCmd;
  700.     }
  701.     //</editor-fold>//GEN-END:|68-getter|2|
  702.  
  703.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: settingsCmd1 ">//GEN-BEGIN:|70-getter|0|70-preInit
  704.     /**
  705.      * Returns an initiliazed instance of settingsCmd1 component.
  706.      * @return the initialized component instance
  707.      */
  708.     public Command getSettingsCmd1() {
  709.         if (settingsCmd1 == null) {//GEN-END:|70-getter|0|70-preInit
  710.             // write pre-init user code here
  711.             settingsCmd1 = new Command(TextCz.SETTINGS//GEN-BEGIN:|70-getter|1|70-postInit
  712.                     , Command.SCREEN, 0);//GEN-END:|70-getter|1|70-postInit
  713.             // write post-init user code here
  714.         }//GEN-BEGIN:|70-getter|2|
  715.         return settingsCmd1;
  716.     }
  717.     //</editor-fold>//GEN-END:|70-getter|2|
  718.  
  719.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: insertOkCommand ">//GEN-BEGIN:|76-getter|0|76-preInit
  720.     /**
  721.      * Returns an initiliazed instance of insertOkCommand component.
  722.      * @return the initialized component instance
  723.      */
  724.     public Command getInsertOkCommand() {
  725.         if (insertOkCommand == null) {//GEN-END:|76-getter|0|76-preInit
  726.             // write pre-init user code here
  727.             insertOkCommand = new Command(TextCz.INSERT, Command.OK, 0);//GEN-LINE:|76-getter|1|76-postInit
  728.             // write post-init user code here
  729.         }//GEN-BEGIN:|76-getter|2|
  730.         return insertOkCommand;
  731.     }
  732.     //</editor-fold>//GEN-END:|76-getter|2|
  733.  
  734.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: cancelCommand ">//GEN-BEGIN:|78-getter|0|78-preInit
  735.     /**
  736.      * Returns an initiliazed instance of cancelCommand component.
  737.      * @return the initialized component instance
  738.      */
  739.     public Command getCancelCommand() {
  740.         if (cancelCommand == null) {//GEN-END:|78-getter|0|78-preInit
  741.             // write pre-init user code here
  742.             cancelCommand = new Command(TextCz.CANCEL, Command.CANCEL, 0);//GEN-LINE:|78-getter|1|78-postInit
  743.             // write post-init user code here
  744.         }//GEN-BEGIN:|78-getter|2|
  745.         return cancelCommand;
  746.     }
  747.     //</editor-fold>//GEN-END:|78-getter|2|
  748.     //</editor-fold>
  749.  
  750.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btSearchCmd ">//GEN-BEGIN:|83-getter|0|83-preInit
  751.     /**
  752.      * Returns an initiliazed instance of btSearchCmd component.
  753.      * @return the initialized component instance
  754.      */
  755.     public Command getBtSearchCmd() {
  756.         if (btSearchCmd == null) {//GEN-END:|83-getter|0|83-preInit
  757.             // write pre-init user code here
  758.             btSearchCmd = new Command(TextCz.SEARCH, Command.SCREEN, 0);//GEN-LINE:|83-getter|1|83-postInit
  759.             // write post-init user code here
  760.         }//GEN-BEGIN:|83-getter|2|
  761.         return btSearchCmd;
  762.     }
  763.     //</editor-fold>//GEN-END:|83-getter|2|
  764.  
  765.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: selectItemCmd ">//GEN-BEGIN:|85-getter|0|85-preInit
  766.     /**
  767.      * Returns an initiliazed instance of selectItemCmd component.
  768.      * @return the initialized component instance
  769.      */
  770.     public Command getSelectItemCmd() {
  771.         if (selectItemCmd == null) {//GEN-END:|85-getter|0|85-preInit
  772.             // write pre-init user code here
  773.             selectItemCmd = new Command(TextCz.SELECT, Command.ITEM, 0);//GEN-LINE:|85-getter|1|85-postInit
  774.             // write post-init user code here
  775.         }//GEN-BEGIN:|85-getter|2|
  776.         return selectItemCmd;
  777.     }
  778.     //</editor-fold>//GEN-END:|85-getter|2|
  779.  
  780.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand2 ">//GEN-BEGIN:|94-getter|0|94-preInit
  781.     /**
  782.      * Returns an initiliazed instance of backCommand2 component.
  783.      * @return the initialized component instance
  784.      */
  785.     public Command getBackCommand2() {
  786.         if (backCommand2 == null) {//GEN-END:|94-getter|0|94-preInit
  787.             // write pre-init user code here
  788.             backCommand2 = new Command(TextCz.BACK, Command.BACK, 0);//GEN-LINE:|94-getter|1|94-postInit
  789.             // write post-init user code here
  790.         }//GEN-BEGIN:|94-getter|2|
  791.         return backCommand2;
  792.     }
  793.     //</editor-fold>//GEN-END:|94-getter|2|
  794.  
  795.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: isConnected ">//GEN-BEGIN:|98-if|0|98-preIf
  796.     /**
  797.      * Performs an action assigned to the isConnected if-point.
  798.      */
  799.     public void isConnected() {//GEN-END:|98-if|0|98-preIf
  800.         // enter pre-if user code here
  801.         if (midlet.isConnected()) {//GEN-LINE:|98-if|1|99-preAction
  802.             // write pre-action user code here
  803.             switchDisplayable(null, getMyCanvas());//GEN-LINE:|98-if|2|99-postAction
  804.             // write post-action user code here
  805.         } else {//GEN-LINE:|98-if|3|100-preAction
  806.             // write pre-action user code here
  807.             switchDisplayable(null, getMainMenu());//GEN-LINE:|98-if|4|100-postAction
  808.             // write post-action user code here
  809.         }//GEN-LINE:|98-if|5|98-postIf
  810.         // enter post-if user code here
  811.     }//GEN-BEGIN:|98-if|6|
  812.     //</editor-fold>//GEN-END:|98-if|6|
  813.  
  814.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: keySettings ">//GEN-BEGIN:|106-getter|0|106-preInit
  815.     /**
  816.      * Returns an initiliazed instance of keySettings component.
  817.      * @return the initialized component instance
  818.      */
  819.     public List getKeySettings() {
  820.         if (keySettings == null) {//GEN-END:|106-getter|0|106-preInit
  821.             // write pre-init user code here
  822.             keySettings = new List(TextCz.SET_KEYS, Choice.IMPLICIT);//GEN-BEGIN:|106-getter|1|106-postInit
  823.             keySettings.append(TextCz.KEY_PAN_LEFT, null);
  824.             keySettings.append(TextCz.KEY_PAN_RIGHT, null);
  825.             keySettings.append(TextCz.KEY_PAN_UP, null);
  826.             keySettings.append(TextCz.KEY_PAN_DOWN, null);
  827.             keySettings.append(TextCz.KEY_ZOOM_IN, null);
  828.             keySettings.append(TextCz.KEY_ZOOM_OUT, null);
  829.             keySettings.append(TextCz.KEY_LMB, null);
  830.             keySettings.append(TextCz.KEY_RMB, null);
  831.             keySettings.addCommand(getItemCommand());
  832.             keySettings.addCommand(getBackCommand5());
  833.             keySettings.setCommandListener(this);
  834.             keySettings.setSelectedFlags(new boolean[] { false, false, false, false, false, false, false, false });//GEN-END:|106-getter|1|106-postInit
  835.             // write post-init user code here
  836.         }//GEN-BEGIN:|106-getter|2|
  837.         return keySettings;
  838.     }
  839.     //</editor-fold>//GEN-END:|106-getter|2|
  840.  
  841.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: keySettingsAction ">//GEN-BEGIN:|106-action|0|106-preAction
  842.     /**
  843.      * Performs an action assigned to the selected list element in the keySettings component.
  844.      */
  845.     public void keySettingsAction() {//GEN-END:|106-action|0|106-preAction
  846.  
  847.         getSetKeysCanvas().setKeyName(getKeySettings().getString(getKeySettings().getSelectedIndex()));
  848.         switchDisplayable(null, getSetKeysCanvas());
  849.         //tady ty další netbeansovský srandy nebudu potřebovat...
  850.         String __selectedString = getKeySettings().getString(getKeySettings().getSelectedIndex());//GEN-BEGIN:|106-action|1|206-preAction
  851.         if (__selectedString != null) {
  852.             if (__selectedString.equals(TextCz.KEY_PAN_LEFT)) {//GEN-END:|106-action|1|206-preAction
  853.                 // write pre-action user code here
  854. //GEN-LINE:|106-action|2|206-postAction
  855.                 // write post-action user code here
  856.             } else if (__selectedString.equals(TextCz.KEY_PAN_RIGHT)) {//GEN-LINE:|106-action|3|207-preAction
  857.                 // write pre-action user code here
  858. //GEN-LINE:|106-action|4|207-postAction
  859.                 // write post-action user code here
  860.             } else if (__selectedString.equals(TextCz.KEY_PAN_UP)) {//GEN-LINE:|106-action|5|208-preAction
  861.                 // write pre-action user code here
  862. //GEN-LINE:|106-action|6|208-postAction
  863.                 // write post-action user code here
  864.             } else if (__selectedString.equals(TextCz.KEY_PAN_DOWN)) {//GEN-LINE:|106-action|7|209-preAction
  865.                 // write pre-action user code here
  866. //GEN-LINE:|106-action|8|209-postAction
  867.                 // write post-action user code here
  868.             } else if (__selectedString.equals(TextCz.KEY_ZOOM_IN)) {//GEN-LINE:|106-action|9|210-preAction
  869.                 // write pre-action user code here
  870. //GEN-LINE:|106-action|10|210-postAction
  871.                 // write post-action user code here
  872.             } else if (__selectedString.equals(TextCz.KEY_ZOOM_OUT)) {//GEN-LINE:|106-action|11|211-preAction
  873.                 // write pre-action user code here
  874. //GEN-LINE:|106-action|12|211-postAction
  875.                 // write post-action user code here
  876.             } else if (__selectedString.equals(TextCz.KEY_LMB)) {//GEN-LINE:|106-action|13|212-preAction
  877.                 // write pre-action user code here
  878. //GEN-LINE:|106-action|14|212-postAction
  879.                 // write post-action user code here
  880.             } else if (__selectedString.equals(TextCz.KEY_RMB)) {//GEN-LINE:|106-action|15|213-preAction
  881.                 // write pre-action user code here
  882. //GEN-LINE:|106-action|16|213-postAction
  883.                 // write post-action user code here
  884.             }//GEN-BEGIN:|106-action|17|106-postAction
  885.         }//GEN-END:|106-action|17|106-postAction
  886.         // enter post-action user code here
  887.     }//GEN-BEGIN:|106-action|18|
  888.     //</editor-fold>//GEN-END:|106-action|18|
  889.  
  890.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: advancedSettings ">//GEN-BEGIN:|110-getter|0|110-preInit
  891.     /**
  892.      * Returns an initiliazed instance of advancedSettings component.
  893.      * @return the initialized component instance
  894.      */
  895.     public Form getAdvancedSettings() {
  896.         if (advancedSettings == null) {//GEN-END:|110-getter|0|110-preInit
  897.             // write pre-init user code here
  898.             advancedSettings = new Form(TextCz.ADVANCED_SETTINGS, new Item[] { getRotateGroup(), getMouseSpeedGG(), getDelayTF() });//GEN-BEGIN:|110-getter|1|110-postInit
  899.             advancedSettings.addCommand(getSaveAdvSettings());
  900.             advancedSettings.addCommand(getCancelCommand1());
  901.             advancedSettings.setCommandListener(this);//GEN-END:|110-getter|1|110-postInit
  902.             // write post-init user code here
  903.         }//GEN-BEGIN:|110-getter|2|
  904.         return advancedSettings;
  905.     }
  906.     //</editor-fold>//GEN-END:|110-getter|2|
  907.     //</editor-fold>
  908.  
  909.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: saveAdvSettings ">//GEN-BEGIN:|112-getter|0|112-preInit
  910.     /**
  911.      * Returns an initiliazed instance of saveAdvSettings component.
  912.      * @return the initialized component instance
  913.      */
  914.     public Command getSaveAdvSettings() {
  915.         if (saveAdvSettings == null) {//GEN-END:|112-getter|0|112-preInit
  916.             // write pre-init user code here
  917.             saveAdvSettings = new Command(TextCz.SAVE, Command.OK, 0);//GEN-LINE:|112-getter|1|112-postInit
  918.             // write post-init user code here
  919.         }//GEN-BEGIN:|112-getter|2|
  920.         return saveAdvSettings;
  921.     }
  922.     //</editor-fold>//GEN-END:|112-getter|2|
  923.  
  924.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: cancelCommand1 ">//GEN-BEGIN:|114-getter|0|114-preInit
  925.     /**
  926.      * Returns an initiliazed instance of cancelCommand1 component.
  927.      * @return the initialized component instance
  928.      */
  929.     public Command getCancelCommand1() {
  930.         if (cancelCommand1 == null) {//GEN-END:|114-getter|0|114-preInit
  931.             // write pre-init user code here
  932.             cancelCommand1 = new Command(TextCz.CANCEL, Command.CANCEL, 0);//GEN-LINE:|114-getter|1|114-postInit
  933.             // write post-init user code here
  934.         }//GEN-BEGIN:|114-getter|2|
  935.         return cancelCommand1;
  936.     }
  937.     //</editor-fold>//GEN-END:|114-getter|2|
  938.  
  939.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: selectItemCmd2 ">//GEN-BEGIN:|121-getter|0|121-preInit
  940.     /**
  941.      * Returns an initiliazed instance of selectItemCmd2 component.
  942.      * @return the initialized component instance
  943.      */
  944.     public Command getSelectItemCmd2() {
  945.         if (selectItemCmd2 == null) {//GEN-END:|121-getter|0|121-preInit
  946.             // write pre-init user code here
  947.             selectItemCmd2 = new Command(TextCz.SELECT, Command.ITEM, 0);//GEN-LINE:|121-getter|1|121-postInit
  948.             // write post-init user code here
  949.         }//GEN-BEGIN:|121-getter|2|
  950.         return selectItemCmd2;
  951.     }
  952.     //</editor-fold>//GEN-END:|121-getter|2|
  953.     //</editor-fold>
  954.     //</editor-fold>
  955.  
  956.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpConnectWait ">//GEN-BEGIN:|124-getter|0|124-preInit
  957.     /**
  958.      * Returns an initiliazed instance of tcpConnectWait component.
  959.      * @return the initialized component instance
  960.      */
  961.     public WaitScreen getTcpConnectWait() {
  962.         if (tcpConnectWait == null) {//GEN-END:|124-getter|0|124-preInit
  963.             // write pre-init user code here
  964.             tcpConnectWait = new WaitScreen(getDisplay());//GEN-BEGIN:|124-getter|1|124-postInit
  965.             tcpConnectWait.setTitle(TextCz.CONNECTING);
  966.             tcpConnectWait.setCommandListener(this);
  967.             tcpConnectWait.setImage(getConnecting());
  968.             tcpConnectWait.setText(TextCz.CONNECTING);
  969.             tcpConnectWait.setTextFont(getFont());
  970.             tcpConnectWait.setTask(midlet.getTcpConnectTask());//GEN-END:|124-getter|1|124-postInit
  971.             // write post-init user code here
  972.         }//GEN-BEGIN:|124-getter|2|
  973.         return tcpConnectWait;
  974.     }
  975.     //</editor-fold>//GEN-END:|124-getter|2|
  976.  
  977.     //</editor-fold>
  978.     //</editor-fold>
  979.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpConnError ">//GEN-BEGIN:|137-getter|0|137-preInit
  980.     /**
  981.      * Returns an initiliazed instance of tcpConnError component.
  982.      * @return the initialized component instance
  983.      */
  984.     public Alert getTcpConnError() {
  985.         if (tcpConnError == null) {//GEN-END:|137-getter|0|137-preInit
  986.             // write pre-init user code here
  987.             tcpConnError = new Alert(TextCz.ERROR, TextCz.CONNECTION_ERROR, null, AlertType.ERROR);//GEN-BEGIN:|137-getter|1|137-postInit
  988.             tcpConnError.setTimeout(Alert.FOREVER);//GEN-END:|137-getter|1|137-postInit
  989.             // write post-init user code here
  990.         }//GEN-BEGIN:|137-getter|2|
  991.         return tcpConnError;
  992.     }
  993.     //</editor-fold>//GEN-END:|137-getter|2|
  994.     //</editor-fold>
  995.  
  996.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: connecting ">//GEN-BEGIN:|138-getter|0|138-preInit
  997.     /**
  998.      * Returns an initiliazed instance of connecting component.
  999.      * @return the initialized component instance
  1000.      */
  1001.     public Image getConnecting() {
  1002.         if (connecting == null) {//GEN-END:|138-getter|0|138-preInit
  1003.             // write pre-init user code here
  1004.             try {//GEN-BEGIN:|138-getter|1|138-@java.io.IOException
  1005.                 connecting = Image.createImage("/connecting.png");
  1006.             } catch (java.io.IOException e) {//GEN-END:|138-getter|1|138-@java.io.IOException
  1007.                 e.printStackTrace();
  1008.             }//GEN-LINE:|138-getter|2|138-postInit
  1009.             // write post-init user code here
  1010.         }//GEN-BEGIN:|138-getter|3|
  1011.         return connecting;
  1012.     }
  1013.     //</editor-fold>//GEN-END:|138-getter|3|
  1014.  
  1015.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: font ">//GEN-BEGIN:|139-getter|0|139-preInit
  1016.     /**
  1017.      * Returns an initiliazed instance of font component.
  1018.      * @return the initialized component instance
  1019.      */
  1020.     public Font getFont() {
  1021.         if (font == null) {//GEN-END:|139-getter|0|139-preInit
  1022.             // write pre-init user code here
  1023.             font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE);//GEN-LINE:|139-getter|1|139-postInit
  1024.             // write post-init user code here
  1025.         }//GEN-BEGIN:|139-getter|2|
  1026.         return font;
  1027.     }
  1028.     //</editor-fold>//GEN-END:|139-getter|2|
  1029.  
  1030.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpPwdTB ">//GEN-BEGIN:|140-getter|0|140-preInit
  1031.     /**
  1032.      * Returns an initiliazed instance of tcpPwdTB component.
  1033.      * @return the initialized component instance
  1034.      */
  1035.     public TextBox getTcpPwdTB() {
  1036.         if (tcpPwdTB == null) {//GEN-END:|140-getter|0|140-preInit
  1037.             // write pre-init user code here
  1038.             tcpPwdTB = new TextBox(TextCz.PASSWORD, null, 100, TextField.ANY | TextField.PASSWORD | TextField.NON_PREDICTIVE);//GEN-BEGIN:|140-getter|1|140-postInit
  1039.             tcpPwdTB.addCommand(getTcpSendPassCmd());
  1040.             tcpPwdTB.addCommand(getBackCommand3());
  1041.             tcpPwdTB.setCommandListener(this);//GEN-END:|140-getter|1|140-postInit
  1042.             // write post-init user code here
  1043.         }//GEN-BEGIN:|140-getter|2|
  1044.         return tcpPwdTB;
  1045.     }
  1046.     //</editor-fold>//GEN-END:|140-getter|2|
  1047.  
  1048.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpLoginWait ">//GEN-BEGIN:|143-getter|0|143-preInit
  1049.     /**
  1050.      * Returns an initiliazed instance of tcpLoginWait component.
  1051.      * @return the initialized component instance
  1052.      */
  1053.     public WaitScreen getTcpLoginWait() {
  1054.         if (tcpLoginWait == null) {//GEN-END:|143-getter|0|143-preInit
  1055.             // write pre-init user code here
  1056.             tcpLoginWait = new WaitScreen(getDisplay());//GEN-BEGIN:|143-getter|1|143-postInit
  1057.             tcpLoginWait.setTitle(TextCz.AUTHORIZING);
  1058.             tcpLoginWait.setCommandListener(this);
  1059.             tcpLoginWait.setFullScreenMode(true);
  1060.             tcpLoginWait.setImage(getKeyico());
  1061.             tcpLoginWait.setText(TextCz.AUTHORIZING);
  1062.             tcpLoginWait.setTextFont(getFont());
  1063.             tcpLoginWait.setTask(midlet.getLoginTask());//GEN-END:|143-getter|1|143-postInit
  1064.             // write post-init user code here
  1065.         }//GEN-BEGIN:|143-getter|2|
  1066.         return tcpLoginWait;
  1067.     }
  1068.     //</editor-fold>//GEN-END:|143-getter|2|
  1069.     //</editor-fold>
  1070.  
  1071.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpWrongPwd ">//GEN-BEGIN:|150-getter|0|150-preInit
  1072.     /**
  1073.      * Returns an initiliazed instance of tcpWrongPwd component.
  1074.      * @return the initialized component instance
  1075.      */
  1076.     public Alert getTcpWrongPwd() {
  1077.         if (tcpWrongPwd == null) {//GEN-END:|150-getter|0|150-preInit
  1078.             // write pre-init user code here
  1079.             tcpWrongPwd = new Alert(TextCz.ERROR, TextCz.WRONG_PASSWORD, null, AlertType.ERROR);//GEN-BEGIN:|150-getter|1|150-postInit
  1080.             tcpWrongPwd.setTimeout(Alert.FOREVER);//GEN-END:|150-getter|1|150-postInit
  1081.             // write post-init user code here
  1082.         }//GEN-BEGIN:|150-getter|2|
  1083.         return tcpWrongPwd;
  1084.     }
  1085.     //</editor-fold>//GEN-END:|150-getter|2|
  1086.  
  1087.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: tcpSendPassCmd ">//GEN-BEGIN:|141-getter|0|141-preInit
  1088.     /**
  1089.      * Returns an initiliazed instance of tcpSendPassCmd component.
  1090.      * @return the initialized component instance
  1091.      */
  1092.     public Command getTcpSendPassCmd() {
  1093.         if (tcpSendPassCmd == null) {//GEN-END:|141-getter|0|141-preInit
  1094.             // write pre-init user code here
  1095.             tcpSendPassCmd = new Command(TextCz.CONNECT, Command.SCREEN, 0);//GEN-LINE:|141-getter|1|141-postInit
  1096.             // write post-init user code here
  1097.         }//GEN-BEGIN:|141-getter|2|
  1098.         return tcpSendPassCmd;
  1099.     }
  1100.     //</editor-fold>//GEN-END:|141-getter|2|
  1101.  
  1102.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand3 ">//GEN-BEGIN:|154-getter|0|154-preInit
  1103.     /**
  1104.      * Returns an initiliazed instance of backCommand3 component.
  1105.      * @return the initialized component instance
  1106.      */
  1107.     public Command getBackCommand3() {
  1108.         if (backCommand3 == null) {//GEN-END:|154-getter|0|154-preInit
  1109.             // write pre-init user code here
  1110.             backCommand3 = new Command(TextCz.BACK, Command.BACK, 0);//GEN-LINE:|154-getter|1|154-postInit
  1111.             // write post-init user code here
  1112.         }//GEN-BEGIN:|154-getter|2|
  1113.         return backCommand3;
  1114.     }
  1115.     //</editor-fold>//GEN-END:|154-getter|2|
  1116.     //</editor-fold>
  1117.  
  1118.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: serverAddrTF ">//GEN-BEGIN:|157-getter|0|157-preInit
  1119.     /**
  1120.      * Returns an initiliazed instance of serverAddrTF component.
  1121.      * @return the initialized component instance
  1122.      */
  1123.     public TextField getServerAddrTF() {
  1124.         if (serverAddrTF == null) {//GEN-END:|157-getter|0|157-preInit
  1125.             // write pre-init user code here
  1126.             serverAddrTF = new TextField(TextCz.SERVER_ADDR, "192.168.34.4", 32, TextField.ANY | TextField.NON_PREDICTIVE);//GEN-LINE:|157-getter|1|157-postInit
  1127.             // write post-init user code here
  1128.         }//GEN-BEGIN:|157-getter|2|
  1129.         return serverAddrTF;
  1130.     }
  1131.     //</editor-fold>//GEN-END:|157-getter|2|
  1132.     //</editor-fold>
  1133.  
  1134.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: serverPortTF ">//GEN-BEGIN:|158-getter|0|158-preInit
  1135.     /**
  1136.      * Returns an initiliazed instance of serverPortTF component.
  1137.      * @return the initialized component instance
  1138.      */
  1139.     public TextField getServerPortTF() {
  1140.         if (serverPortTF == null) {//GEN-END:|158-getter|0|158-preInit
  1141.             // write pre-init user code here
  1142.             serverPortTF = new TextField(TextCz.SERVER_PORT, "5555", 32, TextField.NUMERIC);//GEN-LINE:|158-getter|1|158-postInit
  1143.             // write post-init user code here
  1144.         }//GEN-BEGIN:|158-getter|2|
  1145.         return serverPortTF;
  1146.     }
  1147.     //</editor-fold>//GEN-END:|158-getter|2|
  1148.  
  1149.     //<editor-fold defaultstate="collapsed" desc=" Generated Method: connectionLost ">//GEN-BEGIN:|161-entry|0|162-preAction
  1150.     /**
  1151.      * Performs an action assigned to the connectionLost entry-point.
  1152.      */
  1153.     public void connectionLost() {//GEN-END:|161-entry|0|162-preAction
  1154.         // write pre-action user code here
  1155.         switchDisplayable(null, getConnectionLostAlert());//GEN-LINE:|161-entry|1|162-postAction
  1156.         // write post-action user code here
  1157.     }//GEN-BEGIN:|161-entry|2|
  1158.     //</editor-fold>//GEN-END:|161-entry|2|
  1159.     //</editor-fold>
  1160.  
  1161.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: connectionLostAlert ">//GEN-BEGIN:|160-getter|0|160-preInit
  1162.     /**
  1163.      * Returns an initiliazed instance of connectionLostAlert component.
  1164.      * @return the initialized component instance
  1165.      */
  1166.     public Alert getConnectionLostAlert() {
  1167.         if (connectionLostAlert == null) {//GEN-END:|160-getter|0|160-preInit
  1168.             // write pre-init user code here
  1169.             connectionLostAlert = new Alert(TextCz.ERROR, TextCz.CONNECTION_ERROR, null, AlertType.ERROR);//GEN-BEGIN:|160-getter|1|160-postInit
  1170.             connectionLostAlert.addCommand(getOkCommand());
  1171.             connectionLostAlert.setCommandListener(this);
  1172.             connectionLostAlert.setTimeout(Alert.FOREVER);//GEN-END:|160-getter|1|160-postInit
  1173.             // write post-init user code here
  1174.         }//GEN-BEGIN:|160-getter|2|
  1175.         return connectionLostAlert;
  1176.     }
  1177.     //</editor-fold>//GEN-END:|160-getter|2|
  1178.  
  1179.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand ">//GEN-BEGIN:|164-getter|0|164-preInit
  1180.     /**
  1181.      * Returns an initiliazed instance of okCommand component.
  1182.      * @return the initialized component instance
  1183.      */
  1184.     public Command getOkCommand() {
  1185.         if (okCommand == null) {//GEN-END:|164-getter|0|164-preInit
  1186.             // write pre-init user code here
  1187.             okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|164-getter|1|164-postInit
  1188.             // write post-init user code here
  1189.         }//GEN-BEGIN:|164-getter|2|
  1190.         return okCommand;
  1191.     }
  1192.     //</editor-fold>//GEN-END:|164-getter|2|
  1193.  
  1194.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btSearchWait ">//GEN-BEGIN:|169-getter|0|169-preInit
  1195.     /**
  1196.      * Returns an initiliazed instance of btSearchWait component.
  1197.      * @return the initialized component instance
  1198.      */
  1199.     public WaitScreen getBtSearchWait() {
  1200.         if (btSearchWait == null) {//GEN-END:|169-getter|0|169-preInit
  1201.             // write pre-init user code here
  1202.             btSearchWait = new WaitScreen(getDisplay());//GEN-BEGIN:|169-getter|1|169-postInit
  1203.             btSearchWait.setTitle(TextCz.BLUETOOTH);
  1204.             btSearchWait.setCommandListener(this);
  1205.             btSearchWait.setImage(getBtico());
  1206.             btSearchWait.setText(TextCz.SEARCHING_DEVICES);
  1207.             btSearchWait.setTextFont(getFont());
  1208.             btSearchWait.setTask(midlet.getBtSearchTask());//GEN-END:|169-getter|1|169-postInit
  1209.             // write post-init user code here
  1210.         }//GEN-BEGIN:|169-getter|2|
  1211.         return btSearchWait;
  1212.     }
  1213.     //</editor-fold>//GEN-END:|169-getter|2|
  1214.  
  1215.     //</editor-fold>
  1216.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btErrorAlert ">//GEN-BEGIN:|175-getter|0|175-preInit
  1217.     /**
  1218.      * Returns an initiliazed instance of btErrorAlert component.
  1219.      * @return the initialized component instance
  1220.      */
  1221.     public Alert getBtErrorAlert() {
  1222.         if (btErrorAlert == null) {//GEN-END:|175-getter|0|175-preInit
  1223.             // write pre-init user code here
  1224.             btErrorAlert = new Alert(TextCz.ERROR, TextCz.BT_ERROR, null, AlertType.ERROR);//GEN-BEGIN:|175-getter|1|175-postInit
  1225.             btErrorAlert.setTimeout(Alert.FOREVER);//GEN-END:|175-getter|1|175-postInit
  1226.             // write post-init user code here
  1227.         }//GEN-BEGIN:|175-getter|2|
  1228.         return btErrorAlert;
  1229.     }
  1230.     //</editor-fold>//GEN-END:|175-getter|2|
  1231.     //</editor-fold>
  1232.  
  1233.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btico ">//GEN-BEGIN:|178-getter|0|178-preInit
  1234.     /**
  1235.      * Returns an initiliazed instance of btico component.
  1236.      * @return the initialized component instance
  1237.      */
  1238.     public Image getBtico() {
  1239.         if (btico == null) {//GEN-END:|178-getter|0|178-preInit
  1240.             // write pre-init user code here
  1241.             try {//GEN-BEGIN:|178-getter|1|178-@java.io.IOException
  1242.                 btico = Image.createImage("/bt.png");
  1243.             } catch (java.io.IOException e) {//GEN-END:|178-getter|1|178-@java.io.IOException
  1244.                 e.printStackTrace();
  1245.             }//GEN-LINE:|178-getter|2|178-postInit
  1246.             // write post-init user code here
  1247.         }//GEN-BEGIN:|178-getter|3|
  1248.         return btico;
  1249.     }
  1250.     //</editor-fold>//GEN-END:|178-getter|3|
  1251.  
  1252.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btLoginWait ">//GEN-BEGIN:|182-getter|0|182-preInit
  1253.     /**
  1254.      * Returns an initiliazed instance of btLoginWait component.
  1255.      * @return the initialized component instance
  1256.      */
  1257.     public WaitScreen getBtLoginWait() {
  1258.         if (btLoginWait == null) {//GEN-END:|182-getter|0|182-preInit
  1259.             // write pre-init user code here
  1260.             btLoginWait = new WaitScreen(getDisplay());//GEN-BEGIN:|182-getter|1|182-postInit
  1261.             btLoginWait.setTitle("waitScreen");
  1262.             btLoginWait.setCommandListener(this);
  1263.             btLoginWait.setFullScreenMode(true);
  1264.             btLoginWait.setImage(getKeyico());
  1265.             btLoginWait.setText(TextCz.AUTHORIZING);
  1266.             btLoginWait.setTextFont(getFont());
  1267.             btLoginWait.setTask(midlet.getLoginTask());//GEN-END:|182-getter|1|182-postInit
  1268.             // write post-init user code here
  1269.         }//GEN-BEGIN:|182-getter|2|
  1270.         return btLoginWait;
  1271.     }
  1272.     //</editor-fold>//GEN-END:|182-getter|2|
  1273.     //</editor-fold>
  1274.  
  1275.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: keyico ">//GEN-BEGIN:|189-getter|0|189-preInit
  1276.     /**
  1277.      * Returns an initiliazed instance of keyico component.
  1278.      * @return the initialized component instance
  1279.      */
  1280.     public Image getKeyico() {
  1281.         if (keyico == null) {//GEN-END:|189-getter|0|189-preInit
  1282.             // write pre-init user code here
  1283.             try {//GEN-BEGIN:|189-getter|1|189-@java.io.IOException
  1284.                 keyico = Image.createImage("/dialog-password.png");
  1285.             } catch (java.io.IOException e) {//GEN-END:|189-getter|1|189-@java.io.IOException
  1286.                 e.printStackTrace();
  1287.             }//GEN-LINE:|189-getter|2|189-postInit
  1288.             // write post-init user code here
  1289.         }//GEN-BEGIN:|189-getter|3|
  1290.         return keyico;
  1291.     }
  1292.     //</editor-fold>//GEN-END:|189-getter|3|
  1293.  
  1294.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand4 ">//GEN-BEGIN:|190-getter|0|190-preInit
  1295.     /**
  1296.      * Returns an initiliazed instance of backCommand4 component.
  1297.      * @return the initialized component instance
  1298.      */
  1299.     public Command getBackCommand4() {
  1300.         if (backCommand4 == null) {//GEN-END:|190-getter|0|190-preInit
  1301.             // write pre-init user code here
  1302.             backCommand4 = new Command(TextCz.BACK, Command.BACK, 0);//GEN-LINE:|190-getter|1|190-postInit
  1303.             // write post-init user code here
  1304.         }//GEN-BEGIN:|190-getter|2|
  1305.         return backCommand4;
  1306.     }
  1307.     //</editor-fold>//GEN-END:|190-getter|2|
  1308.     //</editor-fold>
  1309.  
  1310.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btWrongPwd ">//GEN-BEGIN:|193-getter|0|193-preInit
  1311.     /**
  1312.      * Returns an initiliazed instance of btWrongPwd component.
  1313.      * @return the initialized component instance
  1314.      */
  1315.     public Alert getBtWrongPwd() {
  1316.         if (btWrongPwd == null) {//GEN-END:|193-getter|0|193-preInit
  1317.             // write pre-init user code here
  1318.             btWrongPwd = new Alert(TextCz.ERROR, TextCz.WRONG_PASSWORD, null, AlertType.ERROR);//GEN-BEGIN:|193-getter|1|193-postInit
  1319.             btWrongPwd.setTimeout(Alert.FOREVER);//GEN-END:|193-getter|1|193-postInit
  1320.             // write post-init user code here
  1321.         }//GEN-BEGIN:|193-getter|2|
  1322.         return btWrongPwd;
  1323.     }
  1324.     //</editor-fold>//GEN-END:|193-getter|2|
  1325.  
  1326.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: btConnectWait ">//GEN-BEGIN:|198-getter|0|198-preInit
  1327.     /**
  1328.      * Returns an initiliazed instance of btConnectWait component.
  1329.      * @return the initialized component instance
  1330.      */
  1331.     public WaitScreen getBtConnectWait() {
  1332.         if (btConnectWait == null) {//GEN-END:|198-getter|0|198-preInit
  1333.             // write pre-init user code here
  1334.             btConnectWait = new WaitScreen(getDisplay());//GEN-BEGIN:|198-getter|1|198-postInit
  1335.             btConnectWait.setTitle(TextCz.BLUETOOTH);
  1336.             btConnectWait.setCommandListener(this);
  1337.             btConnectWait.setImage(getBtico());
  1338.             btConnectWait.setText(TextCz.CONNECTING);
  1339.             btConnectWait.setTextFont(getFont());
  1340.             btConnectWait.setTask(midlet.getBtConnectTask());//GEN-END:|198-getter|1|198-postInit
  1341.             // write post-init user code here
  1342.         }//GEN-BEGIN:|198-getter|2|
  1343.         return btConnectWait;
  1344.     }
  1345.     //</editor-fold>//GEN-END:|198-getter|2|
  1346.  
  1347.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand5 ">//GEN-BEGIN:|217-getter|0|217-preInit
  1348.     /**
  1349.      * Returns an initiliazed instance of backCommand5 component.
  1350.      * @return the initialized component instance
  1351.      */
  1352.     public Command getBackCommand5() {
  1353.         if (backCommand5 == null) {//GEN-END:|217-getter|0|217-preInit
  1354.             // write pre-init user code here
  1355.             backCommand5 = new Command(TextCz.BACK, Command.BACK, 0);//GEN-LINE:|217-getter|1|217-postInit
  1356.             // write post-init user code here
  1357.         }//GEN-BEGIN:|217-getter|2|
  1358.         return backCommand5;
  1359.     }
  1360.     //</editor-fold>//GEN-END:|217-getter|2|
  1361.  
  1362.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: itemCommand ">//GEN-BEGIN:|220-getter|0|220-preInit
  1363.     /**
  1364.      * Returns an initiliazed instance of itemCommand component.
  1365.      * @return the initialized component instance
  1366.      */
  1367.     public Command getItemCommand() {
  1368.         if (itemCommand == null) {//GEN-END:|220-getter|0|220-preInit
  1369.             // write pre-init user code here
  1370.             itemCommand = new Command(TextCz.SELECT, Command.ITEM, 0);//GEN-LINE:|220-getter|1|220-postInit
  1371.             // write post-init user code here
  1372.         }//GEN-BEGIN:|220-getter|2|
  1373.         return itemCommand;
  1374.     }
  1375.     //</editor-fold>//GEN-END:|220-getter|2|
  1376.  
  1377.     //</editor-fold>
  1378.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: setKeysCanvas ">//GEN-BEGIN:|232-getter|0|232-preInit
  1379.     /**
  1380.      * Returns an initiliazed instance of setKeysCanvas component.
  1381.      * @return the initialized component instance
  1382.      */
  1383.     public SetKeysCanvas getSetKeysCanvas() {
  1384.         if (setKeysCanvas == null) {//GEN-END:|232-getter|0|232-preInit
  1385.             // write pre-init user code here
  1386.             setKeysCanvas = new SetKeysCanvas(midlet.getControls());//GEN-BEGIN:|232-getter|1|232-postInit
  1387.             setKeysCanvas.setTitle(TextCz.SET_KEYS);
  1388.             setKeysCanvas.addCommand(getSaveCmd());
  1389.             setKeysCanvas.addCommand(getCancelCommand2());
  1390.             setKeysCanvas.setCommandListener(this);//GEN-END:|232-getter|1|232-postInit
  1391.             // write post-init user code here
  1392.         }//GEN-BEGIN:|232-getter|2|
  1393.         return setKeysCanvas;
  1394.     }
  1395.     //</editor-fold>//GEN-END:|232-getter|2|
  1396.     //</editor-fold>
  1397.  
  1398.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: saveCmd ">//GEN-BEGIN:|233-getter|0|233-preInit
  1399.     /**
  1400.      * Returns an initiliazed instance of saveCmd component.
  1401.      * @return the initialized component instance
  1402.      */
  1403.     public Command getSaveCmd() {
  1404.         if (saveCmd == null) {//GEN-END:|233-getter|0|233-preInit
  1405.             // write pre-init user code here
  1406.             saveCmd = new Command(TextCz.SAVE, Command.OK, 0);//GEN-LINE:|233-getter|1|233-postInit
  1407.             // write post-init user code here
  1408.         }//GEN-BEGIN:|233-getter|2|
  1409.         return saveCmd;
  1410.     }
  1411.     //</editor-fold>//GEN-END:|233-getter|2|
  1412.  
  1413.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: cancelCommand2 ">//GEN-BEGIN:|235-getter|0|235-preInit
  1414.     /**
  1415.      * Returns an initiliazed instance of cancelCommand2 component.
  1416.      * @return the initialized component instance
  1417.      */
  1418.     public Command getCancelCommand2() {
  1419.         if (cancelCommand2 == null) {//GEN-END:|235-getter|0|235-preInit
  1420.             // write pre-init user code here
  1421.             cancelCommand2 = new Command(TextCz.CANCEL, Command.CANCEL, 0);//GEN-LINE:|235-getter|1|235-postInit
  1422.             // write post-init user code here
  1423.         }//GEN-BEGIN:|235-getter|2|
  1424.         return cancelCommand2;
  1425.     }
  1426.     //</editor-fold>//GEN-END:|235-getter|2|
  1427.     //</editor-fold>
  1428.  
  1429.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: rotateGroup ">//GEN-BEGIN:|239-getter|0|239-preInit
  1430.     /**
  1431.      * Returns an initiliazed instance of rotateGroup component.
  1432.      * @return the initialized component instance
  1433.      */
  1434.     public ChoiceGroup getRotateGroup() {
  1435.         if (rotateGroup == null) {//GEN-END:|239-getter|0|239-preInit
  1436.             // write pre-init user code here
  1437.             rotateGroup = new ChoiceGroup(TextCz.SCREEN_ROTATE, Choice.EXCLUSIVE);//GEN-BEGIN:|239-getter|1|239-postInit
  1438.             rotateGroup.append(TextCz.YES, null);
  1439.             rotateGroup.append(TextCz.NO, null);
  1440.             rotateGroup.setFitPolicy(Choice.TEXT_WRAP_DEFAULT);
  1441.             rotateGroup.setSelectedFlags(new boolean[] { true, false });//GEN-END:|239-getter|1|239-postInit
  1442.             // write post-init user code here
  1443.         }//GEN-BEGIN:|239-getter|2|
  1444.         return rotateGroup;
  1445.     }
  1446.     //</editor-fold>//GEN-END:|239-getter|2|
  1447.     //</editor-fold>
  1448.  
  1449.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: mouseSpeedGG ">//GEN-BEGIN:|242-getter|0|242-preInit
  1450.     /**
  1451.      * Returns an initiliazed instance of mouseSpeedGG component.
  1452.      * @return the initialized component instance
  1453.      */
  1454.     public Gauge getMouseSpeedGG() {
  1455.         if (mouseSpeedGG == null) {//GEN-END:|242-getter|0|242-preInit
  1456.             // write pre-init user code here
  1457.             mouseSpeedGG = new Gauge(TextCz.MOUSE_SPEED, true, 10, midlet.getMouseStep());//GEN-BEGIN:|242-getter|1|242-postInit
  1458.             mouseSpeedGG.setPreferredSize(-1, -1);//GEN-END:|242-getter|1|242-postInit
  1459.             // write post-init user code here
  1460.         }//GEN-BEGIN:|242-getter|2|
  1461.         return mouseSpeedGG;
  1462.     }
  1463.     //</editor-fold>//GEN-END:|242-getter|2|
  1464.     //</editor-fold>
  1465.  
  1466.  
  1467.  
  1468.     //<editor-fold defaultstate="collapsed" desc=" Generated Getter: delayTF ">//GEN-BEGIN:|244-getter|0|244-preInit
  1469.     /**
  1470.      * Returns an initiliazed instance of delayTF component.
  1471.      * @return the initialized component instance
  1472.      */
  1473.     public TextField getDelayTF() {
  1474.         if (delayTF == null) {//GEN-END:|244-getter|0|244-preInit
  1475.             // write pre-init user code here
  1476.             delayTF = new TextField(TextCz.DELAY_MS, "0", 5, TextField.NUMERIC);//GEN-LINE:|244-getter|1|244-postInit
  1477.             // write post-init user code here
  1478.         }//GEN-BEGIN:|244-getter|2|
  1479.         return delayTF;
  1480.     }
  1481.     //</editor-fold>//GEN-END:|244-getter|2|
  1482.  
  1483.     /**
  1484.      * Returns a display instance.
  1485.      * @return the display instance.
  1486.      */
  1487.     public Display getDisplay() {
  1488.         return Display.getDisplay(midlet);
  1489.     }
  1490.  
  1491.     /**
  1492.      * Exits MIDlet.
  1493.      * Note you have to implement proper MIDlet destroying.
  1494.      */
  1495.     public void exitMIDlet() {
  1496.         switchDisplayable(null, null);
  1497.         // midlet.destroyApp(true);
  1498.         midlet.notifyDestroyed();
  1499.     }
  1500. //moje metody (negenerované)
  1501.  
  1502.     void showBtConnectBtn(boolean show) {
  1503.         getBtSearchList().removeCommand(getBtConnectCmd1());
  1504.         if (show) {
  1505.             getBtSearchList().addCommand(getBtConnectCmd1());
  1506.         }
  1507.     }
  1508. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement