Package messages

Examples of messages.PlaneUpdateObject


                final int k = i;
                tmp.addActionListener(new ActionListener() {

                    public void actionPerformed(ActionEvent e) {
                        selectedPlane.setPlaneState(PlaneStates.values()[k].toString());
                        atmcModel.sendObject(new PlaneUpdateObject(selectedPlane));
                        flightListModel.fireTableDataChanged();
                    }
                });
                stateMenu.add(tmp);
            }
View Full Code Here


                    public void actionPerformed(ActionEvent e) {
                        String oC = selectedPlane.getActiveController();
                        String nC = "???";
                        selectedPlane.setActiveController(nC);
                        IPlaneUpdateObject tmp = new PlaneUpdateObject(selectedPlane);
                        atmcModel.handlePlaneUpdate(selectedPlane, oC, nC);
                        atmcModel.sendObject(tmp);
                        flightListModel.fireTableDataChanged();
                    }
                });
                this.add(tmp);
                for (int i = 0; i < functions.length; i++) {
                    if (!functions[i].equals("Pilot") && !functions[i].equals("-no function-")) {
                        final int k = i;
                        tmp = new JMenuItem(functions[i]);
                        tmp.addActionListener(new ActionListener() {

                            public void actionPerformed(ActionEvent e) {
                                String oC = selectedPlane.getActiveController();
                                String nC = functions[k];
                                selectedPlane.setActiveController(nC);
                                IPlaneUpdateObject tmp = new PlaneUpdateObject(selectedPlane);
                                atmcModel.handlePlaneUpdate(selectedPlane, oC, nC);
                                atmcModel.sendObject(tmp);
                                flightListModel.fireTableDataChanged();
                            }
                        });
                        this.add(tmp);
                    }

                }
            } else {
                JMenuItem tmp = new JMenuItem("Myself");
                tmp.addActionListener(new ActionListener() {

                    public void actionPerformed(ActionEvent e) {
                        String oC = selectedPlane.getActiveController();
                        String nC = atmcModel.getFunction();
                        selectedPlane.setActiveController(nC);
                        IPlaneUpdateObject tmp = new PlaneUpdateObject(selectedPlane);
                        atmcModel.handlePlaneUpdate(selectedPlane, oC, nC);
                        atmcModel.sendObject(tmp);
                        flightListModel.fireTableDataChanged();
                    }
                    });
View Full Code Here

            selectedPlane.setAirline(nAirline.getText());
            selectedPlane.setManufacturer(nManufacturer.getText());
            selectedPlane.setPlaneType(nType.getText());
            selectedPlane.setPlaneSubType(nSubType.getText());
            selectedPlane.setSquawk(nSquawk.getText());
            atmcModel.sendObject(new PlaneUpdateObject(selectedPlane));
            flightList.fireChange();
            this.dispose();
        }
       
       
View Full Code Here

            rpo.setManufacturer(jTextField3.getText());
            rpo.setPlaneType(jTextField4.getText());
            rpo.setPlaneSubType(jTextField5.getText());
            rpo.setSquawk(jTextField6.getText());
//            atmClient.getModel().sendObject(new PlaneUpdateObject(rpo));
            planeUpdate = new PlaneUpdateObject(rpo);
            update = true;
        }
    }//GEN-LAST:event_jButton1ActionPerformed
View Full Code Here

TOP

Related Classes of messages.PlaneUpdateObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.