Package framework

Examples of framework.IRadarPlaneObject


            planeClicked(e, planeNr);
        }
    }

    private void planeClicked(MouseEvent e, int planeNr) {
        IRadarPlaneObject clickedPlane =
                (IRadarPlaneObject) flightListModel.getValueAt(planeNr, 0);
        if (e.getButton() == 3) {
            planeRightClicked(e, clickedPlane);
        } else {
            planeLeftClicked(clickedPlane);
View Full Code Here


            handlePlane(r);
        }
    }

    public void updatePlaneData(IPlaneUpdateObject puo) {
        IRadarPlaneObject tmp = radarPlaneList.get(puo.getIp());
        handlePlaneUpdate(tmp, tmp.getActiveController(), puo.getActiveController());
        tmp.update(puo);
    }
View Full Code Here

     * Adds a new plane.
     *
     * @param puo the planeupdateobject of the new plane
     */
    private void addPlane(IPlaneUpdateObject puo) {
        IRadarPlaneObject tmp = new RadarPlaneObject(puo);
        radarPlaneList.put(puo.getIp(), tmp);
        handlePlane(tmp);
    }
View Full Code Here

     * Adds a new plane.
     *
     * @param pdo the planedataobject of the new plane
     */
    private void addPlane(IPlaneDataObject pdo) {
        IRadarPlaneObject tmp = new RadarPlaneObject(pdo);
        radarPlaneList.put(pdo.getIP(), tmp);
        handlePlane(tmp);
    }
View Full Code Here

     * Removes a plane.
     *
     * @param puo the planeupdateobject of the plane to be removed
     */
    private void removePlane(IPlaneUpdateObject puo) {
        IRadarPlaneObject tmp = new RadarPlaneObject(puo);
        radarPlaneList.remove(puo.getIp());
        assignedList.removePlane(tmp);
        unassignedList.removePlane(tmp);
    }
View Full Code Here

        }
    }

    public void addPlaneData(IPlaneDataObject pdo) {
        if (radarPlaneList.containsKey(pdo.getIP())) {
            IRadarPlaneObject current = radarPlaneList.get(pdo.getIP());
            current.addPosition(pdo);
        } else {
            this.addPlane(pdo);
        }

    }
View Full Code Here

    public void setUpdates() {
        Iterator<IPlaneUpdateObject> uit = pul.iterator();
        while (uit.hasNext()) {
            IPlaneUpdateObject puo = uit.next();
            if (radarPlaneList.containsKey(puo.getIp())) {
                IRadarPlaneObject current = radarPlaneList.get(puo.getIp());
                handlePlaneUpdate(current, current.getActiveController(), puo.getActiveController());
                current.update(puo);

            } else {
                this.addPlane(puo);
            }
            uit.remove();
View Full Code Here

    public void updateRadarPlaneList(String[] userList) {
        boolean found = false;
        Iterator<IRadarPlaneObject> it = radarPlaneList.values().iterator();
        while (it.hasNext()) {
            IRadarPlaneObject rpo = it.next();
            String nick = rpo.getNick();
            System.out.print(nick);
            for (int i = 0; i < userList.length && !found; i++) {
                System.out.println(" - " + userList[i]);
                if (nick.equals(userList[i])) {
                    found = true;
View Full Code Here

        public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus,
                int row, int column) {

            IRadarPlaneObject tempValue = (IRadarPlaneObject) value;
           
            if (tempValue != null) {
                if(tempValue.equals(flightList.getSelectedPlane())){
                    this.setBackground(new Color(100, 120, 200, 130));
                } else {
                 this.setBackground(tempValue.getPlaneColor(flightList.getFunction()));
                }
                planeControllers.setText(tempValue.getActiveController());
                planeName.setText(tempValue.getFlightNumber());
                planeAlt.setText(tempValue.getAltitude()+"");
                planeSpeed.setText(tempValue.getSpeed()+"");
                planeState.setText(tempValue.getPlaneState());
                planeSquawk.setText(tempValue.getSquawk());
            }
           
            return this;
    }
View Full Code Here

TOP

Related Classes of framework.IRadarPlaneObject

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.