protected void drawObjects() {
        if (!player.isObserving) {
            TrekObject object;
            int indexOfObject = -1;

            // Get all visible objects.
            Vector objects = player.ship.currentQuadrant.getVisibleObjects(player.ship);

            // Get all visible ships.
            Vector ships = new Vector();
            if (player.ship.nebulaTarget != null) {
                ships = player.ship.currentQuadrant.getAllVisibleShipsInRange(player.ship, 1000);
            } else {
                ships = player.ship.currentQuadrant.getVisibleShips(player.ship);
            }

            // First clear all objects and ships that are not visible.
            for (int x = 0; x < 12; x++) {
                if (!objects.contains(tacticalDisplay[x]) && !ships.contains(tacticalDisplay[x])) {
                    tacticalDisplay[x] = null;
                }
            }

            // Add ships to the top most slot in the tactical.
            for (Enumeration e = ships.elements(); e.hasMoreElements(); ) {
                object = (TrekObject) e.nextElement();

                // Get the index of the object if it exists in the array.
                indexOfObject = tacticalIndexOf(object);

                // If it doesn't exist in the array, add it to the top most slot.
                if (indexOfObject == -1) {
                    tacticalAddShip(object);
                }
            }

            for (Enumeration e = objects.elements(); e.hasMoreElements(); ) {
                object = (TrekObject) e.nextElement();

                indexOfObject = tacticalIndexOf(object);

                if (indexOfObject == -1) {
                    tacticalAddObject(object);
                }
            }

            // Now draw the tactical display.
            for (int x = 0; x < 12; x++) {
                drawObject(x + 1, tacticalDisplay[x], "ScannerObj" + (x + 1));

                if (TrekUtilities.isObjectShip(tacticalDisplay[x])) {
                    TrekShip visibleShip = (TrekShip) tacticalDisplay[x];

                    if ((!visibleShip.cloaked) ||
                            (visibleShip.quasarTarget != null) ||
                            (visibleShip.pulsarTarget != null && visibleShip.pulsarTarget.active)) {
                        // update coord in ship spotted database
                        if (player.ship.scannedHistory.containsKey(visibleShip.scanLetter)) {
                            player.ship.scannedHistory.remove(visibleShip.scanLetter);
                        }

                        player.ship.scannedHistory.put(visibleShip.scanLetter, new TrekCoordHistory(visibleShip.scanLetter, visibleShip.name, new Trek3DPoint(visibleShip.point)));
                    }
                }
            }
        }
    }