Changeset 59 in tmcsimulator


Ignore:
Timestamp:
03/15/2017 10:20:21 AM (9 years ago)
Author:
jdalbey
Message:

Merge CAD Client updates for multiple incident view windows.

Location:
trunk
Files:
7 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE_metadata/NetBeans/TMCSim/build.xml

    r56 r59  
    1212    <import file="nbproject/build-impl.xml"/> 
    1313    <property name="workdir" value="../../.."/> 
     14<!--        SYSTEM TEST SECTION      --> 
     15    <target description="CAD Simulator" name="cadsimulator"> 
     16    <antcall target="run-single"> 
     17       <param name="javac.includes" value="tmcsim/cadsimulator/CADSimulator.java"/> 
     18       <param name="run.class" value="tmcsim/cadsimulator/CADSimulator"/> 
     19    </antcall> 
     20    </target> 
     21    <target description="Visible System Test of CADSimulator"  name="VisibleSystemTest"> 
     22    <antcall target="test-single"> 
     23       <param name="javac.includes" value="tmcsim/cadsimulator/VisibleSystemTest.java"/> 
     24       <param name="test.includes" value="tmcsim/cadsimulator/VisibleSystemTest.java"/> 
     25    </antcall> 
     26    </target> 
     27    <target description="CAD Simulator - console" name="cadconsole"> 
     28        <java jar="deploy/CADserver.jar" 
     29           fork="true"> 
     30         <classpath> 
     31           <pathelement location="deploy/CADserver.jar"/> 
     32         </classpath> 
     33       </java> 
     34    </target> 
     35    <target description="CAD Simulator - GUI" name="cadgui"> 
     36        <java jar="deploy/CADserver.jar" 
     37           fork="true"><jvmarg value="-version"/> 
     38         <classpath> 
     39           <pathelement location="deploy/CADserver.jar"/> 
     40         </classpath> 
     41       </java> 
     42    </target> 
     43    <target description="Run Paramics Communicator" name="pcomm"> 
     44    <antcall target="run-single"> 
     45       <param name="javac.includes" value="tmcsim/paramicscommunicator/PComm.java"/> 
     46       <param name="run.class" value="tmcsim/paramicscommunicator/PComm"/> 
     47    </antcall> 
     48    </target> 
     49    <target description="Run Simulation Manager" name="simmgr"> 
     50    <antcall target="run-single"> 
     51       <param name="javac.includes" value="tmcsim/simulationmanager/SimulationManager.java"/> 
     52       <param name="run.class" value="tmcsim/simulationmanager/SimulationManager"/> 
     53    </antcall> 
     54    </target> 
     55    <target description="Emulate Paramics Modeler" name="emulate"> 
     56        <echo file="${workdir}/paramics_status.xml" append="false"> 
     57            &lt;Paramics&gt; &lt;Network_Status&gt;WARMING&lt;/Network_Status&gt; &lt;Network_ID&gt;1&lt;/Network_ID&gt; &lt;/Paramics&gt; 
     58        </echo> 
     59        <sleep seconds="5"/> 
     60        <echo file="${workdir}/paramics_status.xml" append="false"> 
     61            &lt;Paramics&gt; &lt;Network_Status&gt;LOADED&lt;/Network_Status&gt; &lt;Network_ID&gt;1&lt;/Network_ID&gt; &lt;/Paramics&gt; 
     62        </echo> 
     63    </target> 
     64 
    1465<!--        STORE SUBVERSION BUILD STRING      --> 
    1566<target name="-post-init" description="Sets the buildversion for the current build"> 
     
    60111            /> 
    61112</checkstyle> 
    62 </target>      
    63     
     113</target> 
     114<!-- 
     115                ================= 
     116                ZIP for Web-CAT SECTION for CPE 305 assignments 
     117                ================= 
     118Create a zip file of source to CADSimulator for submission to Web-CAT grader. 
     119--> 
     120<target name="webcat-zip" depends="jar"> 
     121 
     122    <zip destfile="${workdir}/webcatsubmit.zip"> 
     123        <fileset dir="${workdir}/src/"> 
     124                 <include name="tmcsim/cadsimulator/viewer/**/*.java" /> 
     125                 <include name="tmcsim/cadsimulator/viewer/model/**/*.java" /> 
     126                 <include name="tmcsim/cadsimulator/viewer/actions/**/*.java" /> 
     127                 <include name="tmcsim/cadsimulator/videocontrol/**/*.java" /> 
     128                 <exclude name="tmcsim/paramics*/**"/> 
     129                 <exclude name="tmcsim/simulationmanager/**"/> 
     130                 <exclude name="tmcsim/cadsimulator/MP3Driver.java"/> 
     131        </fileset> 
     132        <!-- 
     133        <fileset dir="${workdir}"  includes="scripts/Cardfile.xml"/> 
     134        --> 
     135        <fileset dir="${workdir}/test/"> 
     136                 <include name="tmcsim/cadsimulator/viewer/CADSimulatorViewModelTest.java" /> 
     137        </fileset> 
     138    </zip> 
     139</target> 
    64140<!-- 
    65141                ================= 
     
    79155    <delete dir="${deploy.dir}"/> 
    80156    <mkdir dir="${deploy.dir}"/> 
    81  
     157    <tstamp> 
     158        <format property="TODAY" pattern="yyyy.MM.dd HH:mm" /> 
     159    </tstamp> 
    82160    <jar destfile="${deploy.dir}/temp_final.jar" filesetmanifest="skip"> 
    83161        <zipgroupfileset dir="dist" includes="*.jar"/> 
     
    125203      <jar destfile="${deploy.dir}/CADClient.jar" 
    126204       basedir="${build.dir}/classes" 
    127        includes="tmcsim/client/**, tmcsim/common/**, tmcsim/interfaces/**,  
    128             tmcsim/cadmodels/**"> 
    129         <zipgroupfileset dir="dist/lib" includes="xercesImpl.jar"/> 
     205       includes="tmcsim/client/**, tmcsim/common/**, tmcsim/interfaces/**, 
     206            tmcsim/cadmodels/**, tmcsim/simulationmanager/model/LogEntryCellRenderer.class"> 
     207      <zipgroupfileset dir="dist/lib" includes="xercesImpl.jar"/> 
    130208        <manifest> 
    131209            <attribute name="Main-Class" value="tmcsim.client.CADClient"/> 
     210            <attribute name="Implementation-Version" value="${TODAY}"/> 
    132211        </manifest> 
    133212      </jar> 
  • trunk/IDE_metadata/NetBeans/TMCSim/nbproject/project.properties

    r51 r59  
    2828endorsed.classpath= 
    2929excludes= 
     30file.reference.commons-lang-2.4.jar=../../../lib/commons-lang-2.4.jar 
    3031file.reference.jaco-mp3-player-0.9.3.jar=../../../lib/jaco-mp3-player-0.9.3.jar 
    3132file.reference.mockito-1.10.19.jar=../../../lib/mockito-1.10.19.jar 
     
    3334file.reference.tmc-simulator-test=../../../test 
    3435file.reference.uispec4j-jdk17.jar=../../../lib/uispec4j-jdk17.jar 
    35 file.reference.xercesImpl.jar=../../../src/tmcsim/cadsimulator/CADSimulator_lib/xercesImpl.jar 
     36file.reference.xercesImpl.jar=../../../lib/xercesImpl.jar 
    3637includes=** 
    3738jar.compress=false 
    3839javac.classpath=\ 
     40    ${file.reference.uispec4j-jdk17.jar}:\ 
    3941    ${file.reference.xercesImpl.jar}:\ 
    40     ${file.reference.uispec4j-jdk17.jar}:\ 
     42    ${file.reference.jaco-mp3-player-0.9.3.jar}:\ 
    4143    ${file.reference.mockito-1.10.19.jar}:\ 
    42     ${libs.junit_4.classpath}:\ 
    43     ${file.reference.jaco-mp3-player-0.9.3.jar} 
     44    ${file.reference.commons-lang-2.4.jar}:\ 
     45    ${libs.junit_4.classpath} 
    4446# Space-separated list of extra javac options 
    4547javac.compilerargs= 
     
    5658    ${javac.test.classpath} 
    5759javadoc.additionalparam= 
    58 javadoc.author=false 
     60javadoc.author=true 
    5961javadoc.encoding=${source.encoding} 
    6062javadoc.noindex=false 
     
    6466javadoc.splitindex=true 
    6567javadoc.use=true 
    66 javadoc.version=false 
     68javadoc.version=true 
    6769javadoc.windowtitle= 
    6870main.class=tmcsim.cadsimulator.CADSimulator 
  • trunk/src/tmcsim/application.properties

    r57 r59  
    1 #Tue, 14 Mar 2017 20:23:50 -0700 
     1#Wed, 15 Mar 2017 11:18:58 -0700 
    22 
    3 Application.revision=56 
     3Application.revision=58 
    44 
    5 Application.buildnumber=32 
     5Application.buildnumber=33 
  • trunk/src/tmcsim/client/cadclientgui/data/Incident.java

    r53 r59  
    526526 
    527527    public void addToCommentsNotesTable(String[] fields) { 
    528         this.commentsNotesTable.insertRow(0, fields); //JD - new notes go 1st 
     528        this.commentsNotesTable.insertRow(0, fields); // new notes go 1st 
    529529    } 
    530530 
  • trunk/src/tmcsim/client/cadclientgui/screens/AssignedIncidents.java

    r3 r59  
    44import java.awt.Component; 
    55import java.awt.Dimension; 
     6import java.awt.Point; 
    67import java.awt.Toolkit; 
    78import java.awt.datatransfer.DataFlavor; 
     
    1415import java.rmi.RemoteException; 
    1516import java.util.List; 
    16  
    1717import javax.swing.Box; 
    1818import javax.swing.BoxLayout; 
     
    2323import javax.swing.JTable; 
    2424import javax.swing.ListSelectionModel; 
     25import javax.swing.RowSorter.SortKey; 
    2526import javax.swing.SwingUtilities; 
    2627import javax.swing.TransferHandler; 
    27 import javax.swing.RowSorter.SortKey; 
    2828import javax.swing.table.DefaultTableModel; 
    2929import javax.swing.table.TableCellRenderer; 
    30  
    3130import tmcsim.client.cadclientgui.enums.CADDataEnums; 
    3231import tmcsim.client.cadclientgui.enums.CADScriptTags.UNIT_TAGS; 
     
    3635 
    3736/** 
    38  * This class contains the view and controller for the AssignedIncidents screen. The view was not built using a GUI builder plug-in 
    39  * (but may want to consider doing so in the future), and the controller uses listeners to control how the view and data act.  
    40  *  
     37 * This class contains the view and controller for the AssignedIncidents screen. 
     38 * The view was not built using a GUI builder plug-in (but may want to consider 
     39 * doing so in the future), and the controller uses listeners to control how the 
     40 * view and data act. 
     41 * 
    4142 * @author Vincent 
    4243 */ 
    43  
    44 public class AssignedIncidents extends JFrame { 
    45  
     44public class AssignedIncidents extends JFrame 
     45{ 
    4646    private final String SCREEN_TITLE = "(Shift + F3)  Assigned Incidents"; 
    47  
    4847    private final Dimension SCREEN_DIMENSIONS = new Dimension(1400, 250); 
    49  
    5048    private final Dimension DROP_DOWN_MENU_LABEL_DIMENSIONS = new Dimension( 
    5149            170, 20); 
    52  
    5350    private final Dimension DROP_DOWN_MENU_DIMENSIONS = new Dimension(170, 230); 
    54  
    5551    private final int COLUMN_WIDTH = 120; 
    56  
    57     private final String[] LABELS = { "Add Resources...", "Greater Alarm...", 
    58             "Reconfigure", "Open", "Recall Incident", "Cancel", "Reassign", 
    59             "Link/Append", "Map", "Recall Linked Incidents", "Read Notes", 
    60             "Page...", "Mail...", "Fax..." }; 
    61  
     52    private final String[] LABELS = 
     53    { 
     54        "Add Resources...", "Greater Alarm...", 
     55        "Reconfigure", "Open", "Recall Incident", "Cancel", "Reassign", 
     56        "Link/Append", "Map", "Recall Linked Incidents", "Read Notes", 
     57        "Page...", "Mail...", "Fax..." 
     58    }; 
    6259    private final String LABEL_SPACING = "     "; 
    63  
    6460    private JTable assignedIncidentsTable; 
    6561    private JFrame assignedIncidentsMenu; 
    66  
    6762    // labels for the drop down menu 
    6863    private JLabel[] dropDownLabels = new JLabel[LABELS.length]; 
    69  
    7064    private long lastLeftClick;// used for double clicking feature 
    7165 
    72     public AssignedIncidents() { 
     66    public AssignedIncidents() 
     67    { 
    7368        initComponents(); 
    7469    } 
    7570 
    76     private void initComponents() { 
     71    private void initComponents() 
     72    { 
    7773        initializeTable(); 
    7874        initController(); 
     
    9894     * drop feature. 
    9995     */ 
    100     private void initializeTable() { 
    101         assignedIncidentsTable = new JTable(){ 
     96    private void initializeTable() 
     97    { 
     98        assignedIncidentsTable = new JTable() 
     99        { 
    102100            /* 
    103101             * Custom renderer to set different background/foreground colors 
    104102             * @see javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, int, int) 
    105103             */ 
    106             public Component prepareRenderer(TableCellRenderer renderer, int row, int column){ 
     104            public Component prepareRenderer(TableCellRenderer renderer, int row, int column) 
     105            { 
    107106                Component comp = super.prepareRenderer(renderer, row, column); 
    108                  
     107 
    109108                comp.setForeground(Color.BLACK); 
    110109                comp.setBackground(Color.CYAN); 
    111                 if(assignedIncidentsTable.getModel().getColumnName(column).equals("Unit/s")){//4 is the column for "Unit/s" 
    112                   System.out.println("Commenting this line breaks the client"); 
     110                if (assignedIncidentsTable.getModel().getColumnName(column).equals("Unit/s")) 
     111                {//4 is the column for "Unit/s" 
     112                    //System.out.println("Diagnostic: in AssignedIncidents.prepareRenderer()"); //Commenting this line breaks the client 
    113113                    comp.setBackground(Color.BLACK); 
    114114                    int primaryColumn = 3; 
    115                     try { 
    116                         switch(ScreenManager.theCoordinator.getCadDataUnitStatus( 
    117                                (String) assignedIncidentsTable.getValueAt(row,primaryColumn))){ 
    118                             case Assignable: 
    119                                 comp.setForeground(Color.GREEN); 
    120                                 break; 
    121                             case Arrived: 
    122                                 comp.setForeground(Color.YELLOW); 
    123                                 break; 
    124                             case Enroute: 
    125                                 comp.setForeground(Color.CYAN); 
    126                                 break; 
    127                         }  
    128                     }catch (RemoteException e){ 
    129                       e.printStackTrace(); 
     115                    try 
     116                    { 
     117                        // get the unit name from the table   JD 
     118                        String unitname = (String) assignedIncidentsTable.getValueAt(row, primaryColumn); 
     119                        // Validate that unitname isn't blank 
     120                        if (!unitname.equals("")) 
     121                        { 
     122                            // Fetch the unit's current status from server 
     123                            UnitStatusEnums ustatus =  ScreenManager.theCoordinator.getCadDataUnitStatus(unitname); 
     124                            // Decide which color to use for displaying the status 
     125                            switch (ustatus) 
     126                            { 
     127                                case Assignable: 
     128                                    comp.setForeground(Color.GREEN); 
     129                                    break; 
     130                                case Arrived: 
     131                                    comp.setForeground(Color.YELLOW); 
     132                                    break; 
     133                                case Enroute: 
     134                                    comp.setForeground(Color.CYAN); 
     135                                    break; 
     136                            } 
     137                        } 
     138                    } catch (RemoteException e) 
     139                    { 
     140                        e.printStackTrace(); 
    130141                    } 
    131142                } 
    132                  
    133                 if (getSelectedRow() == row){ 
     143 
     144                if (getSelectedRow() == row) 
     145                { 
    134146                    comp.setForeground(Color.WHITE); 
    135147                    comp.setBackground(Color.BLUE); 
    136148                } 
    137                  
     149 
    138150                return comp; 
    139151            } 
    140              
    141             public Class getColumnClass(int c) { 
     152 
     153            public Class getColumnClass(int c) 
     154            { 
    142155                return getValueAt(0, c).getClass(); 
    143156            } 
    144              
    145157        }; 
    146          
     158 
    147159        assignedIncidentsTable.setOpaque(true); 
    148160        assignedIncidentsTable.setIntercellSpacing(new Dimension(1, 0)); 
     
    153165        assignedIncidentsTable.setAutoCreateRowSorter(true); 
    154166        assignedIncidentsTable.setModel(new DefaultTableModel()); 
    155          
     167 
    156168        ((DefaultTableModel) assignedIncidentsTable.getModel()).setColumnIdentifiers(TableHeaders.ASSIGNED_INCIDENTS_HEADERS); 
    157          
    158         assignedIncidentsTable.setTransferHandler(new TransferHandler(){ 
    159              
    160             public boolean canImport(TransferHandler.TransferSupport info) { 
     169 
     170        assignedIncidentsTable.setTransferHandler(new TransferHandler() 
     171        { 
     172            public boolean canImport(TransferHandler.TransferSupport info) 
     173            { 
    161174                // Check for String flavor 
    162                 if (!info.isDataFlavorSupported(DataFlavor.stringFlavor)) { 
     175                if (!info.isDataFlavorSupported(DataFlavor.stringFlavor)) 
     176                { 
    163177                    return false; 
    164178                } 
    165179                return true; 
    166            } 
    167              
    168             public boolean importData(TransferHandler.TransferSupport info) { 
    169                 if (!info.isDrop()) { 
     180            } 
     181 
     182            public boolean importData(TransferHandler.TransferSupport info) 
     183            { 
     184                if (!info.isDrop()) 
     185                { 
    170186                    return false; 
    171187                } 
    172           
    173                 DefaultTableModel tableModel = (DefaultTableModel)assignedIncidentsTable.getModel(); 
    174                 JTable.DropLocation dl = (JTable.DropLocation)info.getDropLocation(); 
     188 
     189                DefaultTableModel tableModel = (DefaultTableModel) assignedIncidentsTable.getModel(); 
     190                JTable.DropLocation dl = (JTable.DropLocation) info.getDropLocation(); 
    175191                int index = dl.getRow(); 
    176           
     192 
    177193                // Get the string that is being dropped. 
    178194                Transferable t = info.getTransferable(); 
    179195                String data; 
    180                 try { 
    181                     data = (String)t.getTransferData(DataFlavor.stringFlavor); 
    182                 } 
    183                 catch (Exception e) { return false; } 
    184                                           
     196                try 
     197                { 
     198                    data = (String) t.getTransferData(DataFlavor.stringFlavor); 
     199                } catch (Exception e) 
     200                { 
     201                    return false; 
     202                } 
     203 
    185204                // Perform the actual import 
    186                 int incidentId = (Integer)assignedIncidentsTable.getValueAt(dl.getRow(), 0); 
    187                 try { 
    188                         ScreenManager.theCoordinator.setCadDataUnitAssignedId(data, incidentId); 
    189                         ScreenManager.theCoordinator.setCadDataUnitValue(data, 
    190                       UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Arrived); 
    191                      ScreenManager.theCoordinator.addCadDataIncidentAssignedUnitNum(incidentId, data); 
    192                      ScreenManager.theCoordinator.setCadDataIncidentStatus(incidentId, IncidentEnums.Assigned); 
    193                      } catch (RemoteException e) { 
    194                         e.printStackTrace(); 
    195                      } 
     205                int incidentId = (Integer) assignedIncidentsTable.getValueAt(dl.getRow(), 0); 
     206                try 
     207                { 
     208                    ScreenManager.theCoordinator.setCadDataUnitAssignedId(data, incidentId); 
     209                    ScreenManager.theCoordinator.setCadDataUnitValue(data, 
     210                            UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Arrived); 
     211                    ScreenManager.theCoordinator.addCadDataIncidentAssignedUnitNum(incidentId, data); 
     212                    ScreenManager.theCoordinator.setCadDataIncidentStatus(incidentId, IncidentEnums.Assigned); 
     213                } catch (RemoteException e) 
     214                { 
     215                    e.printStackTrace(); 
     216                } 
    196217                ScreenManager.refreshScreens(); 
    197218                return true; 
    198219            } 
    199220        }); 
    200          
    201         for(int i = 0; i < assignedIncidentsTable.getColumnCount(); i++){ 
     221 
     222        for (int i = 0; i < assignedIncidentsTable.getColumnCount(); i++) 
     223        { 
    202224            assignedIncidentsTable.getColumnModel().getColumn(i).setPreferredWidth(120); 
    203225        } 
    204226    } 
    205      
     227 
    206228    /* 
    207229     * Adds the key and mouse listeners for the table and component listener for 
    208230     * screen. 
    209231     */ 
    210     private void initController() { 
    211         assignedIncidentsTable.addMouseListener(new MouseListener() { 
    212             public void mouseClicked(MouseEvent e) { 
    213                 if (SwingUtilities.isLeftMouseButton(e)) { 
    214                     if (System.currentTimeMillis() - lastLeftClick < 1000) { 
     232    private void initController() 
     233    { 
     234        assignedIncidentsTable.addMouseListener(new MouseListener() 
     235        { 
     236            public void mouseClicked(MouseEvent e) 
     237            { 
     238                if (SwingUtilities.isLeftMouseButton(e)) 
     239                { 
     240                    // TODO:  Use e.getClickCount() == 2 
     241                    if (System.currentTimeMillis() - lastLeftClick < 1000) 
     242                    { 
    215243                        int idColumn = 0; 
    216                         ScreenManager 
    217                                 .openIncidentViewer((Integer) assignedIncidentsTable 
    218                                         .getValueAt(assignedIncidentsTable 
    219                                                 .getSelectedRow(), idColumn)); 
    220                     } else { 
     244                        int selectedRow = assignedIncidentsTable.getSelectedRow(); 
     245                        try 
     246                        { 
     247                            int selectedValue = (Integer) assignedIncidentsTable.getValueAt(selectedRow, idColumn); 
     248                            ScreenManager.openIncidentViewer(selectedValue); 
     249                        } catch (IndexOutOfBoundsException ex) 
     250                        { 
     251                            ex.printStackTrace(); 
     252                        } 
     253                    } 
     254                    else 
     255                    { 
    221256                        lastLeftClick = System.currentTimeMillis(); 
    222257                    } 
    223258                } 
    224                 if (SwingUtilities.isRightMouseButton(e)) { 
     259                if (SwingUtilities.isRightMouseButton(e)) 
     260                { 
     261                    // Fixed to force right click to cause the row to be selected. JD 
     262                    // get the coordinates of the mouse click 
     263                    Point p = e.getPoint(); 
     264                    // get the row index that contains that coordinate 
     265                    int rowNumber = assignedIncidentsTable.rowAtPoint(p); 
     266                    // Get the ListSelectionModel of the JTable 
     267                    ListSelectionModel model = assignedIncidentsTable.getSelectionModel(); 
     268                    // set the selected interval of rows. Using the "rowNumber" 
     269                    // variable for the beginning and end selects only that one row. 
     270                    model.setSelectionInterval(rowNumber, rowNumber); 
     271                    // go open the drop down menu 
    225272                    openDropDownMenu(e); 
    226                 } else { 
     273                } 
     274                else 
     275                { 
    227276                    closeDropDownMenu(); 
    228277                } 
    229278            } 
    230279 
    231             public void mouseEntered(MouseEvent e) { 
    232             } 
    233  
    234             public void mouseExited(MouseEvent e) { 
    235             } 
    236  
    237             public void mousePressed(MouseEvent e) { 
    238             } 
    239  
    240             public void mouseReleased(MouseEvent e) { 
     280            public void mouseEntered(MouseEvent e) 
     281            { 
     282            } 
     283 
     284            public void mouseExited(MouseEvent e) 
     285            { 
     286            } 
     287 
     288            public void mousePressed(MouseEvent e) 
     289            { 
     290            } 
     291 
     292            public void mouseReleased(MouseEvent e) 
     293            { 
    241294            } 
    242295        }); 
    243296 
    244         addComponentListener(new ComponentListener() { 
    245             public void componentHidden(ComponentEvent e) { 
    246             } 
    247  
    248             public void componentMoved(ComponentEvent e) { 
     297        addComponentListener(new ComponentListener() 
     298        { 
     299            public void componentHidden(ComponentEvent e) 
     300            { 
     301            } 
     302 
     303            public void componentMoved(ComponentEvent e) 
     304            { 
    249305                closeDropDownMenu(); 
    250306            } 
    251307 
    252             public void componentResized(ComponentEvent e) { 
    253             } 
    254  
    255             public void componentShown(ComponentEvent e) { 
     308            public void componentResized(ComponentEvent e) 
     309            { 
     310            } 
     311 
     312            public void componentShown(ComponentEvent e) 
     313            { 
    256314            } 
    257315        }); 
     
    262320     * on the table. 
    263321     */ 
    264     private void initializeDropDownMenu() { 
     322    private void initializeDropDownMenu() 
     323    { 
    265324        Box menu = new Box(BoxLayout.Y_AXIS); 
    266325        initializeDropDownLabels(); 
     
    282341     * Sets the text and size and adds a listener to each activated label. 
    283342     */ 
    284     private void initializeDropDownLabels() { 
    285         for (int i = 0; i < dropDownLabels.length; i++) { 
     343    private void initializeDropDownLabels() 
     344    { 
     345        for (int i = 0; i < dropDownLabels.length; i++) 
     346        { 
    286347            dropDownLabels[i] = new JLabel(LABEL_SPACING + LABELS[i]); 
    287348            dropDownLabels[i].setMaximumSize(DROP_DOWN_MENU_LABEL_DIMENSIONS); 
     
    298359     * between. 
    299360     */ 
    300     private void addLabelsToBox(Box menu) { 
     361    private void addLabelsToBox(Box menu) 
     362    { 
    301363        menu.add(dropDownLabels[0]); 
    302364        menu.add(dropDownLabels[1]); 
     
    335397     * Sets the highlighted color(when the mouse is over it) of the JLabels. 
    336398     * Note: the color is not shown until .setOpaque(true) is called. 
    337      *  
     399     * 
    338400     * @param color the highlighted color 
    339401     */ 
    340     public void setMenuHighlightedBackground(Color color) { 
    341         for (int i = 0; i < dropDownLabels.length; i++) { 
     402    public void setMenuHighlightedBackground(Color color) 
     403    { 
     404        for (int i = 0; i < dropDownLabels.length; i++) 
     405        { 
    342406            dropDownLabels[i].setBackground(color); 
    343407        } 
     
    347411     * Sets all JLabels to not display a highlighted background 
    348412     */ 
    349     public void unSelectAllLabels() { 
    350         for (int i = 0; i < dropDownLabels.length; i++) { 
     413    public void unSelectAllLabels() 
     414    { 
     415        for (int i = 0; i < dropDownLabels.length; i++) 
     416        { 
    351417            dropDownLabels[i].setOpaque(false); 
    352418        } 
     
    355421    /* 
    356422     * Sets the label to have a highlighted background. 
    357      *  
     423     * 
    358424     * @param label the label that is selected/highlighted 
    359425     */ 
    360     public void selectLabel(Object label) { 
     426    public void selectLabel(Object label) 
     427    { 
    361428        ((JLabel) label).setOpaque(true); 
    362429    } 
     
    365432     * Performs the label action depending on which label was clicked. 
    366433     */ 
    367     public void performLabelAction(Object label) { 
    368         if (label.equals(dropDownLabels[0])) {// Add Resources 
    369  
    370         } else if (label.equals(dropDownLabels[1])) {// Greater Alarm 
    371  
    372         } else if (label.equals(dropDownLabels[2])) {// Reconfigure 
    373  
    374         } else if (label.equals(dropDownLabels[3])) {// Open 
     434    public void performLabelAction(Object label) 
     435    { 
     436        if (label.equals(dropDownLabels[0])) 
     437        {// Add Resources 
     438        } 
     439        else if (label.equals(dropDownLabels[1])) 
     440        {// Greater Alarm 
     441        } 
     442        else if (label.equals(dropDownLabels[2])) 
     443        {// Reconfigure 
     444        } 
     445        else if (label.equals(dropDownLabels[3])) 
     446        {// Open 
     447            int idColumn = 0; 
     448            int selectedRow = assignedIncidentsTable.getSelectedRow(); 
     449            try 
     450            { 
     451                int selectedValue = (Integer) assignedIncidentsTable.getValueAt(selectedRow, idColumn); 
     452                ScreenManager.openIncidentViewer(selectedValue); 
     453            } catch (IndexOutOfBoundsException ex) 
     454            { 
     455                ex.printStackTrace(); 
     456            } 
     457        } 
     458        else if (label.equals(dropDownLabels[4])) 
     459        {// Recall Incident 
     460        } 
     461        else if (label.equals(dropDownLabels[5])) 
     462        {// Cancel 
     463        } 
     464        else if (label.equals(dropDownLabels[6])) 
     465        {// Reassign 
     466        } 
     467        else if (label.equals(dropDownLabels[7])) 
     468        {// Link append 
     469        } 
     470        else if (label.equals(dropDownLabels[8])) 
     471        {// Map 
     472        } 
     473        else if (label.equals(dropDownLabels[9])) 
     474        {// Recall Linked Incidents 
     475        } 
     476        else if (label.equals(dropDownLabels[10])) 
     477        {// Read Notes 
    375478            int idColumn = 0; 
    376479            ScreenManager.openIncidentViewer((Integer) assignedIncidentsTable 
    377480                    .getValueAt(assignedIncidentsTable.getSelectedRow(), 
    378                             idColumn)); 
    379         } else if (label.equals(dropDownLabels[4])) {// Recall Incident 
    380  
    381         } else if (label.equals(dropDownLabels[5])) {// Cancel 
    382  
    383         } else if (label.equals(dropDownLabels[6])) {// Reassign 
    384  
    385         } else if (label.equals(dropDownLabels[7])) {// Link append 
    386  
    387         } else if (label.equals(dropDownLabels[8])) {// Map 
    388  
    389         } else if (label.equals(dropDownLabels[9])) {// Recall Linked Incidents 
    390  
    391         } else if (label.equals(dropDownLabels[10])) {// Read Notes 
    392             int idColumn = 0; 
    393             ScreenManager.openIncidentViewer((Integer) assignedIncidentsTable 
    394                     .getValueAt(assignedIncidentsTable.getSelectedRow(), 
    395                             idColumn)); 
    396         } else if (label.equals(dropDownLabels[11])) {// Page 
    397  
    398         } else if (label.equals(dropDownLabels[12])) {// Mail 
    399  
    400         } else if (label.equals(dropDownLabels[13])) {// Fax 
    401  
     481                    idColumn)); 
     482        } 
     483        else if (label.equals(dropDownLabels[11])) 
     484        {// Page 
     485        } 
     486        else if (label.equals(dropDownLabels[12])) 
     487        {// Mail 
     488        } 
     489        else if (label.equals(dropDownLabels[13])) 
     490        {// Fax 
    402491        } 
    403492    } 
     
    409498     * designates. 
    410499     */ 
    411     public void addMouseListenersToLabel(JLabel label) { 
    412         label.addMouseMotionListener(new MouseMotionListener() { 
    413             public void mouseDragged(MouseEvent e) { 
    414             } 
    415  
    416             public void mouseMoved(MouseEvent e) { 
     500    public void addMouseListenersToLabel(JLabel label) 
     501    { 
     502        label.addMouseMotionListener(new MouseMotionListener() 
     503        { 
     504            public void mouseDragged(MouseEvent e) 
     505            { 
     506            } 
     507 
     508            public void mouseMoved(MouseEvent e) 
     509            { 
    417510                unSelectAllLabels(); 
    418511                selectLabel(e.getSource()); 
     
    421514            } 
    422515        }); 
    423         label.addMouseListener(new MouseListener() { 
    424             public void mouseClicked(MouseEvent e) { 
     516        label.addMouseListener(new MouseListener() 
     517        { 
     518            public void mouseClicked(MouseEvent e) 
     519            { 
    425520                performLabelAction(e.getSource()); 
    426521                unSelectAllLabels(); 
     
    430525            } 
    431526 
    432             public void mouseEntered(MouseEvent e) { 
    433             } 
    434  
    435             public void mouseExited(MouseEvent e) { 
    436             } 
    437  
    438             public void mousePressed(MouseEvent e) { 
    439             } 
    440  
    441             public void mouseReleased(MouseEvent e) { 
     527            public void mouseEntered(MouseEvent e) 
     528            { 
     529            } 
     530 
     531            public void mouseExited(MouseEvent e) 
     532            { 
     533            } 
     534 
     535            public void mousePressed(MouseEvent e) 
     536            { 
     537            } 
     538 
     539            public void mouseReleased(MouseEvent e) 
     540            { 
    442541            } 
    443542        }); 
     
    447546     * Displays the menu where the right click occurred. 
    448547     */ 
    449     public void openDropDownMenu(MouseEvent e) { 
     548    public void openDropDownMenu(MouseEvent e) 
     549    { 
    450550        assignedIncidentsMenu.setLocation(e.getX() + this.getX(), e.getY() 
    451551                + this.getY()); 
     
    456556     * Hides the menu. 
    457557     */ 
    458     public void closeDropDownMenu() { 
     558    public void closeDropDownMenu() 
     559    { 
    459560        unSelectAllLabels(); 
    460561        assignedIncidentsMenu.revalidate(); 
     
    465566    /* 
    466567     * Refreshes the data in the table by updating all data and repainting the 
    467      * screen. It saves user preferences(like column sizes, selected row, sorted preferences)  
     568     * screen. It saves user preferences(like column sizes, selected row, sorted preferences) 
    468569     * and applies them to the updated model it receives from the server. 
    469570     */ 
    470     public void refreshTable() { 
    471          
    472         if(assignedIncidentsTable.getTableHeader().getResizingColumn() == null){//only update info if resize not in progress 
    473               try { 
     571    public void refreshTable() 
     572    { 
     573 
     574        if (assignedIncidentsTable.getTableHeader().getResizingColumn() == null) 
     575        {//only update info if resize not in progress 
     576            try 
     577            { 
    474578                int index = assignedIncidentsTable.getSelectedRow(); 
    475579                int[] columnWidths = new int[20]; 
    476580                List<? extends SortKey> keys = assignedIncidentsTable.getRowSorter().getSortKeys(); 
    477                 for(int i = 0; i < assignedIncidentsTable.getColumnCount(); i++){ 
     581                for (int i = 0; i < assignedIncidentsTable.getColumnCount(); i++) 
     582                { 
    478583                    columnWidths[i] = assignedIncidentsTable.getColumnModel().getColumn(i).getWidth(); 
    479584                } 
    480                  
     585 
    481586                assignedIncidentsTable.setModel(ScreenManager.theCoordinator.getCadDataTable(CADDataEnums.TABLE.ASSIGNED_INCIDENTS)); 
    482                  
    483                 for(int i = 0; i < assignedIncidentsTable.getColumnCount(); i++){ 
     587 
     588                for (int i = 0; i < assignedIncidentsTable.getColumnCount(); i++) 
     589                { 
    484590                    assignedIncidentsTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidths[i]); 
    485591                } 
    486592                assignedIncidentsTable.getRowSorter().setSortKeys(keys); 
    487593                assignedIncidentsTable.getSelectionModel().setSelectionInterval(index, index); 
    488                 } catch (RemoteException e) { 
    489                     e.printStackTrace(); 
    490                 } 
    491                 revalidate(); 
    492                 repaint(); 
    493           } 
     594            } catch (RemoteException e) 
     595            { 
     596                e.printStackTrace(); 
     597            } 
     598            revalidate(); 
     599            repaint(); 
     600        } 
    494601    } 
    495602 
     
    497604     * Makes screen visible. 
    498605     */ 
    499     public void open() { 
     606    public void open() 
     607    { 
    500608        setVisible(true); 
    501609    } 
     
    504612     * Hides screen. 
    505613     */ 
    506     public void close() { 
     614    public void close() 
     615    { 
    507616        setVisible(false); 
    508617    } 
    509  
    510618} 
  • trunk/src/tmcsim/client/cadclientgui/screens/CADMenu.java

    r40 r59  
    1313import java.awt.event.MouseListener; 
    1414import java.awt.event.MouseMotionListener; 
    15 import java.io.File; 
    1615import java.io.IOException; 
    1716import java.net.MalformedURLException; 
     
    2322import java.util.logging.Logger; 
    2423import javax.imageio.ImageIO; 
    25  
    2624import javax.swing.Box; 
    2725import javax.swing.BoxLayout; 
     
    3028import javax.swing.JFrame; 
    3129import javax.swing.JLabel; 
    32 import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE; 
    3330 
    3431/** 
     
    3936 * "CADMenuLayout" can also be found in the same folder showing how this class's 
    4037 * looks were made. 
    41  *  
     38 * 
    4239 * @author Vincent 
    43  *  
     40 * 
    4441 */ 
    45 public class CADMenu extends JFrame { 
    46  
     42public class CADMenu extends JFrame 
     43{ 
    4744    private final int ONE_SECOND = 1000; 
    48  
    4945    private DateFormat dateFormat; 
    50  
    5146    private Box mainPanel; 
    5247    private Box bottomRightIcons; 
     
    5651    private JLabel name; 
    5752    private JLabel userListName1; 
    58  
    5953    private JButton button1; 
    6054    private JButton button2; 
     
    6559    private JButton buttonTool; 
    6660    private JButton buttonMore; 
    67      
    6861    // the drop down menu when the "more button" is clicked. 
    6962    private JFrame moreMenu; 
    70  
    7163    // the drop down menu when the "tool button" is clicked. 
    7264    private JFrame toolMenu; 
    73  
    7465    private JButton buttonCheckmark; 
    7566    private JButton buttonMinus; 
    76  
    7767    private JLabel position; 
    7868 
     
    8070     * Constructor call. Creates the CADMenu. 
    8171     */ 
    82     public CADMenu() { 
     72    public CADMenu() 
     73    { 
    8374        initialize(); 
    8475        createTopPanel(); 
    8576        createBottomPanel(); 
    8677        createDropDownMenus(); 
    87          
     78 
    8879        initControllers(); 
    89          
     80 
    9081        getContentPane().add(mainPanel); 
    91  
    92         setTitle("Inform CAD"); 
    93         URL url = null; 
    94         try 
    95         { 
    96             url = new URL("http://i1030.photobucket.com/albums/y362/sendeva66/antclipart2.jpg"); 
    97         } catch (MalformedURLException ex) 
    98         { 
    99             Logger.getLogger(CADMenu.class.getName()).log(Level.SEVERE, "can't access url", ex); 
     82        setTitle("Inform CAD "); 
     83        // Load an image for the task bar icon --JD 
     84        // First try to get the image from a local file 
     85        ImageIcon coolIcon = new ImageIcon("images/CADMenuImages/US_101_icon.png"); 
     86        if (coolIcon.getIconWidth() >= 0) 
     87        { 
     88            setIconImage(coolIcon.getImage()); 
    10089        } 
    101         Image image = null; 
    102         try 
    103         { 
    104             image = ImageIO.read(url); 
    105             setIconImage(image); 
    106         } catch (IOException ex) 
    107         { 
    108             Logger.getLogger(CADMenu.class.getName()).log(Level.SEVERE, null, ex); 
     90        else // if no local file found, try a URL 
     91        { 
     92            URL url; 
     93            Image img = null; 
     94            try 
     95            { 
     96                String iconURL = "http://www.chicagonow.com/running-with-a-book-cart/files/2012/02/crosswalk1.jpg"; 
     97                url = new URL(iconURL); 
     98                img = ImageIO.read(url); 
     99                setIconImage(img); 
     100            } catch (MalformedURLException ex) 
     101            { 
     102                Logger.getLogger(CADMenu.class.getName()).log(Level.SEVERE, null, ex); 
     103            } catch (IOException ex) 
     104            { 
     105                Logger.getLogger(CADMenu.class.getName()).log(Level.SEVERE, null, ex); 
     106            } 
    109107        } 
    110         // Doesn't work: file path problem? 
    111 //        ImageIcon myIcon = new ImageIcon(getClass().getClassLoader().getResource("images/CADicon.png")); 
    112 //        setIconImage(myIcon.getImage()); 
    113108        setPreferredSize(new Dimension(1195, 178)); 
    114109        setResizable(true); 
     
    125120     * Initializes variables and connects the CADMenu to the CADMenuListener. 
    126121     */ 
    127     public void initialize() { 
     122    public void initialize() 
     123    { 
    128124        mainPanel = new Box(BoxLayout.Y_AXIS); 
    129125        mainPanel.setAlignmentX(LEFT_ALIGNMENT); 
     
    131127    } 
    132128 
    133     public void addListeners() { 
    134         addComponentListener(new ComponentListener() { 
    135             public void componentHidden(ComponentEvent e) { 
    136             } 
    137  
    138             public void componentMoved(ComponentEvent e) { 
     129    public void addListeners() 
     130    { 
     131        addComponentListener(new ComponentListener() 
     132        { 
     133            public void componentHidden(ComponentEvent e) 
     134            { 
     135            } 
     136 
     137            public void componentMoved(ComponentEvent e) 
     138            { 
    139139                closeToolMenu(); 
    140140                closeMoreMenu(); 
     
    142142            } 
    143143 
    144             public void componentResized(ComponentEvent e) { 
    145             } 
    146  
    147             public void componentShown(ComponentEvent e) { 
     144            public void componentResized(ComponentEvent e) 
     145            { 
     146            } 
     147 
     148            public void componentShown(ComponentEvent e) 
     149            { 
    148150            } 
    149151        }); 
    150         addMouseListener(new MouseListener() { 
    151             public void mouseClicked(MouseEvent arg0) { 
     152        addMouseListener(new MouseListener() 
     153        { 
     154            public void mouseClicked(MouseEvent arg0) 
     155            { 
    152156                closeToolMenu(); 
    153157                closeMoreMenu(); 
    154158            } 
    155159 
    156             public void mouseEntered(MouseEvent arg0) { 
    157             } 
    158  
    159             public void mouseExited(MouseEvent arg0) { 
    160             } 
    161  
    162             public void mousePressed(MouseEvent arg0) { 
    163             } 
    164  
    165             public void mouseReleased(MouseEvent arg0) { 
     160            public void mouseEntered(MouseEvent arg0) 
     161            { 
     162            } 
     163 
     164            public void mouseExited(MouseEvent arg0) 
     165            { 
     166            } 
     167 
     168            public void mousePressed(MouseEvent arg0) 
     169            { 
     170            } 
     171 
     172            public void mouseReleased(MouseEvent arg0) 
     173            { 
    166174            } 
    167175        }); 
    168176    } 
    169      
    170     public void initToolMenuListeners(){ 
    171         toolMenu.addMouseMotionListener(new MouseMotionListener() { 
    172             public void mouseDragged(MouseEvent e) { 
    173             } 
    174  
    175             public void mouseMoved(MouseEvent e) { 
     177 
     178    public void initToolMenuListeners() 
     179    { 
     180        toolMenu.addMouseMotionListener(new MouseMotionListener() 
     181        { 
     182            public void mouseDragged(MouseEvent e) 
     183            { 
     184            } 
     185 
     186            public void mouseMoved(MouseEvent e) 
     187            { 
    176188            } 
    177189        }); 
    178190 
    179         toolMenu.addMouseListener(new MouseListener() { 
    180             public void mouseEntered(MouseEvent e) { 
    181             } 
    182  
    183             public void mouseExited(MouseEvent e) { 
    184             } 
    185  
    186             public void mousePressed(MouseEvent e) { 
    187             } 
    188  
    189             public void mouseReleased(MouseEvent e) { 
    190             } 
    191  
    192             public void mouseClicked(MouseEvent e) { 
     191        toolMenu.addMouseListener(new MouseListener() 
     192        { 
     193            public void mouseEntered(MouseEvent e) 
     194            { 
     195            } 
     196 
     197            public void mouseExited(MouseEvent e) 
     198            { 
     199            } 
     200 
     201            public void mousePressed(MouseEvent e) 
     202            { 
     203            } 
     204 
     205            public void mouseReleased(MouseEvent e) 
     206            { 
     207            } 
     208 
     209            public void mouseClicked(MouseEvent e) 
     210            { 
    193211            } 
    194212        }); 
    195213    } 
    196      
    197     public void initMoreMenuListeners(){ 
    198         moreMenu.addMouseMotionListener(new MouseMotionListener() { 
    199             public void mouseDragged(MouseEvent e) { 
    200             } 
    201  
    202             public void mouseMoved(MouseEvent e) { 
     214 
     215    public void initMoreMenuListeners() 
     216    { 
     217        moreMenu.addMouseMotionListener(new MouseMotionListener() 
     218        { 
     219            public void mouseDragged(MouseEvent e) 
     220            { 
     221            } 
     222 
     223            public void mouseMoved(MouseEvent e) 
     224            { 
    203225                ImageIcon image = new ImageIcon( 
    204226                        "images/MoreMenuImages/moreMenu.png"); 
     
    206228                if (e.getLocationOnScreen().getY() >= moreMenu.getY() 
    207229                        && e.getLocationOnScreen().getY() <= moreMenu.getY() 
    208                                 + moreMenu.getHeight() / 8) { 
     230                        + moreMenu.getHeight() / 8) 
     231                { 
    209232                    image = new ImageIcon( 
    210233                            "images/MoreMenuImages/moreMenuHighlighted1.png"); 
    211                 } else if (e.getLocationOnScreen().getY() >= moreMenu.getY() 
     234                } 
     235                else if (e.getLocationOnScreen().getY() >= moreMenu.getY() 
    212236                        + moreMenu.getHeight() * 2 / 8 
    213237                        && e.getLocationOnScreen().getY() <= moreMenu.getY() 
    214                                 + moreMenu.getHeight() * 3 / 8) { 
     238                        + moreMenu.getHeight() * 3 / 8) 
     239                { 
    215240                    image = new ImageIcon( 
    216241                            "images/MoreMenuImages/moreMenuHighlighted3.png"); 
     
    223248        }); 
    224249 
    225         moreMenu.addMouseListener(new MouseListener() { 
    226             public void mouseEntered(MouseEvent e) { 
    227             } 
    228  
    229             public void mouseExited(MouseEvent e) { 
    230             } 
    231  
    232             public void mousePressed(MouseEvent e) { 
    233             } 
    234  
    235             public void mouseReleased(MouseEvent e) { 
    236             } 
    237  
    238             public void mouseClicked(MouseEvent e) { 
     250        moreMenu.addMouseListener(new MouseListener() 
     251        { 
     252            public void mouseEntered(MouseEvent e) 
     253            { 
     254            } 
     255 
     256            public void mouseExited(MouseEvent e) 
     257            { 
     258            } 
     259 
     260            public void mousePressed(MouseEvent e) 
     261            { 
     262            } 
     263 
     264            public void mouseReleased(MouseEvent e) 
     265            { 
     266            } 
     267 
     268            public void mouseClicked(MouseEvent e) 
     269            { 
    239270                if (e.getLocationOnScreen().getY() >= moreMenu.getY() 
    240271                        && e.getLocationOnScreen().getY() <= moreMenu.getY() 
    241                                 + moreMenu.getHeight() / 8) { 
     272                        + moreMenu.getHeight() / 8) 
     273                { 
    242274                    ScreenManager.openIncidentEditor(); 
    243275                    closeMoreMenu(); 
    244                 } else if (e.getLocationOnScreen().getY() >= moreMenu.getY() 
     276                } 
     277                else if (e.getLocationOnScreen().getY() >= moreMenu.getY() 
    245278                        + moreMenu.getHeight() * 2 / 8 
    246279                        && e.getLocationOnScreen().getY() <= moreMenu.getY() 
    247                                 + moreMenu.getHeight() * 3 / 8) { 
     280                        + moreMenu.getHeight() * 3 / 8) 
     281                { 
    248282                    ScreenManager.openCardfile(); 
    249283                    closeMoreMenu(); 
     
    252286        }); 
    253287    } 
    254      
    255     public void initControllers(){ 
     288 
     289    public void initControllers() 
     290    { 
    256291        addListeners(); 
    257292 
    258293        buttonTool.addActionListener(newToolActionListener()); 
    259294        buttonMore.addActionListener(newMoreActionListener()); 
    260          
     295 
    261296        initToolMenuListeners(); 
    262         initMoreMenuListeners();     
    263     } 
    264  
    265     public ActionListener newToolActionListener(){ 
    266         return new ActionListener() { 
    267             public void actionPerformed(ActionEvent arg0) { 
    268                 if (moreMenu.isVisible()) { 
     297        initMoreMenuListeners(); 
     298    } 
     299 
     300    public ActionListener newToolActionListener() 
     301    { 
     302        return new ActionListener() 
     303        { 
     304            public void actionPerformed(ActionEvent arg0) 
     305            { 
     306                if (moreMenu.isVisible()) 
     307                { 
    269308                    closeMoreMenu(); 
    270309                } 
    271                 if (toolMenu.isVisible()) { 
     310                if (toolMenu.isVisible()) 
     311                { 
    272312                    closeToolMenu(); 
    273                 } else { 
     313                } 
     314                else 
     315                { 
    274316                    toolMenu.setLocation(new Point(getX() + getWidth() 
    275317                            - toolMenu.getWidth(), getY() + 85)); 
     
    279321        }; 
    280322    } 
    281      
    282     public ActionListener newMoreActionListener(){ 
    283         return new ActionListener() { 
    284             public void actionPerformed(ActionEvent arg0) { 
    285                 if (toolMenu.isVisible()) { 
     323 
     324    public ActionListener newMoreActionListener() 
     325    { 
     326        return new ActionListener() 
     327        { 
     328            public void actionPerformed(ActionEvent arg0) 
     329            { 
     330                if (toolMenu.isVisible()) 
     331                { 
    286332                    closeToolMenu(); 
    287333                } 
    288                 if (moreMenu.isVisible()) { 
     334                if (moreMenu.isVisible()) 
     335                { 
    289336                    closeMoreMenu(); 
    290                 } else { 
     337                } 
     338                else 
     339                { 
    291340                    moreMenu.setLocation(new Point(getX() + getWidth() 
    292341                            - moreMenu.getWidth(), getY() + 85)); 
     
    296345        }; 
    297346    } 
    298      
     347 
    299348    /* 
    300349     * Creates the topPanel for the CADMenu. 
    301350     */ 
    302     public void createTopPanel() { 
     351    public void createTopPanel() 
     352    { 
    303353 
    304354        Box topPanel = new Box(BoxLayout.X_AXIS); 
     
    390440     * Creates the bottomPanel of the CADMenu. 
    391441     */ 
    392     public void createBottomPanel() { 
     442    public void createBottomPanel() 
     443    { 
    393444        Color grayBackground = new Color(100, 100, 100); 
    394445 
     
    477528     * Creates the two bottom right buttons. 
    478529     */ 
    479     public void createBottomRightButtons() { 
     530    public void createBottomRightButtons() 
     531    { 
    480532        bottomRightButtonsGrayed = new Box(BoxLayout.X_AXIS); 
    481533        ImageIcon image = new ImageIcon( 
     
    502554     * buttons 
    503555     */ 
    504     public void createDropDownMenus() { 
     556    public void createDropDownMenus() 
     557    { 
    505558 
    506559        ImageIcon image = new ImageIcon("images/ToolMenuImages/toolMenu.png"); 
     
    524577     * Takes in the name of the user and displays it. 
    525578     */ 
    526     public void setName(String username) { 
     579    public void setName(String username) 
     580    { 
    527581        name.setText(username); 
    528582        userListName1.setText(username); 
    529583    } 
    530  
     584    /** 
     585     * Accessor to the user's name (for use in IncidentViewer comments 
     586     */ 
     587    public String getName() 
     588    { 
     589        return name.getText(); 
     590    } 
     591     
    531592    /** 
    532593     * Factory method. Makes a JButton with an image and listener. 
    533      *  
    534      * @param image 
    535      *            the image this button will display. 
    536      * @param listener 
    537      *            the action listener for this button. 
     594     * 
     595     * @param image the image this button will display. 
     596     * @param listener the action listener for this button. 
    538597     * @return the JButton. 
    539598     */ 
    540     public JButton makeButton(ImageIcon image) { 
     599    public JButton makeButton(ImageIcon image) 
     600    { 
    541601        JButton button = new JButton(image); 
    542602        Dimension size = new Dimension(image.getImage().getWidth(null), image 
     
    555615     * highlighted rows). 
    556616     */ 
    557     public void closeToolMenu() { 
     617    public void closeToolMenu() 
     618    { 
    558619        ImageIcon image; 
    559620        JLabel menu; 
     
    570631     * highlighted rows). 
    571632     */ 
    572     public void closeMoreMenu() { 
     633    public void closeMoreMenu() 
     634    { 
    573635        ImageIcon image; 
    574636        JLabel menu; 
     
    585647     * time every second. 
    586648     */ 
    587     public void handleUpdateTime() { 
     649    public void handleUpdateTime() 
     650    { 
    588651        Date date = new Date(); 
    589652        String dateTime = dateFormat.format(date); 
     
    594657     * Makes screen visible. 
    595658     */ 
    596     public void open() { 
     659    public void open() 
     660    { 
    597661        setVisible(true); 
    598662    } 
     
    601665     * Hides screen. 
    602666     */ 
    603     public void close() { 
     667    public void close() 
     668    { 
    604669        setVisible(false); 
    605670    } 
     
    608673     * Currently not used. 
    609674     */ 
    610     public void setIncomingIncident() { 
     675    public void setIncomingIncident() 
     676    { 
    611677        bottomRightIcons.remove(bottomRightButtonsGrayed); 
    612678        bottomRightIcons.add(bottomRightButtonsColored); 
     
    618684     * Currently not used. 
    619685     */ 
    620     public void endIncomingIncident() { 
     686    public void endIncomingIncident() 
     687    { 
    621688        bottomRightIcons.remove(bottomRightButtonsColored); 
    622689        bottomRightIcons.add(bottomRightButtonsGrayed); 
     
    628695     * Sets position title to trainee. 
    629696     */ 
    630     public void removeDispatcherStatus() { 
     697    public void removeDispatcherStatus() 
     698    { 
    631699        position.setText("Trainee"); 
    632700    } 
    633  
    634701} 
  • trunk/src/tmcsim/client/cadclientgui/screens/IncidentEditor.java

    r3 r59  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
    51package tmcsim.client.cadclientgui.screens; 
    62 
     
    1713import java.util.Calendar; 
    1814import java.util.Date; 
    19  
    2015import javax.swing.BorderFactory; 
    2116import javax.swing.DefaultListModel; 
     
    3025import javax.swing.table.DefaultTableModel; 
    3126import javax.swing.table.TableCellRenderer; 
    32  
     27import tmcsim.client.cadclientgui.enums.CADDataEnums.TABLE; 
    3328import tmcsim.client.cadclientgui.enums.TableHeaders; 
    34 import tmcsim.client.cadclientgui.enums.CADDataEnums.TABLE; 
    3529 
    3630/** 
    37  * This class contains the view and controller for the IncidentEditor screen. The view is built using a GUI builder plug-in, and the controller  
    38  * uses listeners to control how the view and data act. 
     31 * This class contains the view and controller for the IncidentEditor screen. 
     32 * The view is built using a GUI builder plug-in, and the controller uses 
     33 * listeners to control how the view and data act. 
     34 * 
    3935 * @author Stuart 
    4036 */ 
    41 public class IncidentEditor extends javax.swing.JFrame { 
    42  
    43     private final String[] monthNames = { "January", "February", 
    44             "March", "April", "May", "June", "July", "August", "September", 
    45             "October", "November", "December"}; 
    46      
    47     private final String[] dayNames = { "Sun", "Mon", "Tue", "Wed", 
    48             "Thu", "Fri", "Sat"}; 
    49  
     37public class IncidentEditor extends javax.swing.JFrame 
     38{ 
     39    private final String[] monthNames = 
     40    { 
     41        "January", "February", 
     42        "March", "April", "May", "June", "July", "August", "September", 
     43        "October", "November", "December" 
     44    }; 
     45    private final String[] dayNames = 
     46    { 
     47        "Sun", "Mon", "Tue", "Wed", 
     48        "Thu", "Fri", "Sat" 
     49    }; 
    5050    private DefaultTableModel blankTable; 
    51      
    5251    private JTable calendarTable; 
    5352    private int todayRow; 
     
    5756     * Creates new form IncidentEditor 
    5857     */ 
    59     public IncidentEditor() { 
     58    public IncidentEditor() 
     59    { 
    6060        declareComponents(); 
    6161        initControllers(); 
     
    7171    // <editor-fold defaultstate="collapsed" 
    7272    // desc="Generated Code">//GEN-BEGIN:initComponents 
    73     private void declareComponents() { 
     73    private void declareComponents() 
     74    { 
    7475 
    7576        incidentLogScroll = new javax.swing.JScrollPane(); 
     
    9394        toCalendar = new javax.swing.JPanel(); 
    9495    } 
    95      
    96     public MouseListener newMouseListener(){ 
    97         return new MouseListener() { 
    98             public void mouseClicked(MouseEvent e) { 
     96 
     97    public MouseListener newMouseListener() 
     98    { 
     99        return new MouseListener() 
     100        { 
     101            public void mouseClicked(MouseEvent e) 
     102            { 
    99103                viewButton.setEnabled(true); 
    100104            } 
    101105 
    102             public void mouseEntered(MouseEvent e) { 
    103             } 
    104  
    105             public void mouseExited(MouseEvent e) { 
    106             } 
    107  
    108             public void mousePressed(MouseEvent e) { 
    109             } 
    110  
    111             public void mouseReleased(MouseEvent e) { 
    112             } 
    113         }; 
    114     } 
    115      
    116     public ActionListener newSearchActionListener(){ 
    117         return new ActionListener() { 
    118             public void actionPerformed(ActionEvent e) { 
     106            public void mouseEntered(MouseEvent e) 
     107            { 
     108            } 
     109 
     110            public void mouseExited(MouseEvent e) 
     111            { 
     112            } 
     113 
     114            public void mousePressed(MouseEvent e) 
     115            { 
     116            } 
     117 
     118            public void mouseReleased(MouseEvent e) 
     119            { 
     120            } 
     121        }; 
     122    } 
     123 
     124    public ActionListener newSearchActionListener() 
     125    { 
     126        return new ActionListener() 
     127        { 
     128            public void actionPerformed(ActionEvent e) 
     129            { 
    119130                ScreenManager.openSearch(); 
    120131            } 
    121  
    122         }; 
    123     } 
    124      
    125     public ActionListener newViewActionListener(){ 
    126         return new ActionListener() { 
    127             public void actionPerformed(ActionEvent e) { 
     132        }; 
     133    } 
     134 
     135    public ActionListener newViewActionListener() 
     136    { 
     137        return new ActionListener() 
     138        { 
     139            public void actionPerformed(ActionEvent e) 
     140            { 
    128141                String masterInc = (String) incidentLogTable.getValueAt( 
    129142                        incidentLogTable.getSelectedRow(), 5); 
    130143                int incidentId = 0; 
    131                 try { 
     144                try 
     145                { 
    132146                    incidentId = ScreenManager.theCoordinator 
    133147                            .getIncidentId(masterInc); 
    134                 } catch (RemoteException e1) { 
     148                } catch (RemoteException e1) 
     149                { 
    135150                    e1.printStackTrace(); 
    136151                } 
     
    139154        }; 
    140155    } 
    141      
    142     public ActionListener newRefreshActionListener(){ 
    143         return new ActionListener() { 
    144             public void actionPerformed(ActionEvent e) { 
     156 
     157    public ActionListener newRefreshActionListener() 
     158    { 
     159        return new ActionListener() 
     160        { 
     161            public void actionPerformed(ActionEvent e) 
     162            { 
    145163                refreshInformation(); 
    146164            } 
    147165        }; 
    148166    } 
    149      
    150     public ActionListener newExitActionListener(){ 
    151         return new ActionListener() { 
    152             public void actionPerformed(ActionEvent arg0) { 
     167 
     168    public ActionListener newExitActionListener() 
     169    { 
     170        return new ActionListener() 
     171        { 
     172            public void actionPerformed(ActionEvent arg0) 
     173            { 
    153174                close(); 
    154175            } 
    155176        }; 
    156177    } 
    157      
    158     private void initControllers() { 
    159          
     178 
     179    private void initControllers() 
     180    { 
     181 
    160182        incidentLogTable.addMouseListener(newMouseListener()); 
    161          
     183 
    162184        searchButton.addActionListener(newSearchActionListener()); 
    163185        viewButton.addActionListener(newViewActionListener()); 
     
    165187        exitButton.addActionListener(newExitActionListener()); 
    166188    } 
    167          
    168     private void initLayout() { 
     189 
     190    private void initLayout() 
     191    { 
    169192        blankTable = new DefaultTableModel(); 
    170193        blankTable.setColumnIdentifiers(TableHeaders.INCIDENT_EDITOR_HEADERS); 
     
    195218 
    196219        currentDatabaseCombo.setModel(new javax.swing.DefaultComboBoxModel( 
    197                 new String[] { "System" })); 
     220                new String[] 
     221        { 
     222            "System" 
     223        })); 
    198224        currentDatabaseCombo.setEnabled(false); 
    199225 
     
    202228        fromCalendar = createCalendar(); 
    203229        toCalendar = createCalendar(); 
    204          
     230 
    205231        reopenButton.setText("ReOpen"); 
    206232        reopenButton.setEnabled(false); 
     
    211237 
    212238        searchButton.setText("Search"); 
    213          
     239 
    214240        printButton.setText("Print"); 
    215241        printButton.setEnabled(false); 
     
    217243        viewButton.setText("View"); 
    218244        viewButton.setEnabled(false); 
    219          
     245 
    220246        refreshButton.setText("Refresh"); 
    221247        exitButton.setText("Exit"); 
    222          
     248 
    223249        fromLabel.setText("From..."); 
    224250 
    225251        toLabel.setText("To..."); 
    226          
     252 
    227253        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 
    228254        getContentPane().setLayout(layout); 
    229255        layout.setHorizontalGroup( 
    230             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    231             .addComponent(incidentLogScroll) 
    232             .addGroup(layout.createSequentialGroup() 
     256                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     257                .addComponent(incidentLogScroll) 
     258                .addGroup(layout.createSequentialGroup() 
    233259                .addContainerGap() 
    234260                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    235                     .addComponent(agencyTypeLabel) 
    236                     .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) 
    237                     .addGroup(layout.createSequentialGroup() 
    238                         .addGap(10, 10, 10) 
    239                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    240                             .addComponent(currentDatabaseLabel) 
    241                             .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    242                     .addComponent(searchLimitLabel)) 
     261                .addComponent(agencyTypeLabel) 
     262                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) 
     263                .addGroup(layout.createSequentialGroup() 
     264                .addGap(10, 10, 10) 
     265                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     266                .addComponent(currentDatabaseLabel) 
     267                .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     268                .addComponent(searchLimitLabel)) 
    243269                .addGap(32, 32, 32) 
    244270                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    245                     .addComponent(fromLabel) 
    246                     .addComponent(fromCalendar, 200, 200, 200)) 
     271                .addComponent(fromLabel) 
     272                .addComponent(fromCalendar, 200, 200, 200)) 
    247273                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE) 
    248274                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    249                     .addComponent(toLabel) 
    250                     .addComponent(toCalendar, 200, 200, 200)) 
     275                .addComponent(toLabel) 
     276                .addComponent(toCalendar, 200, 200, 200)) 
    251277                .addGap(25, 25, 25) 
    252278                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    253                     .addComponent(reopenButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    254                     .addComponent(duplicateCellButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    255                     .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    256                     .addComponent(printButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    257                     .addComponent(viewButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    258                     .addComponent(refreshButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    259                     .addComponent(exitButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 
    260         ); 
     279                .addComponent(reopenButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     280                .addComponent(duplicateCellButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     281                .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     282                .addComponent(printButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     283                .addComponent(viewButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     284                .addComponent(refreshButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     285                .addComponent(exitButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); 
    261286        layout.setVerticalGroup( 
    262             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    263             .addGroup(layout.createSequentialGroup() 
     287                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     288                .addGroup(layout.createSequentialGroup() 
    264289                .addComponent(incidentLogScroll, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) 
    265290                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    266291                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    267                     .addComponent(agencyTypeLabel) 
    268                     .addComponent(reopenButton) 
    269                     .addComponent(fromLabel) 
    270                     .addComponent(toLabel)) 
     292                .addComponent(agencyTypeLabel) 
     293                .addComponent(reopenButton) 
     294                .addComponent(fromLabel) 
     295                .addComponent(toLabel)) 
    271296                .addGap(2, 2, 2) 
    272297                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    273                     .addGroup(layout.createSequentialGroup() 
    274                         .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) 
    275                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    276                         .addComponent(currentDatabaseLabel) 
    277                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    278                         .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    279                         .addGap(18, 18, 18) 
    280                         .addComponent(searchLimitLabel)) 
    281                     .addGroup(layout.createSequentialGroup() 
    282                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    283                             .addComponent(fromCalendar, 150, 150, 150) 
    284                             .addComponent(toCalendar, 150, 150, 150))) 
    285                     .addGroup(layout.createSequentialGroup() 
    286                         .addComponent(duplicateCellButton) 
    287                         .addGap(2, 2, 2) 
    288                         .addComponent(searchButton) 
    289                         .addGap(2, 2, 2) 
    290                         .addComponent(printButton) 
    291                         .addGap(2, 2, 2) 
    292                         .addComponent(viewButton) 
    293                         .addGap(2, 2, 2) 
    294                         .addComponent(refreshButton) 
    295                         .addGap(2, 2, 2) 
    296                         .addComponent(exitButton))) 
    297                 .addGap(0, 41, Short.MAX_VALUE)) 
    298         ); 
     298                .addGroup(layout.createSequentialGroup() 
     299                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) 
     300                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     301                .addComponent(currentDatabaseLabel) 
     302                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     303                .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     304                .addGap(18, 18, 18) 
     305                .addComponent(searchLimitLabel)) 
     306                .addGroup(layout.createSequentialGroup() 
     307                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     308                .addComponent(fromCalendar, 150, 150, 150) 
     309                .addComponent(toCalendar, 150, 150, 150))) 
     310                .addGroup(layout.createSequentialGroup() 
     311                .addComponent(duplicateCellButton) 
     312                .addGap(2, 2, 2) 
     313                .addComponent(searchButton) 
     314                .addGap(2, 2, 2) 
     315                .addComponent(printButton) 
     316                .addGap(2, 2, 2) 
     317                .addComponent(viewButton) 
     318                .addGap(2, 2, 2) 
     319                .addComponent(refreshButton) 
     320                .addGap(2, 2, 2) 
     321                .addComponent(exitButton))) 
     322                .addGap(0, 41, Short.MAX_VALUE))); 
    299323 
    300324        pack(); 
    301325    }// </editor-fold>//GEN-END:initComponents 
    302326 
    303     public JPanel createCalendar(){ 
    304          
     327    public JPanel createCalendar() 
     328    { 
     329 
    305330        JPanel calendarPanel = new JPanel(); 
    306331        Calendar now = Calendar.getInstance(); 
    307332        calendarPanel.setBorder(new LineBorder(new Color(0, 0, 0))); 
    308333        calendarPanel.setLayout(null); 
    309          
     334 
    310335        JLabel monthLabel = new JLabel("New label"); 
    311336        monthLabel.setBounds(0, 0, 140, 20); 
     
    314339        monthLabel.setText(monthNames[now.get(Calendar.MONTH)]); 
    315340        calendarPanel.add(monthLabel); 
    316          
     341 
    317342        JLabel yearLabel = new JLabel("New label"); 
    318343        yearLabel.setHorizontalAlignment(SwingConstants.CENTER); 
     
    321346        yearLabel.setText(Integer.toString(now.get(Calendar.YEAR))); 
    322347        calendarPanel.add(yearLabel); 
    323          
     348 
    324349        Date date = new Date(); 
    325350        DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); 
    326351        String dateString = dateFormat.format(date); 
    327          
     352 
    328353        JLabel dateLabel1 = new JLabel("New label"); 
    329354        dateLabel1.setBounds(0, 130, 60, 20); 
     
    332357        dateLabel1.setHorizontalAlignment(JLabel.CENTER); 
    333358        calendarPanel.add(dateLabel1); 
    334          
     359 
    335360        JLabel dateLabel2 = new JLabel("New label"); 
    336361        dateLabel2.setBounds(140, 130, 60, 20); 
     
    339364        dateLabel2.setHorizontalAlignment(JLabel.CENTER); 
    340365        calendarPanel.add(dateLabel2); 
    341          
     366 
    342367        JScrollBar scrollBar = new JScrollBar(); 
    343368        scrollBar.setOrientation(JScrollBar.HORIZONTAL); 
     
    346371        scrollBar.setEnabled(false); 
    347372        calendarPanel.add(scrollBar); 
    348          
    349         calendarTable = new JTable(){ 
     373 
     374        calendarTable = new JTable() 
     375        { 
    350376            /* 
    351377             * Custom renderer to set different background/foreground colors 
    352378             * @see javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, int, int) 
    353379             */ 
    354             public Component prepareRenderer(TableCellRenderer renderer, int row, int column){ 
     380            public Component prepareRenderer(TableCellRenderer renderer, int row, int column) 
     381            { 
    355382                Component comp = super.prepareRenderer(renderer, row, column); 
    356                 if(todayRow == row && todayCol == column){ 
     383                if (todayRow == row && todayCol == column) 
     384                { 
    357385                    comp.setBackground(Color.BLUE); 
    358386                    comp.setForeground(Color.WHITE); 
    359387                } 
    360                 else{ 
     388                else 
     389                { 
    361390                    comp.setBackground(new Color(235, 235, 235)); 
    362391                    comp.setForeground(Color.BLACK); 
     
    368397        DefaultTableCellRenderer centerRenderer = new DefaultTableCellRenderer(); 
    369398        centerRenderer.setHorizontalAlignment(JLabel.CENTER); 
    370         for(int i = 0; i < dayNames.length; i++){ 
     399        for (int i = 0; i < dayNames.length; i++) 
     400        { 
    371401            calendarTable.getColumnModel().getColumn(i).setCellRenderer(centerRenderer); 
    372402        } 
     
    374404        calendarTable.setBounds(0, 20, 200, 110); 
    375405        calendarPanel.add(calendarTable); 
    376          
     406 
    377407        return calendarPanel; 
    378408    } 
    379      
    380     protected DefaultTableModel createDaysModel() { 
    381  
    382         String[][] emptyModel = {{"", "", "", "", "", "", ""}, 
    383                                 {"", "", "", "", "", "", ""}, 
    384                                 {"", "", "", "", "", "", ""}, 
    385                                 {"", "", "", "", "", "", ""}, 
    386                                 {"", "", "", "", "", "", ""}, 
    387                                 {"", "", "", "", "", "", ""}, 
    388                                 {"", "", "", "", "", "", ""}, 
    389                                 {"", "", "", "", "", "", ""}}; 
    390          
    391         String[] emptyHeader = {"", "", "", "", "", "", ""}; 
     409 
     410    protected DefaultTableModel createDaysModel() 
     411    { 
     412 
     413        String[][] emptyModel = 
     414        { 
     415            { 
     416                "", "", "", "", "", "", "" 
     417            }, 
     418            { 
     419                "", "", "", "", "", "", "" 
     420            }, 
     421            { 
     422                "", "", "", "", "", "", "" 
     423            }, 
     424            { 
     425                "", "", "", "", "", "", "" 
     426            }, 
     427            { 
     428                "", "", "", "", "", "", "" 
     429            }, 
     430            { 
     431                "", "", "", "", "", "", "" 
     432            }, 
     433            { 
     434                "", "", "", "", "", "", "" 
     435            }, 
     436            { 
     437                "", "", "", "", "", "", "" 
     438            } 
     439        }; 
     440 
     441        String[] emptyHeader = 
     442        { 
     443            "", "", "", "", "", "", "" 
     444        }; 
    392445        DefaultTableModel calendarModel = new DefaultTableModel(emptyModel, emptyHeader); 
    393446        int row = 0; 
    394447        int col = 0; 
    395          
     448 
    396449        Calendar today = Calendar.getInstance(); 
    397450        int tMonth = today.get(Calendar.MONTH); 
     
    411464        maximum.add(Calendar.MONTH, +1); 
    412465 
    413         for (int i = 0; i < dayNames.length; i++) { 
     466        for (int i = 0; i < dayNames.length; i++) 
     467        { 
    414468            calendarModel.setValueAt(dayNames[i], row, col); 
    415469            col++; 
     
    418472        row = 1; 
    419473 
    420         while (iterator.getTimeInMillis() < maximum.getTimeInMillis()) { 
     474        while (iterator.getTimeInMillis() < maximum.getTimeInMillis()) 
     475        { 
    421476            int lMonth = iterator.get(Calendar.MONTH); 
    422477            int lYear = iterator.get(Calendar.YEAR); 
    423478 
    424             if ((lMonth == tMonth) && (lYear == tYear)) { 
     479            if ((lMonth == tMonth) && (lYear == tYear)) 
     480            { 
    425481                int lDay = iterator.get(Calendar.DAY_OF_MONTH); 
    426482                calendarModel.setValueAt(Integer.toString(lDay), row, col); 
    427                 if ((tMonth == lMonth) && (tYear == lYear) && (tDay == lDay)) { 
     483                if ((tMonth == lMonth) && (tYear == lYear) && (tDay == lDay)) 
     484                { 
    428485                    todayRow = row; 
    429486                    todayCol = col; 
    430487                } 
    431             }  
     488            } 
    432489            iterator.add(Calendar.DAY_OF_YEAR, +1); 
    433              
     490 
    434491            col++; 
    435             if(col >= calendarModel.getColumnCount()){ 
     492            if (col >= calendarModel.getColumnCount()) 
     493            { 
    436494                row++; 
    437495                col = 0; 
     
    439497        } 
    440498 
    441          
     499 
    442500        return calendarModel; 
    443501    } 
    444      
    445     public void refreshInformation() { 
    446         try { 
     502 
     503    public void refreshInformation() 
     504    { 
     505        try 
     506        { 
    447507            incidentLogTable.setModel(ScreenManager.theCoordinator 
    448508                    .getCadDataTable(TABLE.INCIDENT_EDITOR)); 
    449         } catch (RemoteException e) { 
     509        } catch (RemoteException e) 
     510        { 
    450511            e.printStackTrace(); 
    451512        } 
     
    455516     * Makes screen visible. 
    456517     */ 
    457     public void open() { 
     518    public void open() 
     519    { 
    458520        incidentLogTable.setModel(blankTable); 
    459521        viewButton.setEnabled(false); 
     
    464526     * Hides screen. 
    465527     */ 
    466     public void close() { 
     528    public void close() 
     529    { 
    467530        setVisible(false); 
    468531    } 
    469  
    470532    // Variables declaration - do not modify//GEN-BEGIN:variables 
    471533    private javax.swing.JLabel agencyTypeLabel; 
  • trunk/src/tmcsim/client/cadclientgui/screens/IncidentViewer.java

    r3 r59  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
    51package tmcsim.client.cadclientgui.screens; 
    62 
     
    1410import java.text.DateFormat; 
    1511import java.text.SimpleDateFormat; 
     12import java.util.Date; 
    1613import java.util.Stack; 
    17 import java.util.Date; 
    18  
     14import javax.swing.BorderFactory; 
    1915import javax.swing.ImageIcon; 
    2016import javax.swing.JButton; 
    21 import javax.swing.JComponent; 
    22 import javax.swing.JFrame; 
    2317import javax.swing.ListSelectionModel; 
    2418import javax.swing.event.DocumentEvent; 
    2519import javax.swing.event.DocumentListener; 
    2620import javax.swing.table.DefaultTableModel; 
    27  
    28 import tmcsim.client.cadclientgui.data.CADData; 
    29 import tmcsim.client.cadclientgui.enums.CADDataEnums.*; 
     21import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_ADD_INFO; 
     22import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_CALLBACK; 
     23import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_CALLER; 
     24import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_GEN_INFO; 
     25import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_INFO; 
     26import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_LOC; 
     27import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_TABLE; 
     28import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_TIMES; 
     29import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_VAL; 
    3030import tmcsim.client.cadclientgui.enums.ComboBoxConstants; 
     31import tmcsim.simulationmanager.model.LogEntryCellRenderer; 
    3132 
    3233/** 
    33  * This class contains the view and controller for the IncidentViewer screen. The view is built using a GUI builder plug-in, and the controller  
    34  * uses listeners to control how the view and data act. 
     34 * This class contains the view and controller for the IncidentViewer screen. 
     35 * The view is built using a GUI builder plug-in, and the controller uses 
     36 * listeners to control how the view and data act. 
     37 * 
    3538 * @author Stuart 
    3639 */ 
    37 public class IncidentViewer extends javax.swing.JFrame { 
    38  
     40public class IncidentViewer extends javax.swing.JFrame 
     41{ 
    3942    Stack<Integer> stack; 
    4043    SimpleDateFormat dateFormatDate; 
     
    4548     * Creates new form IncidentViewer 
    4649     */ 
    47     public IncidentViewer() { 
     50    public IncidentViewer(int incidentId) 
     51    { 
     52        this.incidentId = incidentId; 
    4853        declareComponents(); 
     54        initLayout(); 
    4955        initControllers(); 
    50         initLayout(); 
    5156    } 
    5257 
     
    5863    @SuppressWarnings("unchecked") 
    5964    // <editor-fold defaultstate="collapsed" desc="Generated Code"> 
    60     private void declareComponents() { 
     65    private void declareComponents() 
     66    { 
    6167 
    6268        stack = new Stack<Integer>(); 
     
    189195        commentsNotesNotifyButton = new javax.swing.JButton(); 
    190196        commentsNotesSaveButton = new javax.swing.JButton(); 
    191         commentsNotesField = new javax.swing.JTextField(); 
     197        commentsNotesField = new javax.swing.JTextArea(); // JD changed from TextField 
    192198        commentsNotesConfidentialCommentCheckBox = new javax.swing.JCheckBox(); 
    193199        editLogPane = new javax.swing.JPanel(); 
     
    272278        attachmentsSaveButton = new javax.swing.JButton(); 
    273279    } 
    274      
    275     public void initWindowListener(){ 
    276         addWindowListener(new WindowAdapter() { 
    277             public void windowClosing(WindowEvent e) { 
     280 
     281    public void initWindowListener() 
     282    { 
     283        addWindowListener(new WindowAdapter() 
     284        { 
     285            public void windowClosing(WindowEvent e) 
     286            { 
    278287                close(); 
    279288            } 
    280289        }); 
    281290    } 
    282      
    283     public ActionListener newExitSendActionListener(){ 
    284         return new ActionListener(){ 
    285             public void actionPerformed(ActionEvent arg0) { 
     291 
     292    public ActionListener newExitSendActionListener() 
     293    { 
     294        return new ActionListener() 
     295        { 
     296            public void actionPerformed(ActionEvent arg0) 
     297            { 
    286298                close(); 
    287299            } 
    288300        }; 
    289301    } 
    290      
    291     public DocumentListener newCommentsDocumentListener(){ 
    292         return new DocumentListener(){ 
    293             public void changedUpdate(DocumentEvent e) {} 
    294             public void insertUpdate(DocumentEvent e) { 
     302 
     303    public DocumentListener newCommentsDocumentListener() 
     304    { 
     305        return new DocumentListener() 
     306        { 
     307            public void changedUpdate(DocumentEvent e) 
     308            { 
     309            } 
     310 
     311            public void insertUpdate(DocumentEvent e) 
     312            { 
    295313                commentsNotesSaveButton.setEnabled(true); 
    296314            } 
    297             public void removeUpdate(DocumentEvent e) {} 
     315 
     316            public void removeUpdate(DocumentEvent e) 
     317            { 
     318            } 
    298319        }; 
    299320    } 
    300      
    301     public ActionListener newCommentsAddListener(){ 
    302         return new ActionListener(){ 
    303             public void actionPerformed(ActionEvent arg0) { 
     321 
     322    public ActionListener newCommentsAddListener() 
     323    { 
     324        return new ActionListener() 
     325        { 
     326            public void actionPerformed(ActionEvent arg0) 
     327            { 
    304328                commentsNotesField.setEditable(true); 
     329                commentsNotesField.setBackground(java.awt.Color.white); 
     330 
    305331                commentsNotesField.requestFocus(); 
    306332                commentsNotesAddButton.setEnabled(false); 
     
    309335        }; 
    310336    } 
    311      
    312     public ActionListener newCommentsCancelListener(){ 
    313         return new ActionListener(){ 
    314             public void actionPerformed(ActionEvent arg0) { 
     337 
     338    public ActionListener newCommentsCancelListener() 
     339    { 
     340        return new ActionListener() 
     341        { 
     342            public void actionPerformed(ActionEvent arg0) 
     343            { 
    315344                commentsNotesField.setText(""); 
    316345                commentsNotesField.setEditable(false); 
     346                commentsNotesField.setBackground(java.awt.Color.LIGHT_GRAY);//JD 
    317347                commentsNotesAddButton.setEnabled(true); 
    318348                commentsNotesCancelButton.setEnabled(false); 
     
    321351        }; 
    322352    } 
    323      
    324     public ActionListener newCommentsSaveListener(){ 
    325         return new ActionListener(){ 
    326             public void actionPerformed(ActionEvent arg0) { 
     353 
     354    public ActionListener newCommentsSaveListener() 
     355    { 
     356        return new ActionListener() 
     357        { 
     358            public void actionPerformed(ActionEvent arg0) 
     359            { 
    327360                DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); 
    328            DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss"); 
    329            String[] fields = {dateFormat.format(new Date()), 
    330                                       timeFormat.format(new Date()), 
    331                                       "","",commentsNotesField.getText()}; 
    332                 try { 
     361                DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss"); 
     362                String[] fields = 
     363                { 
     364                    dateFormat.format(new Date()), 
     365                    timeFormat.format(new Date()), 
     366                    ScreenManager.getUserName(), // Put username in "Initials" column 
     367                    "", // "Block" is left blank for now  
     368                    commentsNotesField.getText().toUpperCase() // JD 
     369                }; 
     370                try 
     371                { 
    333372                    ScreenManager.theCoordinator.addCadDataIncidentTable( 
    334                      INC_TABLE.COMMENTS_NOTES, incidentId, fields); 
    335                     ((DefaultTableModel)commentsNotesTable.getModel()).addRow(fields); 
    336                 } catch (RemoteException e) { 
     373                            INC_TABLE.COMMENTS_NOTES, incidentId, fields); 
     374                    ((DefaultTableModel) commentsNotesTable.getModel()).insertRow(0, fields);//JD 
     375                    //((DefaultTableModel) commentsNotesTable.getModel()).addRow(fields); 
     376                } catch (RemoteException e) 
     377                { 
    337378                    e.printStackTrace(); 
    338379                } 
    339                  
     380 
    340381                commentsNotesField.setText(""); 
    341382                commentsNotesField.setEditable(false); 
     383                commentsNotesField.setBackground(java.awt.Color.LIGHT_GRAY); 
    342384                commentsNotesAddButton.setEnabled(true); 
    343385                commentsNotesCancelButton.setEnabled(false); 
    344386                commentsNotesSaveButton.setEnabled(false); 
    345387            } 
    346       }; 
     388        }; 
    347389    } 
    348      
    349     private void initControllers() { 
     390 
     391    // JD Add a mouselistener to the comments table to display a single cell 
     392    //  contents in a popup 
     393//    public MouseListener newCommentsTableCellListener() 
     394//    { 
     395//        return new MouseListener() 
     396//        { 
     397//            public void mousePressed(MouseEvent event) 
     398//            { 
     399//            } 
     400// 
     401//            public void mouseReleased(MouseEvent event) 
     402//            { 
     403//            } 
     404// 
     405//            public void mouseEntered(MouseEvent event) 
     406//            { 
     407//            } 
     408// 
     409//            public void mouseExited(MouseEvent event) 
     410//            { 
     411//            } 
     412// 
     413//            public void mouseClicked(MouseEvent event) 
     414//            { 
     415//                Point point = event.getPoint(); 
     416//                int row, column; 
     417//                row = commentsNotesTable.rowAtPoint(point); 
     418//                column = commentsNotesTable.columnAtPoint(point); 
     419//                // See if the click was in column 4 (the comment column) 
     420//                if (column == 4) 
     421//                { 
     422//                    JOptionPane.showMessageDialog(null, getWrappedText((String) commentsNotesTable.getValueAt(row, column)), 
     423//                            "Comment/Note Text", JOptionPane.INFORMATION_MESSAGE); 
     424//                } 
     425// 
     426//            } 
     427//        }; 
     428//    } 
     429    private void initControllers() 
     430    { 
    350431        initWindowListener(); 
    351          
     432 
    352433        exitSendButton.addActionListener(newExitSendActionListener()); 
    353          
     434 
    354435        commentsNotesField.getDocument().addDocumentListener(newCommentsDocumentListener()); 
    355436        commentsNotesAddButton.addActionListener(newCommentsAddListener()); 
    356437        commentsNotesCancelButton.addActionListener(newCommentsCancelListener()); 
    357438        commentsNotesSaveButton.addActionListener(newCommentsSaveListener()); 
     439        //commentsNotesTable.addMouseListener(newCommentsTableCellListener()); //JD 
    358440    } 
    359      
    360     private void initLayout(){ 
     441 
     442    /** 
     443     * A custom renderer that sets a tool tip with the wrapped comment. JD 
     444     */ 
     445// Obsolete JD 
     446//    class LineWrapRenderer extends DefaultTableCellRenderer 
     447//    { 
     448//        public final static int kSegmentsize = 60; 
     449// 
     450//        protected void setValue(Object value) 
     451//        { 
     452//            String comment = (String) value; 
     453//            setText(comment); 
     454//            // Wrap long comments in a tooltip 
     455//            setToolTipText(getWrappedText(comment)); 
     456//        } 
     457//    } 
     458// 
     459//    private String getWrappedText(String stringToWrap) 
     460//    { 
     461//        int limit = stringToWrap.length() / LineWrapRenderer.kSegmentsize; 
     462//        StringBuilder toolTip = new StringBuilder("<html>"); 
     463//        for (int jumper = 0; jumper <= limit; jumper++) 
     464//        { 
     465//            toolTip.append(stringToWrap.substring(jumper * LineWrapRenderer.kSegmentsize, Math.min((jumper + 1) * LineWrapRenderer.kSegmentsize, stringToWrap.length()))); 
     466//            toolTip.append("<br>");  // Use html break to cause a line break 
     467//        } 
     468//        toolTip.append("</html>"); 
     469//        return toolTip.toString(); 
     470//    } 
     471    private void initLayout() 
     472    { 
    361473        setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE); 
    362          
     474 
    363475        cityComboBox.setModel(new javax.swing.DefaultComboBoxModel(ComboBoxConstants.LIST_OF_CA_CITIES)); 
    364          
     476 
    365477        mapLocLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N 
    366478        mapLocLabel.setText("Map Loc:"); 
     
    372484        addressField.setBackground(Color.CYAN); 
    373485        locationField.setBackground(Color.CYAN); 
    374          
     486 
    375487        locationLabel.setText("Location:"); 
    376488 
     
    379491        countyLabel.setText("County:"); 
    380492 
    381         countyComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
     493        countyComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     494        { 
     495            "Item 1", "Item 2", "Item 3", "Item 4" 
     496        })); 
    382497 
    383498        agencyLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N 
     
    387502        agencyComboBox.setBackground(Color.CYAN); 
    388503        agencyComboBox.setEnabled(false); 
    389          
     504 
    390505        typeCodeLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N 
    391506        typeCodeLabel.setText("Type Code:"); 
     
    393508        typeCodeComboBox.setModel(new javax.swing.DefaultComboBoxModel(ComboBoxConstants.TYPE)); 
    394509        typeCodeComboBox.setBackground(Color.CYAN); 
    395          
     510 
    396511        priLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N 
    397512        priLabel.setText("Pri:"); 
     
    399514        priComboBox.setModel(new javax.swing.DefaultComboBoxModel(ComboBoxConstants.PRI)); 
    400515        priComboBox.setBackground(Color.CYAN); 
    401          
     516 
    402517        rightOfPriButton.setText("rightOfPriButton"); 
    403518        rightOfPriButton.setEnabled(false); 
     
    406521 
    407522        rpField.setBackground(Color.CYAN); 
    408          
     523 
    409524        phoneLabel.setText("Phone:"); 
    410          
     525 
    411526        phoneField.setBackground(Color.CYAN); 
    412527 
     
    417532        rpTypeLabel.setText("RP Type:"); 
    418533 
    419         rpTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
    420  
    421         sectorComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
     534        rpTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     535        { 
     536            "Item 1", "Item 2", "Item 3", "Item 4" 
     537        })); 
     538 
     539        sectorComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     540        { 
     541            "Item 1", "Item 2", "Item 3", "Item 4" 
     542        })); 
    422543        sectorComboBox.setBackground(Color.CYAN); 
    423          
     544 
    424545        sectorLabel.setText("Sector:"); 
    425546 
     
    431552        mediaComboBox.setBackground(Color.YELLOW); 
    432553        mediaComboBox.setEnabled(false); 
    433          
     554 
    434555        mediaLabel.setText("MEDIA:"); 
    435556 
     
    451572        updateMapLocButton.setMargin(new java.awt.Insets(3, 3, 3, 3)); 
    452573        updateMapLocButton.setEnabled(false); 
    453          
     574 
    454575        exitSendButton.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N 
    455576        exitSendButton.setText("Exit / Send"); 
    456          
     577 
    457578        sentToQButton.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N 
    458579        sentToQButton.setText("Send to Q"); 
    459580        sentToQButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); 
    460581        sentToQButton.setEnabled(false); 
    461          
     582 
    462583        fileButton.setText("File"); 
    463584        fileButton.setEnabled(false); 
     
    483604        carButton.setIcon(image); 
    484605        carButton.setEnabled(false); 
    485          
     606 
    486607        image = new ImageIcon("images/IncidentViewerImages/buttonPerson.png"); 
    487608        personButton.setIcon(image); 
    488609        personButton.setEnabled(false); 
    489          
     610 
    490611 
    491612        towRotationButton.setText("Tow Rotation"); 
     
    524645 
    525646        callBackCommentField.setEditable(false); 
    526          
     647 
    527648        callBackAddButton.setText("Add"); 
    528649        callBackAddButton.setEnabled(false); 
     
    535656 
    536657        callBackCommentTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 
    537          
     658 
    538659        recommandButton.setText("Recommand"); 
    539660        recommandButton.setEnabled(false); 
    540          
     661 
    541662        incidentNumLabel.setText("Incident Number:"); 
    542663 
     
    570691 
    571692        areaOfDivisionLabel.setText("Area Ofc/Division:"); 
    572          
     693 
    573694        addInfoCommentsField.setEditable(false); 
    574695 
    575         addInfoCCJurisdictionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
    576  
    577         addInfoAreaOfDivisionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
     696        addInfoCCJurisdictionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     697        { 
     698            "Item 1", "Item 2", "Item 3", "Item 4" 
     699        })); 
     700 
     701        addInfoAreaOfDivisionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     702        { 
     703            "Item 1", "Item 2", "Item 3", "Item 4" 
     704        })); 
    578705 
    579706        areaBatallionLabel.setText("Area/Batallion:"); 
    580707 
    581         addInfoAreaBatallionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
     708        addInfoAreaBatallionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     709        { 
     710            "Item 1", "Item 2", "Item 3", "Item 4" 
     711        })); 
    582712 
    583713        beatResponseAreaLabel.setText("Beat/Response Area:"); 
    584714 
    585         addInfoBeatResponseAreaComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
     715        addInfoBeatResponseAreaComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     716        { 
     717            "Item 1", "Item 2", "Item 3", "Item 4" 
     718        })); 
    586719 
    587720        responsePlanLabel.setText("Response Plan:"); 
    588721 
    589         addInfoReponsePlanComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 
     722        addInfoReponsePlanComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     723        { 
     724            "Item 1", "Item 2", "Item 3", "Item 4" 
     725        })); 
    590726 
    591727        rotationProviderAreaLabel.setText("Rotation Provider Area:"); 
    592728 
    593729        addInfoRotationProviderAreaField.setEditable(false); 
    594          
     730 
    595731 
    596732        commentsNotesPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
    597733 
    598734        commentsNotesTable.setModel(new javax.swing.table.DefaultTableModel( 
    599             null, new String [] { 
    600                 "Date", "Time", "Initial", "Block", "Comments" } 
    601         )); 
     735                null, new String[] 
     736        { 
     737            "Date", "Time", "Initial", "Block", "Comments" 
     738        })); 
    602739        jScrollPane3.setViewportView(commentsNotesTable); 
    603740        commentsNotesTable.getColumnModel().getColumn(0).setResizable(false); 
     
    612749 
    613750        commentsNotesField.setEditable(false); 
    614          
     751        commentsNotesField.setBackground(java.awt.Color.LIGHT_GRAY); 
     752        commentsNotesField.setLineWrap(true); // JD make text wrap inside the field 
     753        commentsNotesField.setBorder(BorderFactory.createLineBorder(Color.GRAY)); // JD added a border 
     754 
    615755        commentsNotesAddButton.setText("Add"); 
    616756        commentsNotesCancelButton.setText("Cancel"); 
     
    623763        commentsNotesConfidentialCommentCheckBox.setText("Confidential Comment"); 
    624764        commentsNotesConfidentialCommentCheckBox.setEnabled(false); 
    625          
     765 
    626766        jScrollPane14.setViewportView(callBackCommentTable); 
    627767        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13); 
    628768        jPanel13.setLayout(jPanel13Layout); 
    629769        jPanel13Layout.setHorizontalGroup( 
    630             jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    631             .addGroup(jPanel13Layout.createSequentialGroup() 
     770                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     771                .addGroup(jPanel13Layout.createSequentialGroup() 
    632772                .addContainerGap() 
    633773                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    634                     .addGroup(jPanel13Layout.createSequentialGroup() 
    635                         .addComponent(callBackCommentField, javax.swing.GroupLayout.PREFERRED_SIZE, 519, javax.swing.GroupLayout.PREFERRED_SIZE) 
    636                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    637                         .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    638                             .addComponent(callBackAddButton) 
    639                             .addComponent(callBackCancelButton) 
    640                             .addComponent(callBackSaveButton))) 
    641                     .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 604, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    642                 .addContainerGap(144, Short.MAX_VALUE)) 
    643         ); 
     774                .addGroup(jPanel13Layout.createSequentialGroup() 
     775                .addComponent(callBackCommentField, javax.swing.GroupLayout.PREFERRED_SIZE, 519, javax.swing.GroupLayout.PREFERRED_SIZE) 
     776                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     777                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     778                .addComponent(callBackAddButton) 
     779                .addComponent(callBackCancelButton) 
     780                .addComponent(callBackSaveButton))) 
     781                .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 604, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     782                .addContainerGap(144, Short.MAX_VALUE))); 
    644783        jPanel13Layout.setVerticalGroup( 
    645             jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    646             .addGroup(jPanel13Layout.createSequentialGroup() 
     784                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     785                .addGroup(jPanel13Layout.createSequentialGroup() 
    647786                .addContainerGap() 
    648787                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    649                     .addGroup(jPanel13Layout.createSequentialGroup() 
    650                         .addComponent(callBackAddButton) 
    651                         .addGap(0, 0, 0) 
    652                         .addComponent(callBackCancelButton) 
    653                         .addGap(0, 0, 0) 
    654                         .addComponent(callBackSaveButton)) 
    655                     .addComponent(callBackCommentField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     788                .addGroup(jPanel13Layout.createSequentialGroup() 
     789                .addComponent(callBackAddButton) 
     790                .addGap(0, 0, 0) 
     791                .addComponent(callBackCancelButton) 
     792                .addGap(0, 0, 0) 
     793                .addComponent(callBackSaveButton)) 
     794                .addComponent(callBackCommentField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    656795                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    657796                .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE) 
    658                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    659         ); 
     797                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); 
    660798 
    661799        javax.swing.GroupLayout callbacksPaneLayout = new javax.swing.GroupLayout(callbacksPane); 
    662800        callbacksPane.setLayout(callbacksPaneLayout); 
    663801        callbacksPaneLayout.setHorizontalGroup( 
    664             callbacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    665             .addGroup(callbacksPaneLayout.createSequentialGroup() 
     802                callbacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     803                .addGroup(callbacksPaneLayout.createSequentialGroup() 
    666804                .addGap(41, 41, 41) 
    667805                .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    668                 .addContainerGap()) 
    669         ); 
     806                .addContainerGap())); 
    670807        callbacksPaneLayout.setVerticalGroup( 
    671             callbacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    672             .addGroup(callbacksPaneLayout.createSequentialGroup() 
     808                callbacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     809                .addGroup(callbacksPaneLayout.createSequentialGroup() 
    673810                .addContainerGap() 
    674811                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    675                 .addContainerGap(58, Short.MAX_VALUE)) 
    676         ); 
     812                .addContainerGap(58, Short.MAX_VALUE))); 
    677813 
    678814        assignmentsPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
    679815 
    680816        assignmentsTable.setModel(new javax.swing.table.DefaultTableModel( 
    681             null, new String [] { 
    682                 "Unit", "Alarm Level", "Type", "Status", "responding From", "Elapsed", "Response Number" 
    683             } 
    684         )); 
     817                null, new String[] 
     818        { 
     819            "Unit", "Alarm Level", "Type", "Status", "responding From", "Elapsed", "Response Number" 
     820        })); 
    685821        jScrollPane4.setViewportView(assignmentsTable); 
    686822 
     
    688824 
    689825        resourceTable.setModel(new javax.swing.table.DefaultTableModel( 
    690             null,new String [] { 
    691                 "Resource / Capability", "", "Title 3", "Title 4"} 
    692         )); 
     826                null, new String[] 
     827        { 
     828            "Resource / Capability", "", "Title 3", "Title 4" 
     829        })); 
    693830        jScrollPane5.setViewportView(resourceTable); 
    694831 
     
    698835        jPanel2.setLayout(jPanel2Layout); 
    699836        jPanel2Layout.setHorizontalGroup( 
    700             jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    701             .addGroup(jPanel2Layout.createSequentialGroup() 
     837                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     838                .addGroup(jPanel2Layout.createSequentialGroup() 
    702839                .addContainerGap() 
    703840                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE) 
    704841                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    705842                .addComponent(recommandButton) 
    706                 .addContainerGap()) 
    707         ); 
     843                .addContainerGap())); 
    708844        jPanel2Layout.setVerticalGroup( 
    709             jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    710             .addGroup(jPanel2Layout.createSequentialGroup() 
     845                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     846                .addGroup(jPanel2Layout.createSequentialGroup() 
    711847                .addContainerGap() 
    712848                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) 
    713849                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    714             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 
     850                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 
    715851                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    716852                .addComponent(recommandButton) 
    717                 .addGap(47, 47, 47)) 
    718         ); 
     853                .addGap(47, 47, 47))); 
    719854 
    720855        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); 
    721856        jPanel4.setLayout(jPanel4Layout); 
    722857        jPanel4Layout.setHorizontalGroup( 
    723             jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    724             .addGroup(jPanel4Layout.createSequentialGroup() 
     858                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     859                .addGroup(jPanel4Layout.createSequentialGroup() 
    725860                .addContainerGap() 
    726861                .addComponent(jScrollPane1)) 
    727             .addGroup(jPanel4Layout.createSequentialGroup() 
     862                .addGroup(jPanel4Layout.createSequentialGroup() 
    728863                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    729                 .addContainerGap()) 
    730         ); 
     864                .addContainerGap())); 
    731865        jPanel4Layout.setVerticalGroup( 
    732             jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    733             .addGroup(jPanel4Layout.createSequentialGroup() 
     866                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     867                .addGroup(jPanel4Layout.createSequentialGroup() 
    734868                .addGap(6, 6, 6) 
    735869                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE) 
    736870                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    737                 .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    738         ); 
     871                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); 
    739872 
    740873        javax.swing.GroupLayout assignmentsPaneLayout = new javax.swing.GroupLayout(assignmentsPane); 
    741874        assignmentsPane.setLayout(assignmentsPaneLayout); 
    742875        assignmentsPaneLayout.setHorizontalGroup( 
    743             assignmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    744             .addGroup(assignmentsPaneLayout.createSequentialGroup() 
     876                assignmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     877                .addGroup(assignmentsPaneLayout.createSequentialGroup() 
    745878                .addContainerGap() 
    746879                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    747                 .addContainerGap(63, Short.MAX_VALUE)) 
    748         ); 
     880                .addContainerGap(63, Short.MAX_VALUE))); 
    749881        assignmentsPaneLayout.setVerticalGroup( 
    750             assignmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    751             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, assignmentsPaneLayout.createSequentialGroup() 
     882                assignmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     883                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, assignmentsPaneLayout.createSequentialGroup() 
    752884                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    753885                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    754                 .addGap(22, 22, 22)) 
    755         ); 
     886                .addGap(22, 22, 22))); 
    756887 
    757888        activitiesPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
    758889 
    759890        activitiesTable.setModel(new javax.swing.table.DefaultTableModel( 
    760             null, new String [] { 
    761                 "Date/Time", "Vehicle/Unit", "Activity", "Location", "Comment", "Dispatch" 
    762             } 
    763         )); 
     891                null, new String[] 
     892        { 
     893            "Date/Time", "Vehicle/Unit", "Activity", "Location", "Comment", "Dispatch" 
     894        })); 
    764895        jScrollPane6.setViewportView(activitiesTable); 
    765896 
     
    769900        activitiesPane.setLayout(activitiesPaneLayout); 
    770901        activitiesPaneLayout.setHorizontalGroup( 
    771             activitiesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    772             .addGroup(activitiesPaneLayout.createSequentialGroup() 
     902                activitiesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     903                .addGroup(activitiesPaneLayout.createSequentialGroup() 
    773904                .addContainerGap() 
    774905                .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 789, Short.MAX_VALUE) 
    775                 .addContainerGap()) 
    776         ); 
     906                .addContainerGap())); 
    777907        activitiesPaneLayout.setVerticalGroup( 
    778             activitiesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    779             .addGroup(activitiesPaneLayout.createSequentialGroup() 
     908                activitiesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     909                .addGroup(activitiesPaneLayout.createSequentialGroup() 
    780910                .addGap(27, 27, 27) 
    781911                .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE) 
    782                 .addContainerGap()) 
    783         ); 
     912                .addContainerGap())); 
    784913 
    785914        callBacksPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
     
    788917        jPanel1.setLayout(jPanel1Layout); 
    789918        jPanel1Layout.setHorizontalGroup( 
    790             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    791             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() 
     919                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     920                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() 
    792921                .addContainerGap() 
    793922                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    794                     .addGroup(jPanel1Layout.createSequentialGroup() 
    795                         .addGap(0, 0, Short.MAX_VALUE) 
    796                         .addComponent(rotationProviderAreaLabel)) 
    797                     .addGroup(jPanel1Layout.createSequentialGroup() 
    798                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    799                             .addGroup(jPanel1Layout.createSequentialGroup() 
    800                                 .addGap(0, 0, Short.MAX_VALUE) 
    801                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    802                                     .addComponent(callTakenLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    803                                     .addComponent(machineNameLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    804                                     .addComponent(incidentTypeLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    805                                     .addComponent(incidentNumLabel, javax.swing.GroupLayout.Alignment.TRAILING)) 
    806                                 .addGap(4, 4, 4) 
    807                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    808                                     .addComponent(addInfoIncidentNumField, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE) 
    809                                     .addComponent(addInfoIncidentTypeField, javax.swing.GroupLayout.Alignment.TRAILING) 
    810                                     .addComponent(addInfoCallTakenField, javax.swing.GroupLayout.Alignment.TRAILING) 
    811                                     .addComponent(addInfoMachineNameField, javax.swing.GroupLayout.Alignment.TRAILING))) 
    812                             .addGroup(jPanel1Layout.createSequentialGroup() 
    813                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    814                                     .addComponent(callStatusLabel) 
    815                                     .addComponent(callTakerPhoneLabel)) 
    816                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    817                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    818                                     .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    819                                         .addComponent(addInfoCallTakerPhoneExtField, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) 
    820                                         .addComponent(addInfoCallStatusField)) 
    821                                     .addComponent(addInfoCommentsField, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    822                                 .addGap(0, 31, Short.MAX_VALUE))) 
    823                         .addGap(100, 100, 100) 
    824                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    825                             .addComponent(alarmLevelLabel) 
    826                             .addComponent(ccJurisdictionLabel) 
    827                             .addComponent(areaOfDivisionLabel) 
    828                             .addComponent(areaBatallionLabel) 
    829                             .addComponent(beatResponseAreaLabel) 
    830                             .addComponent(responsePlanLabel)))) 
    831                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     923                .addGroup(jPanel1Layout.createSequentialGroup() 
     924                .addGap(0, 0, Short.MAX_VALUE) 
     925                .addComponent(rotationProviderAreaLabel)) 
     926                .addGroup(jPanel1Layout.createSequentialGroup() 
    832927                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    833                     .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    834                         .addComponent(addInfoAlarmLevelField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) 
    835                         .addComponent(addInfoCCJurisdictionComboBox, 0, 206, Short.MAX_VALUE) 
    836                         .addComponent(addInfoAreaOfDivisionComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    837                         .addComponent(addInfoAreaBatallionComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    838                         .addComponent(addInfoBeatResponseAreaComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    839                         .addComponent(addInfoReponsePlanComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    840                     .addComponent(addInfoRotationProviderAreaField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    841                 .addContainerGap()) 
    842         ); 
     928                .addGroup(jPanel1Layout.createSequentialGroup() 
     929                .addGap(0, 0, Short.MAX_VALUE) 
     930                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     931                .addComponent(callTakenLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     932                .addComponent(machineNameLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     933                .addComponent(incidentTypeLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     934                .addComponent(incidentNumLabel, javax.swing.GroupLayout.Alignment.TRAILING)) 
     935                .addGap(4, 4, 4) 
     936                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     937                .addComponent(addInfoIncidentNumField, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE) 
     938                .addComponent(addInfoIncidentTypeField, javax.swing.GroupLayout.Alignment.TRAILING) 
     939                .addComponent(addInfoCallTakenField, javax.swing.GroupLayout.Alignment.TRAILING) 
     940                .addComponent(addInfoMachineNameField, javax.swing.GroupLayout.Alignment.TRAILING))) 
     941                .addGroup(jPanel1Layout.createSequentialGroup() 
     942                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     943                .addComponent(callStatusLabel) 
     944                .addComponent(callTakerPhoneLabel)) 
     945                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     946                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     947                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     948                .addComponent(addInfoCallTakerPhoneExtField, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) 
     949                .addComponent(addInfoCallStatusField)) 
     950                .addComponent(addInfoCommentsField, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     951                .addGap(0, 31, Short.MAX_VALUE))) 
     952                .addGap(100, 100, 100) 
     953                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     954                .addComponent(alarmLevelLabel) 
     955                .addComponent(ccJurisdictionLabel) 
     956                .addComponent(areaOfDivisionLabel) 
     957                .addComponent(areaBatallionLabel) 
     958                .addComponent(beatResponseAreaLabel) 
     959                .addComponent(responsePlanLabel)))) 
     960                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     961                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     962                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     963                .addComponent(addInfoAlarmLevelField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) 
     964                .addComponent(addInfoCCJurisdictionComboBox, 0, 206, Short.MAX_VALUE) 
     965                .addComponent(addInfoAreaOfDivisionComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     966                .addComponent(addInfoAreaBatallionComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     967                .addComponent(addInfoBeatResponseAreaComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     968                .addComponent(addInfoReponsePlanComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
     969                .addComponent(addInfoRotationProviderAreaField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     970                .addContainerGap())); 
    843971        jPanel1Layout.setVerticalGroup( 
    844             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    845             .addGroup(jPanel1Layout.createSequentialGroup() 
     972                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     973                .addGroup(jPanel1Layout.createSequentialGroup() 
    846974                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    847                     .addGroup(jPanel1Layout.createSequentialGroup() 
    848                         .addContainerGap() 
    849                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    850                             .addComponent(incidentNumLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) 
    851                             .addComponent(addInfoIncidentNumField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    852                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    853                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    854                             .addComponent(incidentTypeLabel) 
    855                             .addComponent(addInfoIncidentTypeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    856                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    857                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    858                             .addComponent(callTakenLabel) 
    859                             .addComponent(addInfoCallTakenField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    860                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    861                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    862                             .addComponent(machineNameLabel) 
    863                             .addComponent(addInfoMachineNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    864                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    865                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    866                             .addComponent(callTakerPhoneLabel) 
    867                             .addComponent(addInfoCallTakerPhoneExtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    868                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    869                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    870                             .addComponent(callStatusLabel) 
    871                             .addComponent(addInfoCallStatusField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    872                     .addGroup(jPanel1Layout.createSequentialGroup() 
    873                         .addGap(21, 21, 21) 
    874                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    875                             .addComponent(alarmLevelLabel) 
    876                             .addComponent(addInfoAlarmLevelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    877                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    878                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    879                             .addComponent(ccJurisdictionLabel) 
    880                             .addComponent(addInfoCCJurisdictionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    881                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    882                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    883                             .addComponent(areaOfDivisionLabel) 
    884                             .addComponent(addInfoAreaOfDivisionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    885                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    886                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    887                             .addComponent(areaBatallionLabel) 
    888                             .addComponent(addInfoAreaBatallionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    889                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    890                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    891                             .addComponent(beatResponseAreaLabel) 
    892                             .addComponent(addInfoBeatResponseAreaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    893                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    894                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    895                             .addComponent(responsePlanLabel) 
    896                             .addComponent(addInfoReponsePlanComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
     975                .addGroup(jPanel1Layout.createSequentialGroup() 
     976                .addContainerGap() 
     977                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     978                .addComponent(incidentNumLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) 
     979                .addComponent(addInfoIncidentNumField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     980                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     981                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     982                .addComponent(incidentTypeLabel) 
     983                .addComponent(addInfoIncidentTypeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     984                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     985                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     986                .addComponent(callTakenLabel) 
     987                .addComponent(addInfoCallTakenField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     988                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     989                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     990                .addComponent(machineNameLabel) 
     991                .addComponent(addInfoMachineNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     992                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     993                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     994                .addComponent(callTakerPhoneLabel) 
     995                .addComponent(addInfoCallTakerPhoneExtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     996                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     997                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     998                .addComponent(callStatusLabel) 
     999                .addComponent(addInfoCallStatusField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1000                .addGroup(jPanel1Layout.createSequentialGroup() 
     1001                .addGap(21, 21, 21) 
     1002                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1003                .addComponent(alarmLevelLabel) 
     1004                .addComponent(addInfoAlarmLevelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1005                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1006                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1007                .addComponent(ccJurisdictionLabel) 
     1008                .addComponent(addInfoCCJurisdictionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1009                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1010                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1011                .addComponent(areaOfDivisionLabel) 
     1012                .addComponent(addInfoAreaOfDivisionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1013                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1014                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1015                .addComponent(areaBatallionLabel) 
     1016                .addComponent(addInfoAreaBatallionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1017                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1018                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1019                .addComponent(beatResponseAreaLabel) 
     1020                .addComponent(addInfoBeatResponseAreaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1021                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1022                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1023                .addComponent(responsePlanLabel) 
     1024                .addComponent(addInfoReponsePlanComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
    8971025                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    898                     .addGroup(jPanel1Layout.createSequentialGroup() 
    899                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    900                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    901                             .addComponent(rotationProviderAreaLabel) 
    902                             .addComponent(addInfoRotationProviderAreaField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    903                     .addGroup(jPanel1Layout.createSequentialGroup() 
    904                         .addGap(23, 23, 23) 
    905                         .addComponent(addInfoCommentsField, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    906                 .addGap(5, 5, 5)) 
    907         ); 
     1026                .addGroup(jPanel1Layout.createSequentialGroup() 
     1027                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1028                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1029                .addComponent(rotationProviderAreaLabel) 
     1030                .addComponent(addInfoRotationProviderAreaField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1031                .addGroup(jPanel1Layout.createSequentialGroup() 
     1032                .addGap(23, 23, 23) 
     1033                .addComponent(addInfoCommentsField, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1034                .addGap(5, 5, 5))); 
    9081035 
    9091036        javax.swing.GroupLayout callBacksPaneLayout = new javax.swing.GroupLayout(callBacksPane); 
    9101037        callBacksPane.setLayout(callBacksPaneLayout); 
    9111038        callBacksPaneLayout.setHorizontalGroup( 
    912             callBacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    913             .addGroup(callBacksPaneLayout.createSequentialGroup() 
     1039                callBacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1040                .addGroup(callBacksPaneLayout.createSequentialGroup() 
    9141041                .addContainerGap() 
    9151042                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    916                 .addContainerGap(85, Short.MAX_VALUE)) 
    917         ); 
     1043                .addContainerGap(85, Short.MAX_VALUE))); 
    9181044        callBacksPaneLayout.setVerticalGroup( 
    919             callBacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    920             .addGroup(callBacksPaneLayout.createSequentialGroup() 
     1045                callBacksPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1046                .addGroup(callBacksPaneLayout.createSequentialGroup() 
    9211047                .addContainerGap() 
    9221048                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    923                 .addGap(40, 40, 40)) 
    924         ); 
    925          
     1049                .addGap(40, 40, 40))); 
     1050 
    9261051        javax.swing.GroupLayout commentsNotesPaneLayout = new javax.swing.GroupLayout(commentsNotesPane); 
    9271052        commentsNotesPane.setLayout(commentsNotesPaneLayout); 
    9281053        commentsNotesPaneLayout.setHorizontalGroup( 
    929             commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    930             .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
     1054                commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1055                .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
    9311056                .addContainerGap() 
    9321057                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    933                     .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 789, Short.MAX_VALUE) 
    934                     .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
    935                         .addComponent(commentsNotesField, javax.swing.GroupLayout.PREFERRED_SIZE, 610, javax.swing.GroupLayout.PREFERRED_SIZE) 
    936                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    937                         .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    938                             .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
    939                                 .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    940                                     .addComponent(commentsNotesNotifyButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    941                                     .addComponent(commentsNotesAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    942                                 .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    943                                     .addComponent(commentsNotesSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) 
    944                                     .addComponent(commentsNotesCancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    945                             .addComponent(commentsNotesConfidentialCommentCheckBox)) 
    946                         .addGap(0, 0, Short.MAX_VALUE))) 
    947                 .addContainerGap()) 
    948         ); 
     1058                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 789, Short.MAX_VALUE) 
     1059                .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
     1060                .addComponent(commentsNotesField, javax.swing.GroupLayout.PREFERRED_SIZE, 610, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1061                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1062                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1063                .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
     1064                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1065                .addComponent(commentsNotesNotifyButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1066                .addComponent(commentsNotesAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1067                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1068                .addComponent(commentsNotesSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1069                .addComponent(commentsNotesCancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1070                .addComponent(commentsNotesConfidentialCommentCheckBox)) 
     1071                .addGap(0, 0, Short.MAX_VALUE))) 
     1072                .addContainerGap())); 
    9491073        commentsNotesPaneLayout.setVerticalGroup( 
    950             commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    951             .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
     1074                commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1075                .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
    9521076                .addContainerGap() 
    9531077                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) 
    9541078                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    9551079                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    956                     .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
    957                         .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    958                             .addComponent(commentsNotesAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) 
    959                             .addComponent(commentsNotesCancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    960                         .addGap(0, 0, 0) 
    961                         .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    962                             .addComponent(commentsNotesNotifyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) 
    963                             .addComponent(commentsNotesSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    964                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE) 
    965                         .addComponent(commentsNotesConfidentialCommentCheckBox)) 
    966                     .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
    967                         .addGap(2, 2, 2) 
    968                         .addComponent(commentsNotesField))) 
    969                 .addGap(40, 40, 40)) 
    970         ); 
     1080                .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
     1081                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1082                .addComponent(commentsNotesAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1083                .addComponent(commentsNotesCancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1084                .addGap(0, 0, 0) 
     1085                .addGroup(commentsNotesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1086                .addComponent(commentsNotesNotifyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1087                .addComponent(commentsNotesSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1088                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE) 
     1089                .addComponent(commentsNotesConfidentialCommentCheckBox)) 
     1090                .addGroup(commentsNotesPaneLayout.createSequentialGroup() 
     1091                .addGap(2, 2, 2) 
     1092                .addComponent(commentsNotesField))) 
     1093                .addGap(40, 40, 40))); 
    9711094 
    9721095        editLogPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
    9731096 
    9741097        editLogTable.setModel(new javax.swing.table.DefaultTableModel( 
    975             null, new String [] { 
    976                 "Date", "Edits/Updates", "Reason", "Changes By", "Terminal" 
    977             })); 
    978          
     1098                null, new String[] 
     1099        { 
     1100            "Date", "Edits/Updates", "Reason", "Changes By", "Terminal" 
     1101        })); 
     1102 
    9791103        jScrollPane8.setViewportView(editLogTable); 
    9801104 
     
    9821106        editLogPane.setLayout(editLogPaneLayout); 
    9831107        editLogPaneLayout.setHorizontalGroup( 
    984             editLogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    985             .addGroup(editLogPaneLayout.createSequentialGroup() 
     1108                editLogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1109                .addGroup(editLogPaneLayout.createSequentialGroup() 
    9861110                .addContainerGap() 
    9871111                .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 789, Short.MAX_VALUE) 
    988                 .addContainerGap()) 
    989         ); 
     1112                .addContainerGap())); 
    9901113        editLogPaneLayout.setVerticalGroup( 
    991             editLogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    992             .addGroup(editLogPaneLayout.createSequentialGroup() 
     1114                editLogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1115                .addGroup(editLogPaneLayout.createSequentialGroup() 
    9931116                .addContainerGap() 
    9941117                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE) 
    995                 .addGap(18, 18, 18)) 
    996         ); 
     1118                .addGap(18, 18, 18))); 
    9971119 
    9981120        timesPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
    9991121 
    10001122        timesTable.setModel(new javax.swing.table.DefaultTableModel( 
    1001             null, new String [] { 
    1002                 "Unit", "Alarm Level", "Assigned", "Enroute", "Staged", "Arrival",  
    1003                 "Access", "Depart", "At Dest.", "Status 5", "Available", "Resp Num" 
    1004             })); 
     1123                null, new String[] 
     1124        { 
     1125            "Unit", "Alarm Level", "Assigned", "Enroute", "Staged", "Arrival", 
     1126            "Access", "Depart", "At Dest.", "Status 5", "Available", "Resp Num" 
     1127        })); 
    10051128        jScrollPane9.setViewportView(timesTable); 
    10061129 
     
    10161139 
    10171140        timesAllAvailableField.setEditable(false); 
    1018          
     1141 
    10191142        callClosedLabel.setText("Call Closed:"); 
    1020          
     1143 
    10211144        timesCallClosedField.setEditable(false); 
    10221145 
     
    10271150        timesPane.setLayout(timesPaneLayout); 
    10281151        timesPaneLayout.setHorizontalGroup( 
    1029             timesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1030             .addGroup(timesPaneLayout.createSequentialGroup() 
     1152                timesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1153                .addGroup(timesPaneLayout.createSequentialGroup() 
    10311154                .addContainerGap() 
    10321155                .addGroup(timesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1033                     .addGroup(timesPaneLayout.createSequentialGroup() 
    1034                         .addGap(10, 10, 10) 
    1035                         .addComponent(ringLabel) 
    1036                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1037                         .addComponent(timesRingField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1038                         .addGap(18, 18, 18) 
    1039                         .addComponent(inQueueLabel) 
    1040                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1041                         .addComponent(timesInQueueField, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1042                         .addGap(18, 18, 18) 
    1043                         .addComponent(allAvailableLabel) 
    1044                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1045                         .addComponent(timesAllAvailableField, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE) 
    1046                         .addGap(18, 18, 18) 
    1047                         .addComponent(callClosedLabel) 
    1048                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1049                         .addComponent(timesCallClosedField, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1050                         .addGap(18, 18, 18) 
    1051                         .addComponent(timesPageTimesButton)) 
    1052                     .addComponent(jScrollPane9)) 
    1053                 .addContainerGap()) 
    1054         ); 
     1156                .addGroup(timesPaneLayout.createSequentialGroup() 
     1157                .addGap(10, 10, 10) 
     1158                .addComponent(ringLabel) 
     1159                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1160                .addComponent(timesRingField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1161                .addGap(18, 18, 18) 
     1162                .addComponent(inQueueLabel) 
     1163                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1164                .addComponent(timesInQueueField, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1165                .addGap(18, 18, 18) 
     1166                .addComponent(allAvailableLabel) 
     1167                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1168                .addComponent(timesAllAvailableField, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE) 
     1169                .addGap(18, 18, 18) 
     1170                .addComponent(callClosedLabel) 
     1171                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1172                .addComponent(timesCallClosedField, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1173                .addGap(18, 18, 18) 
     1174                .addComponent(timesPageTimesButton)) 
     1175                .addComponent(jScrollPane9)) 
     1176                .addContainerGap())); 
    10551177        timesPaneLayout.setVerticalGroup( 
    1056             timesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1057             .addGroup(timesPaneLayout.createSequentialGroup() 
     1178                timesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1179                .addGroup(timesPaneLayout.createSequentialGroup() 
    10581180                .addContainerGap() 
    10591181                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE) 
    10601182                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    10611183                .addGroup(timesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1062                     .addComponent(ringLabel) 
    1063                     .addComponent(timesRingField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1064                     .addComponent(inQueueLabel) 
    1065                     .addComponent(timesInQueueField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1066                     .addComponent(allAvailableLabel) 
    1067                     .addComponent(timesAllAvailableField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1068                     .addComponent(callClosedLabel) 
    1069                     .addComponent(timesCallClosedField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1070                     .addComponent(timesPageTimesButton)) 
    1071                 .addContainerGap(88, Short.MAX_VALUE)) 
    1072         ); 
     1184                .addComponent(ringLabel) 
     1185                .addComponent(timesRingField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1186                .addComponent(inQueueLabel) 
     1187                .addComponent(timesInQueueField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1188                .addComponent(allAvailableLabel) 
     1189                .addComponent(timesAllAvailableField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1190                .addComponent(callClosedLabel) 
     1191                .addComponent(timesCallClosedField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1192                .addComponent(timesPageTimesButton)) 
     1193                .addContainerGap(88, Short.MAX_VALUE))); 
    10731194 
    10741195        transportInfoPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
     
    11131234        transportProtocolLabel.setText("Transport Protocol..."); 
    11141235 
    1115         transportInfoProtocolComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] {""})); 
     1236        transportInfoProtocolComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     1237        { 
     1238            "" 
     1239        })); 
    11161240        transportInfoProtocolComboBox.setEnabled(false); 
    11171241 
    11181242        transportPriorityLabel.setText("Transport Priority..."); 
    11191243 
    1120         transportInfoPriorityComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] {""})); 
     1244        transportInfoPriorityComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     1245        { 
     1246            "" 
     1247        })); 
    11211248        transportInfoPriorityComboBox.setEnabled(false); 
    11221249 
    11231250        assistedByLabel.setText("Assisted By..."); 
    11241251 
    1125         transportInfoAssistedByComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] {""})); 
     1252        transportInfoAssistedByComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] 
     1253        { 
     1254            "" 
     1255        })); 
    11261256        transportInfoAssistedByComboBox.setEnabled(false); 
    11271257 
     
    11291259        jPanel7.setLayout(jPanel7Layout); 
    11301260        jPanel7Layout.setHorizontalGroup( 
    1131             jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1132             .addGroup(jPanel7Layout.createSequentialGroup() 
     1261                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1262                .addGroup(jPanel7Layout.createSequentialGroup() 
    11331263                .addContainerGap() 
    11341264                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1135                     .addComponent(transportInfoProtocolComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1136                     .addComponent(transportInfoPriorityComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1137                     .addGroup(jPanel7Layout.createSequentialGroup() 
    1138                         .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1139                             .addComponent(transportProtocolLabel) 
    1140                             .addComponent(transportPriorityLabel) 
    1141                             .addComponent(assistedByLabel)) 
    1142                         .addGap(0, 94, Short.MAX_VALUE)) 
    1143                     .addComponent(transportInfoAssistedByComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    1144                 .addContainerGap()) 
    1145         ); 
     1265                .addComponent(transportInfoProtocolComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1266                .addComponent(transportInfoPriorityComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1267                .addGroup(jPanel7Layout.createSequentialGroup() 
     1268                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1269                .addComponent(transportProtocolLabel) 
     1270                .addComponent(transportPriorityLabel) 
     1271                .addComponent(assistedByLabel)) 
     1272                .addGap(0, 94, Short.MAX_VALUE)) 
     1273                .addComponent(transportInfoAssistedByComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
     1274                .addContainerGap())); 
    11461275        jPanel7Layout.setVerticalGroup( 
    1147             jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1148             .addGroup(jPanel7Layout.createSequentialGroup() 
     1276                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1277                .addGroup(jPanel7Layout.createSequentialGroup() 
    11491278                .addGap(30, 30, 30) 
    11501279                .addComponent(transportProtocolLabel) 
     
    11591288                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    11601289                .addComponent(transportInfoAssistedByComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1161                 .addContainerGap(33, Short.MAX_VALUE)) 
    1162         ); 
     1290                .addContainerGap(33, Short.MAX_VALUE))); 
    11631291 
    11641292        jTabbedPane2.addTab("Mode", jPanel7); 
     
    11671295        jPanel8.setLayout(jPanel8Layout); 
    11681296        jPanel8Layout.setHorizontalGroup( 
    1169             jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1170             .addGap(0, 215, Short.MAX_VALUE) 
    1171         ); 
     1297                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1298                .addGap(0, 215, Short.MAX_VALUE)); 
    11721299        jPanel8Layout.setVerticalGroup( 
    1173             jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1174             .addGap(0, 195, Short.MAX_VALUE) 
    1175         ); 
     1300                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1301                .addGap(0, 195, Short.MAX_VALUE)); 
    11761302 
    11771303        jTabbedPane2.addTab("Times", jPanel8); 
     
    11801306        jPanel9.setLayout(jPanel9Layout); 
    11811307        jPanel9Layout.setHorizontalGroup( 
    1182             jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1183             .addGap(0, 215, Short.MAX_VALUE) 
    1184         ); 
     1308                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1309                .addGap(0, 215, Short.MAX_VALUE)); 
    11851310        jPanel9Layout.setVerticalGroup( 
    1186             jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1187             .addGap(0, 195, Short.MAX_VALUE) 
    1188         ); 
     1311                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1312                .addGap(0, 195, Short.MAX_VALUE)); 
    11891313 
    11901314        jTabbedPane2.addTab("Odometer", jPanel9); 
     
    11931317        jPanel10.setLayout(jPanel10Layout); 
    11941318        jPanel10Layout.setHorizontalGroup( 
    1195             jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1196             .addGap(0, 215, Short.MAX_VALUE) 
    1197         ); 
     1319                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1320                .addGap(0, 215, Short.MAX_VALUE)); 
    11981321        jPanel10Layout.setVerticalGroup( 
    1199             jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1200             .addGap(0, 195, Short.MAX_VALUE) 
    1201         ); 
     1322                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1323                .addGap(0, 195, Short.MAX_VALUE)); 
    12021324 
    12031325        jTabbedPane2.addTab("Caution", jPanel10); 
     
    12061328        jPanel6.setLayout(jPanel6Layout); 
    12071329        jPanel6Layout.setHorizontalGroup( 
    1208             jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1209             .addGroup(jPanel6Layout.createSequentialGroup() 
     1330                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1331                .addGroup(jPanel6Layout.createSequentialGroup() 
    12101332                .addContainerGap() 
    12111333                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1212                     .addComponent(jTextField27) 
    1213                     .addComponent(transportInfoAddPresetTransportRecButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1214                     .addComponent(transportInfoRemoveTransportRecButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1215                     .addComponent(transportInfoLinkUnitToTransportRecButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
     1334                .addComponent(jTextField27) 
     1335                .addComponent(transportInfoAddPresetTransportRecButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1336                .addComponent(transportInfoRemoveTransportRecButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1337                .addComponent(transportInfoLinkUnitToTransportRecButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    12161338                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1217                     .addGroup(jPanel6Layout.createSequentialGroup() 
    1218                         .addGap(5, 5, 5) 
    1219                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1220                             .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 
    1221                                 .addComponent(nameLabel) 
    1222                                 .addComponent(transportCityLabel) 
    1223                                 .addComponent(transportLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1224                                 .addComponent(transportInfoAddressButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    1225                             .addComponent(transportStateLabel) 
    1226                             .addComponent(roomAptEtcLabel) 
    1227                             .addComponent(phoneLabel2)) 
    1228                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1229                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1230                             .addComponent(transportInfoNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1231                             .addComponent(transportInfoCityComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1232                             .addComponent(transportInfoLocationField) 
    1233                             .addComponent(transportInfoAddressField) 
    1234                             .addGroup(jPanel6Layout.createSequentialGroup() 
    1235                                 .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1236                                     .addGroup(jPanel6Layout.createSequentialGroup() 
    1237                                         .addComponent(transportInfoRoomAptEtcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1238                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1239                                         .addComponent(buildingNumLabel)) 
    1240                                     .addComponent(transportInfoStateField, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1241                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1242                                 .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1243                                     .addComponent(transportInfoBuildingField, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE) 
    1244                                     .addGroup(jPanel6Layout.createSequentialGroup() 
    1245                                         .addComponent(transportInfoState2Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1246                                         .addGap(0, 0, Short.MAX_VALUE)))) 
    1247                             .addGroup(jPanel6Layout.createSequentialGroup() 
    1248                                 .addComponent(transportInfoPhoneField, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1249                                 .addGap(14, 14, 14) 
    1250                                 .addComponent(transportInfoCancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
    1251                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() 
    1252                         .addGap(242, 242, 242) 
    1253                         .addComponent(transportInfoSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1339                .addGroup(jPanel6Layout.createSequentialGroup() 
     1340                .addGap(5, 5, 5) 
     1341                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     1342                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 
     1343                .addComponent(nameLabel) 
     1344                .addComponent(transportCityLabel) 
     1345                .addComponent(transportLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1346                .addComponent(transportInfoAddressButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
     1347                .addComponent(transportStateLabel) 
     1348                .addComponent(roomAptEtcLabel) 
     1349                .addComponent(phoneLabel2)) 
     1350                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1351                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1352                .addComponent(transportInfoNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1353                .addComponent(transportInfoCityComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1354                .addComponent(transportInfoLocationField) 
     1355                .addComponent(transportInfoAddressField) 
     1356                .addGroup(jPanel6Layout.createSequentialGroup() 
     1357                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1358                .addGroup(jPanel6Layout.createSequentialGroup() 
     1359                .addComponent(transportInfoRoomAptEtcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1360                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1361                .addComponent(buildingNumLabel)) 
     1362                .addComponent(transportInfoStateField, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1363                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1364                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1365                .addComponent(transportInfoBuildingField, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE) 
     1366                .addGroup(jPanel6Layout.createSequentialGroup() 
     1367                .addComponent(transportInfoState2Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1368                .addGap(0, 0, Short.MAX_VALUE)))) 
     1369                .addGroup(jPanel6Layout.createSequentialGroup() 
     1370                .addComponent(transportInfoPhoneField, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1371                .addGap(14, 14, 14) 
     1372                .addComponent(transportInfoCancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
     1373                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() 
     1374                .addGap(242, 242, 242) 
     1375                .addComponent(transportInfoSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    12541376                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    12551377                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1256                 .addContainerGap(84, Short.MAX_VALUE)) 
    1257         ); 
     1378                .addContainerGap(84, Short.MAX_VALUE))); 
    12581379        jPanel6Layout.setVerticalGroup( 
    1259             jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1260             .addGroup(jPanel6Layout.createSequentialGroup() 
     1380                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1381                .addGroup(jPanel6Layout.createSequentialGroup() 
    12611382                .addGap(17, 17, 17) 
    12621383                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1263                     .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1264                     .addGroup(jPanel6Layout.createSequentialGroup() 
    1265                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1266                             .addComponent(nameLabel) 
    1267                             .addComponent(transportInfoNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1268                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1269                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1270                             .addComponent(transportCityLabel) 
    1271                             .addComponent(transportInfoCityComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1272                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1273                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1274                             .addComponent(transportLocationLabel) 
    1275                             .addComponent(transportInfoLocationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1276                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1277                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1278                             .addComponent(transportInfoAddressButton) 
    1279                             .addComponent(transportInfoAddressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1280                         .addGap(23, 23, 23) 
    1281                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1282                             .addComponent(transportStateLabel) 
    1283                             .addComponent(transportInfoStateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1284                             .addComponent(transportInfoState2Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1285                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1286                         .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1287                             .addComponent(roomAptEtcLabel) 
    1288                             .addComponent(transportInfoRoomAptEtcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1289                             .addComponent(buildingNumLabel) 
    1290                             .addComponent(transportInfoBuildingField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
     1384                .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1385                .addGroup(jPanel6Layout.createSequentialGroup() 
     1386                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1387                .addComponent(nameLabel) 
     1388                .addComponent(transportInfoNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1389                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1390                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1391                .addComponent(transportCityLabel) 
     1392                .addComponent(transportInfoCityComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    12911393                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    12921394                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1293                     .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1294                         .addComponent(phoneLabel2) 
    1295                         .addComponent(transportInfoPhoneField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1296                         .addComponent(transportInfoCancelButton)) 
    1297                     .addComponent(transportInfoAddPresetTransportRecButton)) 
     1395                .addComponent(transportLocationLabel) 
     1396                .addComponent(transportInfoLocationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1397                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1398                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     1399                .addComponent(transportInfoAddressButton) 
     1400                .addComponent(transportInfoAddressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1401                .addGap(23, 23, 23) 
     1402                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1403                .addComponent(transportStateLabel) 
     1404                .addComponent(transportInfoStateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1405                .addComponent(transportInfoState2Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1406                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1407                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1408                .addComponent(roomAptEtcLabel) 
     1409                .addComponent(transportInfoRoomAptEtcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1410                .addComponent(buildingNumLabel) 
     1411                .addComponent(transportInfoBuildingField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
     1412                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    12981413                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1299                     .addGroup(jPanel6Layout.createSequentialGroup() 
    1300                         .addComponent(transportInfoRemoveTransportRecButton) 
    1301                         .addGap(0, 0, Short.MAX_VALUE) 
    1302                         .addComponent(transportInfoLinkUnitToTransportRecButton)) 
    1303                     .addGroup(jPanel6Layout.createSequentialGroup() 
    1304                         .addComponent(transportInfoSaveButton) 
    1305                         .addGap(0, 0, Short.MAX_VALUE))) 
     1414                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1415                .addComponent(phoneLabel2) 
     1416                .addComponent(transportInfoPhoneField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1417                .addComponent(transportInfoCancelButton)) 
     1418                .addComponent(transportInfoAddPresetTransportRecButton)) 
     1419                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1420                .addGroup(jPanel6Layout.createSequentialGroup() 
     1421                .addComponent(transportInfoRemoveTransportRecButton) 
     1422                .addGap(0, 0, Short.MAX_VALUE) 
     1423                .addComponent(transportInfoLinkUnitToTransportRecButton)) 
     1424                .addGroup(jPanel6Layout.createSequentialGroup() 
     1425                .addComponent(transportInfoSaveButton) 
     1426                .addGap(0, 0, Short.MAX_VALUE))) 
    13061427                .addContainerGap()) 
    1307             .addGroup(jPanel6Layout.createSequentialGroup() 
     1428                .addGroup(jPanel6Layout.createSequentialGroup() 
    13081429                .addGap(18, 18, 18) 
    13091430                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1310                 .addGap(0, 0, Short.MAX_VALUE)) 
    1311         ); 
     1431                .addGap(0, 0, Short.MAX_VALUE))); 
    13121432 
    13131433        javax.swing.GroupLayout transportInfoPaneLayout = new javax.swing.GroupLayout(transportInfoPane); 
    13141434        transportInfoPane.setLayout(transportInfoPaneLayout); 
    13151435        transportInfoPaneLayout.setHorizontalGroup( 
    1316             transportInfoPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1317             .addGroup(transportInfoPaneLayout.createSequentialGroup() 
     1436                transportInfoPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1437                .addGroup(transportInfoPaneLayout.createSequentialGroup() 
    13181438                .addContainerGap() 
    13191439                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1320                 .addContainerGap()) 
    1321         ); 
     1440                .addContainerGap())); 
    13221441        transportInfoPaneLayout.setVerticalGroup( 
    1323             transportInfoPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1324             .addGroup(transportInfoPaneLayout.createSequentialGroup() 
     1442                transportInfoPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1443                .addGroup(transportInfoPaneLayout.createSequentialGroup() 
    13251444                .addContainerGap() 
    13261445                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 273, Short.MAX_VALUE) 
    1327                 .addGap(25, 25, 25)) 
    1328         ); 
     1446                .addGap(25, 25, 25))); 
    13291447 
    13301448        userDataPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
     
    13331451 
    13341452        timeStampsTable.setModel(new javax.swing.table.DefaultTableModel( 
    1335             null,new String [] { 
    1336                 "Time Stamp Description", "Date", "Time"} 
    1337         )); 
     1453                null, new String[] 
     1454        { 
     1455            "Time Stamp Description", "Date", "Time" 
     1456        })); 
    13381457        jScrollPane10.setViewportView(timeStampsTable); 
    13391458 
     
    13451464 
    13461465        userDataDateField.setEditable(false); 
    1347          
     1466 
    13481467        timeLabel.setText("Time:"); 
    1349          
     1468 
    13501469        userDataTimeField.setEditable(false); 
    13511470 
     
    13541473 
    13551474        dataFieldsTable.setModel(new javax.swing.table.DefaultTableModel( 
    1356             null, new String [] {"Data Field Discription", "Data"} )); 
    1357          
     1475                null, new String[] 
     1476        { 
     1477            "Data Field Discription", "Data" 
     1478        })); 
     1479 
    13581480        jScrollPane11.setViewportView(dataFieldsTable); 
    13591481 
     
    13611483 
    13621484        userDataDataField.setEditable(false); 
    1363          
     1485 
    13641486        userDataCancelButton.setText("Cancel"); 
    13651487        userDataCancelButton.setEnabled(false); 
     
    13711493        jPanel11.setLayout(jPanel11Layout); 
    13721494        jPanel11Layout.setHorizontalGroup( 
    1373             jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1374             .addGroup(jPanel11Layout.createSequentialGroup() 
     1495                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1496                .addGroup(jPanel11Layout.createSequentialGroup() 
    13751497                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1376                     .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1377                     .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1378                         .addGroup(jPanel11Layout.createSequentialGroup() 
    1379                             .addContainerGap() 
    1380                             .addComponent(timeStampsLabel) 
    1381                             .addGap(310, 310, 310)) 
    1382                         .addGroup(jPanel11Layout.createSequentialGroup() 
    1383                             .addGap(27, 27, 27) 
    1384                             .addComponent(dateLabel) 
    1385                             .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1386                             .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1387                                 .addComponent(userDataTimeStampField, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1388                                 .addGroup(jPanel11Layout.createSequentialGroup() 
    1389                                     .addComponent(userDataDateField, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1390                                     .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1391                                     .addComponent(timeLabel) 
    1392                                     .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1393                                     .addComponent(userDataTimeField, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1394                             .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1395                             .addComponent(userDataStampButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
     1498                .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1499                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1500                .addGroup(jPanel11Layout.createSequentialGroup() 
     1501                .addContainerGap() 
     1502                .addComponent(timeStampsLabel) 
     1503                .addGap(310, 310, 310)) 
     1504                .addGroup(jPanel11Layout.createSequentialGroup() 
     1505                .addGap(27, 27, 27) 
     1506                .addComponent(dateLabel) 
     1507                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1508                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1509                .addComponent(userDataTimeStampField, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1510                .addGroup(jPanel11Layout.createSequentialGroup() 
     1511                .addComponent(userDataDateField, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1512                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1513                .addComponent(timeLabel) 
     1514                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1515                .addComponent(userDataTimeField, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1516                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1517                .addComponent(userDataStampButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
    13961518                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    13971519                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1398                     .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) 
    1399                     .addGroup(jPanel11Layout.createSequentialGroup() 
    1400                         .addComponent(dataFieldsLabel) 
    1401                         .addGap(0, 0, Short.MAX_VALUE)) 
    1402                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup() 
    1403                         .addGap(0, 90, Short.MAX_VALUE) 
    1404                         .addComponent(userDataDataField, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1405                         .addGap(18, 18, 18) 
    1406                         .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1407                             .addComponent(userDataCancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE) 
    1408                             .addComponent(userDataSaveButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
    1409                 .addContainerGap()) 
    1410         ); 
     1520                .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) 
     1521                .addGroup(jPanel11Layout.createSequentialGroup() 
     1522                .addComponent(dataFieldsLabel) 
     1523                .addGap(0, 0, Short.MAX_VALUE)) 
     1524                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup() 
     1525                .addGap(0, 90, Short.MAX_VALUE) 
     1526                .addComponent(userDataDataField, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1527                .addGap(18, 18, 18) 
     1528                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1529                .addComponent(userDataCancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE) 
     1530                .addComponent(userDataSaveButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
     1531                .addContainerGap())); 
    14111532        jPanel11Layout.setVerticalGroup( 
    1412             jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1413             .addGroup(jPanel11Layout.createSequentialGroup() 
     1533                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1534                .addGroup(jPanel11Layout.createSequentialGroup() 
    14141535                .addContainerGap() 
    14151536                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1416                     .addComponent(timeStampsLabel) 
    1417                     .addComponent(dataFieldsLabel)) 
     1537                .addComponent(timeStampsLabel) 
     1538                .addComponent(dataFieldsLabel)) 
    14181539                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    14191540                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1420                     .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE) 
    1421                     .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) 
     1541                .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE) 
     1542                .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) 
    14221543                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    14231544                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1424                     .addComponent(userDataTimeStampField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1425                     .addComponent(userDataCancelButton)) 
     1545                .addComponent(userDataTimeStampField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1546                .addComponent(userDataCancelButton)) 
    14261547                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    14271548                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1428                     .addComponent(dateLabel) 
    1429                     .addComponent(userDataDateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1430                     .addComponent(timeLabel) 
    1431                     .addComponent(userDataTimeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1432                     .addComponent(userDataStampButton) 
    1433                     .addComponent(userDataSaveButton) 
    1434                     .addComponent(userDataDataField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1435                 .addContainerGap()) 
    1436         ); 
     1549                .addComponent(dateLabel) 
     1550                .addComponent(userDataDateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1551                .addComponent(timeLabel) 
     1552                .addComponent(userDataTimeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1553                .addComponent(userDataStampButton) 
     1554                .addComponent(userDataSaveButton) 
     1555                .addComponent(userDataDataField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1556                .addContainerGap())); 
    14371557 
    14381558        javax.swing.GroupLayout userDataPaneLayout = new javax.swing.GroupLayout(userDataPane); 
    14391559        userDataPane.setLayout(userDataPaneLayout); 
    14401560        userDataPaneLayout.setHorizontalGroup( 
    1441             userDataPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1442             .addGroup(userDataPaneLayout.createSequentialGroup() 
     1561                userDataPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1562                .addGroup(userDataPaneLayout.createSequentialGroup() 
    14431563                .addContainerGap() 
    14441564                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1445                 .addContainerGap()) 
    1446         ); 
     1565                .addContainerGap())); 
    14471566        userDataPaneLayout.setVerticalGroup( 
    1448             userDataPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1449             .addGroup(userDataPaneLayout.createSequentialGroup() 
     1567                userDataPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1568                .addGroup(userDataPaneLayout.createSequentialGroup() 
    14501569                .addContainerGap() 
    14511570                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1452                 .addGap(28, 28, 28)) 
    1453         ); 
     1571                .addGap(28, 28, 28))); 
    14541572 
    14551573        attachmentsPane.setPreferredSize(new java.awt.Dimension(809, 300)); 
    14561574 
    14571575        attachmentsTable.setModel(new javax.swing.table.DefaultTableModel( 
    1458             null,new String [] { 
    1459                 "Data", "Attachment Type", "Size", "Description"} 
    1460         )); 
     1576                null, new String[] 
     1577        { 
     1578            "Data", "Attachment Type", "Size", "Description" 
     1579        })); 
    14611580        jScrollPane12.setViewportView(attachmentsTable); 
    14621581 
     
    14661585 
    14671586        attachmentsDescriptionField.setEditable(false); 
    1468          
     1587 
    14691588        attachmentsBrowseButton.setText("jButton38"); 
    14701589        attachmentsBrowseButton.setEnabled(false); 
    1471        
     1590 
    14721591        descriptionLabel.setText("Description:"); 
    14731592 
     
    14871606        attachmentsPane.setLayout(attachmentsPaneLayout); 
    14881607        attachmentsPaneLayout.setHorizontalGroup( 
    1489             attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1490             .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1608                attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1609                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    14911610                .addContainerGap() 
    14921611                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE) 
    14931612                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    14941613                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1495                     .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    1496                         .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1497                             .addComponent(fileNameLabel) 
    1498                             .addComponent(descriptionLabel)) 
    1499                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1500                         .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1501                             .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    1502                                 .addComponent(attachmentsFileNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1503                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1504                                 .addComponent(attachmentsBrowseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1505                                 .addGap(0, 27, Short.MAX_VALUE)) 
    1506                             .addComponent(attachmentsDescriptionField))) 
    1507                     .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    1508                         .addComponent(attachmentsAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1509                         .addGap(0, 0, 0) 
    1510                         .addComponent(attachmentsDeleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1511                         .addGap(0, 0, 0) 
    1512                         .addComponent(attachmentsCancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1513                         .addGap(0, 0, 0) 
    1514                         .addComponent(attachmentsSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1515                         .addGap(0, 0, Short.MAX_VALUE))) 
    1516                 .addContainerGap()) 
    1517         ); 
     1614                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1615                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     1616                .addComponent(fileNameLabel) 
     1617                .addComponent(descriptionLabel)) 
     1618                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1619                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1620                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1621                .addComponent(attachmentsFileNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1622                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1623                .addComponent(attachmentsBrowseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1624                .addGap(0, 27, Short.MAX_VALUE)) 
     1625                .addComponent(attachmentsDescriptionField))) 
     1626                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1627                .addComponent(attachmentsAddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1628                .addGap(0, 0, 0) 
     1629                .addComponent(attachmentsDeleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1630                .addGap(0, 0, 0) 
     1631                .addComponent(attachmentsCancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1632                .addGap(0, 0, 0) 
     1633                .addComponent(attachmentsSaveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1634                .addGap(0, 0, Short.MAX_VALUE))) 
     1635                .addContainerGap())); 
    15181636        attachmentsPaneLayout.setVerticalGroup( 
    1519             attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1520             .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1637                attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1638                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    15211639                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1522                     .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    1523                         .addContainerGap() 
    1524                         .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1525                     .addGroup(attachmentsPaneLayout.createSequentialGroup() 
    1526                         .addGap(37, 37, 37) 
    1527                         .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1528                             .addComponent(fileNameLabel) 
    1529                             .addComponent(attachmentsFileNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1530                             .addComponent(attachmentsBrowseButton)) 
    1531                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1532                         .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1533                             .addComponent(descriptionLabel) 
    1534                             .addComponent(attachmentsDescriptionField, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1535                         .addGap(36, 36, 36) 
    1536                         .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1537                             .addComponent(attachmentsAddButton) 
    1538                             .addComponent(attachmentsDeleteButton) 
    1539                             .addComponent(attachmentsCancelButton) 
    1540                             .addComponent(attachmentsSaveButton)))) 
    1541                 .addGap(48, 48, 48)) 
    1542         ); 
     1640                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1641                .addContainerGap() 
     1642                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1643                .addGroup(attachmentsPaneLayout.createSequentialGroup() 
     1644                .addGap(37, 37, 37) 
     1645                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1646                .addComponent(fileNameLabel) 
     1647                .addComponent(attachmentsFileNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1648                .addComponent(attachmentsBrowseButton)) 
     1649                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1650                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1651                .addComponent(descriptionLabel) 
     1652                .addComponent(attachmentsDescriptionField, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1653                .addGap(36, 36, 36) 
     1654                .addGroup(attachmentsPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1655                .addComponent(attachmentsAddButton) 
     1656                .addComponent(attachmentsDeleteButton) 
     1657                .addComponent(attachmentsCancelButton) 
     1658                .addComponent(attachmentsSaveButton)))) 
     1659                .addGap(48, 48, 48))); 
    15431660 
    15441661        bottomTabbedPane.addTab("Additional Information", callBacksPane); 
     
    15521669        bottomTabbedPane.addTab("User Data", userDataPane); 
    15531670        bottomTabbedPane.addTab("Attachments", attachmentsPane); 
    1554          
     1671 
    15551672        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 
    15561673        getContentPane().setLayout(layout); 
    15571674        layout.setHorizontalGroup( 
    1558             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1559             .addGroup(layout.createSequentialGroup() 
     1675                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1676                .addGroup(layout.createSequentialGroup() 
    15601677                .addContainerGap() 
    15611678                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1562                     .addGroup(layout.createSequentialGroup() 
    1563                         .addGap(10, 10, 10) 
    1564                         .addComponent(lawLabel) 
    1565                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1566                         .addComponent(lawField, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1567                         .addGap(26, 26, 26) 
    1568                         .addComponent(fireLabel) 
    1569                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1570                         .addComponent(fireField, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1571                         .addGap(18, 18, 18) 
    1572                         .addComponent(emsLabel) 
    1573                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1574                         .addComponent(emsField, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1575                         .addGap(47, 47, 47)) 
    1576                     .addGroup(layout.createSequentialGroup() 
    1577                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1578                             .addGroup(layout.createSequentialGroup() 
    1579                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1580                                     .addGroup(layout.createSequentialGroup() 
    1581                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1582                                             .addComponent(jLabel8) 
    1583                                             .addComponent(mediaLabel) 
    1584                                             .addComponent(agencyLabel) 
    1585                                             .addComponent(locationLabel) 
    1586                                             .addComponent(mapLocLabel)) 
    1587                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1588                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1589                                             .addGroup(layout.createSequentialGroup() 
    1590                                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1591                                                     .addGroup(layout.createSequentialGroup() 
    1592                                                         .addComponent(agencyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1593                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1594                                                         .addComponent(typeCodeLabel) 
    1595                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1596                                                         .addComponent(typeCodeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1597                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1598                                                         .addComponent(priLabel) 
    1599                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1600                                                         .addComponent(priComboBox, 0, 1, Short.MAX_VALUE)) 
    1601                                                     .addGroup(layout.createSequentialGroup() 
    1602                                                         .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1603                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1604                                                         .addComponent(aptLabel) 
    1605                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1606                                                         .addComponent(aptField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1607                                                     .addComponent(locationField, javax.swing.GroupLayout.PREFERRED_SIZE, 286, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1608                                                     .addGroup(layout.createSequentialGroup() 
    1609                                                         .addComponent(mediaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1610                                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1611                                                         .addComponent(confidentialCommentCheckBox))) 
    1612                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1613                                                 .addComponent(rightOfPriButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1614                                             .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1615                                     .addGroup(layout.createSequentialGroup() 
    1616                                         .addGap(35, 35, 35) 
    1617                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1618                                             .addComponent(addFspChpButton) 
    1619                                             .addComponent(hubXterButton)) 
    1620                                         .addGap(32, 32, 32) 
    1621                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1622                                             .addComponent(aniAliButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1623                                             .addComponent(unitRecButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1624                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1625                                             .addComponent(updateMapLocButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1626                                             .addComponent(showAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1627                                         .addGap(51, 51, 51) 
    1628                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1629                                             .addGroup(layout.createSequentialGroup() 
    1630                                                 .addComponent(sentToQButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1631                                                 .addGap(0, 0, 0) 
    1632                                                 .addComponent(fileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1633                                             .addComponent(exitSendButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
    1634                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1635                                     .addGroup(layout.createSequentialGroup() 
    1636                                         .addGap(20, 20, 20) 
    1637                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1638                                             .addComponent(crossStLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    1639                                             .addComponent(cityLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    1640                                             .addComponent(rpLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    1641                                             .addComponent(phoneLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    1642                                             .addComponent(aliLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    1643                                             .addComponent(rpTypeLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
    1644                                             .addComponent(sectorLabel, javax.swing.GroupLayout.Alignment.TRAILING)) 
    1645                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1646                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1647                                             .addComponent(crossStField) 
    1648                                             .addGroup(layout.createSequentialGroup() 
    1649                                                 .addComponent(cityComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1650                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1651                                                 .addComponent(countyLabel) 
    1652                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1653                                                 .addComponent(countyComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    1654                                             .addComponent(rpField) 
    1655                                             .addGroup(layout.createSequentialGroup() 
    1656                                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1657                                                     .addGroup(layout.createSequentialGroup() 
    1658                                                         .addComponent(sectorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1659                                                         .addGap(18, 18, 18) 
    1660                                                         .addComponent(beatLabel)) 
    1661                                                     .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    1662                                                         .addGroup(layout.createSequentialGroup() 
    1663                                                             .addComponent(phoneField, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1664                                                             .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1665                                                             .addComponent(extLabel) 
    1666                                                             .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1667                                                             .addComponent(extField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1668                                                         .addComponent(rpTypeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1669                                                         .addComponent(aliField, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1670                                                 .addGap(0, 0, Short.MAX_VALUE)))) 
    1671                                     .addGroup(layout.createSequentialGroup() 
    1672                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1673                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1674                                             .addGroup(layout.createSequentialGroup() 
    1675                                                 .addComponent(informationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1676                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1677                                                 .addComponent(carButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1678                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1679                                                 .addComponent(personButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1680                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1681                                                 .addComponent(towRotationButton)) 
    1682                                             .addGroup(layout.createSequentialGroup() 
    1683                                                 .addComponent(mapButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1684                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1685                                                 .addComponent(premiseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1686                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1687                                                 .addComponent(historyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1688                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1689                                                 .addComponent(cautionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1690                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1691                                             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 
    1692                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1693                                                 .addComponent(addButton) 
    1694                                                 .addGap(45, 45, 45)) 
    1695                                             .addGroup(layout.createSequentialGroup() 
    1696                                                 .addGap(6, 6, 6) 
    1697                                                 .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1698                                             .addGroup(layout.createSequentialGroup() 
    1699                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
    1700                                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1701                                                     .addComponent(licensePlateInfoLabel) 
    1702                                                     .addGroup(layout.createSequentialGroup() 
    1703                                                         .addGap(30, 30, 30) 
    1704                                                         .addComponent(beatComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))))) 
    1705                             .addComponent(bottomTabbedPane, javax.swing.GroupLayout.Alignment.TRAILING)) 
    1706                         .addContainerGap()))) 
    1707         ); 
     1679                .addGroup(layout.createSequentialGroup() 
     1680                .addGap(10, 10, 10) 
     1681                .addComponent(lawLabel) 
     1682                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1683                .addComponent(lawField, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1684                .addGap(26, 26, 26) 
     1685                .addComponent(fireLabel) 
     1686                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1687                .addComponent(fireField, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1688                .addGap(18, 18, 18) 
     1689                .addComponent(emsLabel) 
     1690                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1691                .addComponent(emsField, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1692                .addGap(47, 47, 47)) 
     1693                .addGroup(layout.createSequentialGroup() 
     1694                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1695                .addGroup(layout.createSequentialGroup() 
     1696                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1697                .addGroup(layout.createSequentialGroup() 
     1698                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     1699                .addComponent(jLabel8) 
     1700                .addComponent(mediaLabel) 
     1701                .addComponent(agencyLabel) 
     1702                .addComponent(locationLabel) 
     1703                .addComponent(mapLocLabel)) 
     1704                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1705                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1706                .addGroup(layout.createSequentialGroup() 
     1707                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1708                .addGroup(layout.createSequentialGroup() 
     1709                .addComponent(agencyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1710                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1711                .addComponent(typeCodeLabel) 
     1712                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1713                .addComponent(typeCodeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1714                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1715                .addComponent(priLabel) 
     1716                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1717                .addComponent(priComboBox, 0, 1, Short.MAX_VALUE)) 
     1718                .addGroup(layout.createSequentialGroup() 
     1719                .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1720                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1721                .addComponent(aptLabel) 
     1722                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1723                .addComponent(aptField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1724                .addComponent(locationField, javax.swing.GroupLayout.PREFERRED_SIZE, 286, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1725                .addGroup(layout.createSequentialGroup() 
     1726                .addComponent(mediaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1727                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1728                .addComponent(confidentialCommentCheckBox))) 
     1729                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1730                .addComponent(rightOfPriButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1731                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1732                .addGroup(layout.createSequentialGroup() 
     1733                .addGap(35, 35, 35) 
     1734                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1735                .addComponent(addFspChpButton) 
     1736                .addComponent(hubXterButton)) 
     1737                .addGap(32, 32, 32) 
     1738                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     1739                .addComponent(aniAliButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1740                .addComponent(unitRecButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1741                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1742                .addComponent(updateMapLocButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1743                .addComponent(showAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1744                .addGap(51, 51, 51) 
     1745                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1746                .addGroup(layout.createSequentialGroup() 
     1747                .addComponent(sentToQButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1748                .addGap(0, 0, 0) 
     1749                .addComponent(fileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1750                .addComponent(exitSendButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
     1751                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1752                .addGroup(layout.createSequentialGroup() 
     1753                .addGap(20, 20, 20) 
     1754                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1755                .addComponent(crossStLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     1756                .addComponent(cityLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     1757                .addComponent(rpLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     1758                .addComponent(phoneLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     1759                .addComponent(aliLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     1760                .addComponent(rpTypeLabel, javax.swing.GroupLayout.Alignment.TRAILING) 
     1761                .addComponent(sectorLabel, javax.swing.GroupLayout.Alignment.TRAILING)) 
     1762                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1763                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1764                .addComponent(crossStField) 
     1765                .addGroup(layout.createSequentialGroup() 
     1766                .addComponent(cityComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1767                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1768                .addComponent(countyLabel) 
     1769                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1770                .addComponent(countyComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
     1771                .addComponent(rpField) 
     1772                .addGroup(layout.createSequentialGroup() 
     1773                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1774                .addGroup(layout.createSequentialGroup() 
     1775                .addComponent(sectorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1776                .addGap(18, 18, 18) 
     1777                .addComponent(beatLabel)) 
     1778                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     1779                .addGroup(layout.createSequentialGroup() 
     1780                .addComponent(phoneField, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1781                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1782                .addComponent(extLabel) 
     1783                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1784                .addComponent(extField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1785                .addComponent(rpTypeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1786                .addComponent(aliField, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1787                .addGap(0, 0, Short.MAX_VALUE)))) 
     1788                .addGroup(layout.createSequentialGroup() 
     1789                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1790                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1791                .addGroup(layout.createSequentialGroup() 
     1792                .addComponent(informationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1793                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1794                .addComponent(carButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1795                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1796                .addComponent(personButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1797                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1798                .addComponent(towRotationButton)) 
     1799                .addGroup(layout.createSequentialGroup() 
     1800                .addComponent(mapButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1801                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1802                .addComponent(premiseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1803                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1804                .addComponent(historyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1805                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1806                .addComponent(cautionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1807                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1808                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 
     1809                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1810                .addComponent(addButton) 
     1811                .addGap(45, 45, 45)) 
     1812                .addGroup(layout.createSequentialGroup() 
     1813                .addGap(6, 6, 6) 
     1814                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1815                .addGroup(layout.createSequentialGroup() 
     1816                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 
     1817                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1818                .addComponent(licensePlateInfoLabel) 
     1819                .addGroup(layout.createSequentialGroup() 
     1820                .addGap(30, 30, 30) 
     1821                .addComponent(beatComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))))) 
     1822                .addComponent(bottomTabbedPane, javax.swing.GroupLayout.Alignment.TRAILING)) 
     1823                .addContainerGap())))); 
    17081824        layout.setVerticalGroup( 
    1709             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1710             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 
     1825                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1826                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 
    17111827                .addContainerGap() 
    17121828                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1713                     .addComponent(mapLocLabel) 
    1714                     .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1715                     .addComponent(aptLabel) 
    1716                     .addComponent(aptField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1717                     .addComponent(crossStLabel) 
    1718                     .addComponent(crossStField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1829                .addComponent(mapLocLabel) 
     1830                .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1831                .addComponent(aptLabel) 
     1832                .addComponent(aptField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1833                .addComponent(crossStLabel) 
     1834                .addComponent(crossStField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    17191835                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    17201836                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1721                     .addComponent(locationLabel) 
    1722                     .addComponent(locationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1723                     .addComponent(cityLabel) 
    1724                     .addComponent(cityComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1725                     .addComponent(countyLabel) 
    1726                     .addComponent(countyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1837                .addComponent(locationLabel) 
     1838                .addComponent(locationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1839                .addComponent(cityLabel) 
     1840                .addComponent(cityComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1841                .addComponent(countyLabel) 
     1842                .addComponent(countyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    17271843                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    17281844                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1729                     .addGroup(layout.createSequentialGroup() 
    1730                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1731                             .addComponent(agencyLabel) 
    1732                             .addComponent(agencyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1733                             .addComponent(typeCodeLabel) 
    1734                             .addComponent(typeCodeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1735                             .addComponent(priLabel) 
    1736                             .addComponent(priComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1737                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1738                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1739                             .addComponent(mediaLabel) 
    1740                             .addComponent(mediaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1741                             .addComponent(confidentialCommentCheckBox))) 
    1742                     .addGroup(layout.createSequentialGroup() 
    1743                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1744                             .addComponent(rpLabel) 
    1745                             .addComponent(rpField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1746                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1747                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1748                             .addComponent(phoneLabel) 
    1749                             .addComponent(phoneField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1750                             .addComponent(extLabel) 
    1751                             .addComponent(extField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1752                     .addComponent(rightOfPriButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1845                .addGroup(layout.createSequentialGroup() 
     1846                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1847                .addComponent(agencyLabel) 
     1848                .addComponent(agencyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1849                .addComponent(typeCodeLabel) 
     1850                .addComponent(typeCodeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1851                .addComponent(priLabel) 
     1852                .addComponent(priComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1853                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1854                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1855                .addComponent(mediaLabel) 
     1856                .addComponent(mediaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1857                .addComponent(confidentialCommentCheckBox))) 
     1858                .addGroup(layout.createSequentialGroup() 
     1859                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1860                .addComponent(rpLabel) 
     1861                .addComponent(rpField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1862                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1863                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1864                .addComponent(phoneLabel) 
     1865                .addComponent(phoneField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1866                .addComponent(extLabel) 
     1867                .addComponent(extField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1868                .addComponent(rightOfPriButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    17531869                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    17541870                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1755                     .addGroup(layout.createSequentialGroup() 
    1756                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1757                             .addComponent(aliField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1758                             .addComponent(aliLabel)) 
    1759                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1760                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1761                             .addComponent(rpTypeLabel) 
    1762                             .addComponent(rpTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1763                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1764                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1765                             .addComponent(sectorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1766                             .addComponent(beatLabel) 
    1767                             .addComponent(beatComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1768                             .addComponent(sectorLabel)) 
    1769                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1770                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1771                             .addGroup(layout.createSequentialGroup() 
    1772                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1773                                     .addComponent(carButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1774                                     .addComponent(informationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1775                                     .addComponent(personButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1776                                     .addComponent(towRotationButton)) 
    1777                                 .addGap(15, 15, 15) 
    1778                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1779                                     .addComponent(mapButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1780                                     .addComponent(premiseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1781                                     .addComponent(historyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1782                                     .addComponent(cautionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1783                             .addGroup(layout.createSequentialGroup() 
    1784                                 .addComponent(licensePlateInfoLabel) 
    1785                                 .addGap(4, 4, 4) 
    1786                                 .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1787                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1788                                 .addComponent(addButton)))) 
    1789                     .addGroup(layout.createSequentialGroup() 
    1790                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    1791                             .addGroup(layout.createSequentialGroup() 
    1792                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1793                                     .addComponent(jLabel8) 
    1794                                     .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1795                                 .addGap(0, 0, 0) 
    1796                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1797                                     .addComponent(aniAliButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1798                                     .addComponent(updateMapLocButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1799                                     .addComponent(hubXterButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1800                             .addComponent(exitSendButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1801                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1802                             .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1803                                 .addComponent(unitRecButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1804                                 .addComponent(showAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1805                                 .addComponent(sentToQButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1806                                 .addComponent(fileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1807                             .addComponent(addFspChpButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
     1871                .addGroup(layout.createSequentialGroup() 
     1872                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1873                .addComponent(aliField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1874                .addComponent(aliLabel)) 
     1875                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1876                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1877                .addComponent(rpTypeLabel) 
     1878                .addComponent(rpTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1879                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1880                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1881                .addComponent(sectorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1882                .addComponent(beatLabel) 
     1883                .addComponent(beatComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1884                .addComponent(sectorLabel)) 
     1885                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1886                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1887                .addGroup(layout.createSequentialGroup() 
     1888                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1889                .addComponent(carButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1890                .addComponent(informationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1891                .addComponent(personButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1892                .addComponent(towRotationButton)) 
     1893                .addGap(15, 15, 15) 
     1894                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1895                .addComponent(mapButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1896                .addComponent(premiseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1897                .addComponent(historyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1898                .addComponent(cautionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1899                .addGroup(layout.createSequentialGroup() 
     1900                .addComponent(licensePlateInfoLabel) 
     1901                .addGap(4, 4, 4) 
     1902                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1903                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1904                .addComponent(addButton)))) 
     1905                .addGroup(layout.createSequentialGroup() 
     1906                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     1907                .addGroup(layout.createSequentialGroup() 
     1908                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1909                .addComponent(jLabel8) 
     1910                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1911                .addGap(0, 0, 0) 
     1912                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1913                .addComponent(aniAliButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1914                .addComponent(updateMapLocButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1915                .addComponent(hubXterButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1916                .addComponent(exitSendButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1917                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1918                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1919                .addComponent(unitRecButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1920                .addComponent(showAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1921                .addComponent(sentToQButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1922                .addComponent(fileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1923                .addComponent(addFspChpButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
    18081924                .addGap(5, 5, 5) 
    18091925                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1810                     .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1811                         .addComponent(lawLabel) 
    1812                         .addComponent(lawField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1813                     .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    1814                         .addComponent(fireLabel) 
    1815                         .addComponent(fireField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1816                         .addComponent(emsLabel) 
    1817                         .addComponent(emsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
     1926                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1927                .addComponent(lawLabel) 
     1928                .addComponent(lawField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1929                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     1930                .addComponent(fireLabel) 
     1931                .addComponent(fireField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1932                .addComponent(emsLabel) 
     1933                .addComponent(emsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    18181934                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    18191935                .addComponent(bottomTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 330, Short.MAX_VALUE) 
    1820                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    1821         ); 
     1936                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); 
    18221937 
    18231938        pack(); 
    1824     }// </editor-fold>   
    1825  
    1826     public JButton makeButton(ImageIcon image, ActionListener listener){ 
     1939    }// </editor-fold> 
     1940 
     1941    public JButton makeButton(ImageIcon image, ActionListener listener) 
     1942    { 
    18271943        JButton button = new JButton(image); 
    18281944        Dimension size = new Dimension(image.getImage().getWidth(null), image.getImage().getHeight(null)); 
     
    18341950        return button; 
    18351951    } 
    1836      
     1952 
    18371953    /* 
    18381954     * Updates the data stored in the incidents class upon exit. 
    18391955     */ 
    1840     public void saveInformation(int incidentId) { 
    1841         try { 
     1956    public void saveInformation() 
     1957    { 
     1958        try 
     1959        { 
    18421960            ScreenManager.theCoordinator.setCadDataIncLoc(INC_LOC.ADDRESS, 
    18431961                    incidentId, addressField.getText()); 
     
    18811999            ScreenManager.theCoordinator.setCadDataIncLoc(INC_LOC.BEAT, 
    18822000                    incidentId, (String) beatComboBox.getSelectedItem()); 
    1883         } catch (RemoteException e) { 
     2001        } catch (RemoteException e) 
     2002        { 
    18842003            e.printStackTrace(); 
    18852004        } 
     
    18882007    /* 
    18892008     * Updates all the strings. 
    1890      *  
     2009     * 
    18912010     * @see tmcsimulator.cadclient.data.cadData.vectorForIncidentViewer(String 
    18922011     * incidentId) for matching up strings. 
    18932012     */ 
    1894     public void refreshInformation(int incidentId) { 
    1895         this.incidentId = incidentId; 
    1896         try { 
     2013    public void refreshInformation() 
     2014    { 
     2015        try 
     2016        { 
    18972017            addressField.setText(ScreenManager.theCoordinator.getCadDataIncLoc( 
    18982018                    INC_LOC.ADDRESS, incidentId)); 
     
    19192039            addInfoIncidentNumField 
    19202040                    .setText((String) ScreenManager.theCoordinator 
    1921                             .getCadDataIncVal(INC_VAL.MASTER_INC, incidentId)); 
     2041                    .getCadDataIncVal(INC_VAL.MASTER_INC, incidentId)); 
    19222042            addInfoIncidentTypeField.setText(ScreenManager.theCoordinator 
    19232043                    .getCadDataIncAddInfo(INC_ADD_INFO.TYPE, incidentId)); 
     
    19282048            addInfoCallTakerPhoneExtField.setText(ScreenManager.theCoordinator 
    19292049                    .getCadDataIncAddInfo(INC_ADD_INFO.CALL_TAKER_EXT, 
    1930                             incidentId)); 
     2050                    incidentId)); 
    19312051            addInfoCallStatusField 
    19322052                    .setText(ScreenManager.theCoordinator.getCadDataIncAddInfo( 
    1933                             INC_ADD_INFO.CALL_STATUS, incidentId)); 
     2053                    INC_ADD_INFO.CALL_STATUS, incidentId)); 
    19342054            addInfoAlarmLevelField 
    19352055                    .setText(ScreenManager.theCoordinator.getCadDataIncAddInfo( 
    1936                             INC_ADD_INFO.ALARM_LEVEL, incidentId)); 
     2056                    INC_ADD_INFO.ALARM_LEVEL, incidentId)); 
    19372057            addInfoRotationProviderAreaField 
    19382058                    .setText(ScreenManager.theCoordinator.getCadDataIncAddInfo( 
    1939                             INC_ADD_INFO.ROTATION_PROVIDER_AREA, incidentId)); 
     2059                    INC_ADD_INFO.ROTATION_PROVIDER_AREA, incidentId)); 
    19402060            addInfoCommentsField.setText(ScreenManager.theCoordinator 
    19412061                    .getCadDataIncAddInfo(INC_ADD_INFO.COMMENT, incidentId)); 
     
    19652085            rpTypeComboBox 
    19662086                    .setSelectedItem((String) ScreenManager.theCoordinator 
    1967                             .getCadDataIncVal(INC_VAL.RP_TYPE, incidentId)); 
     2087                    .getCadDataIncVal(INC_VAL.RP_TYPE, incidentId)); 
    19682088            sectorComboBox.setSelectedItem(ScreenManager.theCoordinator 
    19692089                    .getCadDataIncLoc(INC_LOC.SECTOR, incidentId)); 
     
    19722092 
    19732093            // callBackCommentTable.setModel(cadData.getIncident(incidentId).getCallBackCommentTable()); 
    1974         } catch (RemoteException e) { 
     2094        } catch (RemoteException e) 
     2095        { 
    19752096            e.printStackTrace(); 
    19762097        } 
     
    19822103     * Displays the information of the latest incident clicked. 
    19832104     */ 
    1984     public void open(int incidentId) { 
    1985         try { 
     2105    public void open() 
     2106    { 
     2107        try 
     2108        { 
    19862109            if (!ScreenManager.theCoordinator 
    1987                     .checkForValidIncidentID(incidentId)) { 
     2110                    .checkForValidIncidentID(incidentId)) 
     2111            { 
    19882112                return; 
    19892113            } 
    19902114 
    1991             stack.push(incidentId); 
    1992             refreshInformation(incidentId); 
     2115            // stack.push(incidentId);  JD removed stack, it was broken 
     2116            refreshInformation(); 
    19932117            setTitle("Incident Viewer- Incident ID [" 
    19942118                    + ScreenManager.theCoordinator.getCadDataIncVal( 
    1995                             INC_VAL.LOG_NUM, incidentId) 
     2119                    INC_VAL.LOG_NUM, incidentId) 
    19962120                    + "]   Master Incident ID[" 
    19972121                    + ScreenManager.theCoordinator.getCadDataIncVal( 
    1998                             INC_VAL.MASTER_INC, incidentId) + "]"); 
     2122                    INC_VAL.MASTER_INC, incidentId) + "]"); 
    19992123            setVisible(true); 
    20002124            bottomTabbedPane.setSelectedIndex(4); 
    20012125            commentsNotesTable.setModel(ScreenManager.theCoordinator 
    20022126                    .getCadDataIncidentTable(INC_TABLE.COMMENTS_NOTES, 
    2003                             incidentId)); 
     2127                    incidentId)); 
    20042128            commentsNotesTable.getColumnModel().getColumn(0).setPreferredWidth(50); 
    20052129            commentsNotesTable.getColumnModel().getColumn(1).setPreferredWidth(50); 
     
    20072131            commentsNotesTable.getColumnModel().getColumn(3).setPreferredWidth(15); 
    20082132            commentsNotesTable.getColumnModel().getColumn(4).setPreferredWidth(400); 
     2133            commentsNotesTable.getColumnModel().getColumn(4).setCellRenderer(new LogEntryCellRenderer()); 
     2134 
    20092135            commentsNotesField.setText(""); 
    20102136            commentsNotesField.setEditable(false); 
     2137            commentsNotesField.setBackground(java.awt.Color.LIGHT_GRAY); // JD 
    20112138            commentsNotesAddButton.setEnabled(true); 
    20122139            commentsNotesCancelButton.setEnabled(false); 
    20132140            commentsNotesSaveButton.setEnabled(false); 
    2014         } catch (RemoteException e) { 
     2141 
     2142        } catch (RemoteException e) 
     2143        { 
    20152144            e.printStackTrace(); 
    20162145        } 
    20172146    } 
    20182147 
     2148    // JD  Invoked by timer every 5 seconds. 
     2149    public void refreshCommentsNotesTable() 
     2150    { 
     2151        try 
     2152        { 
     2153            commentsNotesTable.setModel(ScreenManager.theCoordinator 
     2154                    .getCadDataIncidentTable(INC_TABLE.COMMENTS_NOTES, 
     2155                    incidentId)); 
     2156            //Set up tool tips for the comments column 
     2157            commentsNotesTable.getColumnModel().getColumn(4).setCellRenderer(new LogEntryCellRenderer()); 
     2158 
     2159            // resets the column widths to preferred width 
     2160            // this will essentially mean any user changes are reset 
     2161            commentsNotesTable.getColumnModel().getColumn(0).setPreferredWidth(50); 
     2162            commentsNotesTable.getColumnModel().getColumn(1).setPreferredWidth(50); 
     2163            commentsNotesTable.getColumnModel().getColumn(2).setPreferredWidth(15); 
     2164            commentsNotesTable.getColumnModel().getColumn(3).setPreferredWidth(15); 
     2165            commentsNotesTable.getColumnModel().getColumn(4).setPreferredWidth(400); 
     2166        } catch (RemoteException e) 
     2167        { 
     2168            e.printStackTrace(); 
     2169        } 
     2170    } 
    20192171    /* 
    20202172     * Closes the information of the latest incident clicked. Closes screen if 
    20212173     * there were no previous incidents in the stack. 
    20222174     */ 
    2023     public void close() { 
    2024         saveInformation(stack.peek()); 
    2025         stack.pop(); 
    2026         if (stack.empty()) { 
    2027             setVisible(false); 
    2028         } else { 
    2029             refreshInformation(stack.peek()); 
    2030             try { 
    2031                 setTitle("Incident Viewer- Incident ID [" 
    2032                         + ScreenManager.theCoordinator.getCadDataIncVal( 
    2033                                 INC_VAL.LOG_NUM, incidentId) 
    2034                         + "]   Master Incident ID[" 
    2035                         + ScreenManager.theCoordinator.getCadDataIncVal( 
    2036                                 INC_VAL.MASTER_INC, incidentId) + "]"); 
    2037             } catch (RemoteException e) { 
    2038                 e.printStackTrace(); 
    2039             } 
    2040         } 
     2175 
     2176    public void close() 
     2177    {   // JD got rid of the stack, since it was broken anyway. 
     2178        saveInformation(); 
     2179        setVisible(false); 
     2180 
     2181        /*        saveInformation(stack.peek()); 
     2182         stack.pop(); 
     2183         setVisible(false); 
     2184         refreshInformation(stack.peek()); 
     2185         // Is there a defect that this line wasn't coded?  Because when the 
     2186         // incident is closed, all info is refreshed EXCEPT the comments table 
     2187         // commentsNotesTable.setModel(ScreenManager.theCoordinator 
     2188         //     .getCadDataIncidentTable(INC_TABLE.COMMENTS_NOTES, 
     2189         //     incidentId)); 
     2190         try 
     2191         { 
     2192         setTitle("Incident Viewer- Incident ID [" 
     2193         + ScreenManager.theCoordinator.getCadDataIncVal( 
     2194         INC_VAL.LOG_NUM, incidentId) 
     2195         + "]   Master Incident ID[" 
     2196         + ScreenManager.theCoordinator.getCadDataIncVal( 
     2197         INC_VAL.MASTER_INC, incidentId) + "]"); 
     2198         } catch (RemoteException e) 
     2199         { 
     2200         e.printStackTrace(); 
     2201         } 
     2202         */ 
     2203 
    20412204        ScreenManager.refreshScreens(); 
    20422205        ScreenManager.refreshIncidentEditor(); 
    20432206    } 
    2044  
    20452207    // Variables declaration - do not modify//GEN-BEGIN:variables 
    20462208    private javax.swing.JPanel activitiesPane; 
     
    21042266    private javax.swing.JButton commentsNotesCancelButton; 
    21052267    private javax.swing.JCheckBox commentsNotesConfidentialCommentCheckBox; 
    2106     private javax.swing.JTextField commentsNotesField; 
     2268    private javax.swing.JTextArea commentsNotesField; // JD 
    21072269    private javax.swing.JButton commentsNotesNotifyButton; 
    21082270    private javax.swing.JPanel commentsNotesPane; 
  • trunk/src/tmcsim/client/cadclientgui/screens/Login.java

    r3 r59  
    22 
    33import java.awt.Color; 
     4import static java.awt.Component.LEFT_ALIGNMENT; 
    45import java.awt.Dimension; 
    56import java.awt.Font; 
    67import java.awt.event.ActionEvent; 
    78import java.awt.event.ActionListener; 
    8  
    99import javax.swing.Box; 
    1010import javax.swing.BoxLayout; 
     
    1616import javax.swing.SwingConstants; 
    1717 
    18  
    1918/** 
    20  * This class contains the view and controller for the Login screen. The view was not built using a GUI builder plug-in 
    21  * (but may want to consider doing so in the future), and the controller uses listeners to control how the view and data act.  
    22  *  
     19 * This class contains the view and controller for the Login screen. The view 
     20 * was not built using a GUI builder plug-in (but may want to consider doing so 
     21 * in the future), and the controller uses listeners to control how the view and 
     22 * data act. 
     23 * 
    2324 * @author Vincent 
    2425 */ 
    25  
    26 public class Login extends JFrame { 
    27  
     26public class Login extends JFrame 
     27{ 
    2828    private Box login; 
    2929    private JTextField userNameField; 
    3030    private JTextField passwordField; 
    31  
    32     public Login() { 
     31    public static String kNamePrompt = "Enter your name"; 
     32 
     33    public Login() 
     34    { 
    3335        initView(); 
    3436    } 
    35      
    36     private ActionListener newEnterActionListener(){ 
    37         return new ActionListener() { 
    38             public void actionPerformed(ActionEvent e) { 
     37 
     38    private ActionListener newEnterActionListener() 
     39    { 
     40        return new ActionListener() 
     41        { 
     42            public void actionPerformed(ActionEvent e) 
     43            { 
    3944                setVisible(false); 
    40                 ScreenManager.setUserName(userNameField.getText()); 
     45                // Check if user provided a username JD 
     46                String userEntry = userNameField.getText(); 
     47                if (userEntry.equals(kNamePrompt)) 
     48                { 
     49                    ScreenManager.setUserName("Anonymous Trainee"); 
     50                } 
     51                else 
     52                { 
     53                    ScreenManager.setUserName(userEntry); 
     54                } 
    4155                ScreenManager.openCADMenu(); 
    4256                ScreenManager.openAssignedIncidents(); 
     
    4458                ScreenManager.openPendingIncidents(); 
    4559                ScreenManager.openPowerlineUI(); 
    46                 if (!passwordField.getText().equals("Dispatcher")) { 
     60                if (!passwordField.getText().equals("Dispatcher")) 
     61                { 
    4762                    ScreenManager.setDispatcherAuthority(false); 
    4863                } 
     
    5065        }; 
    5166    } 
    52      
    53     private ActionListener newExitActionListener(){ 
    54         return new ActionListener() { 
    55             public void actionPerformed(ActionEvent e) { 
     67 
     68    private ActionListener newExitActionListener() 
     69    { 
     70        return new ActionListener() 
     71        { 
     72            public void actionPerformed(ActionEvent e) 
     73            { 
    5674                System.exit(0); 
    5775            } 
    5876        }; 
    5977    } 
    60      
    61     private void initView(){ 
     78 
     79    private void initView() 
     80    { 
    6281        login = new Box(BoxLayout.Y_AXIS); 
    6382        login.setAlignmentX(LEFT_ALIGNMENT); 
     
    7897 
    7998        JLabel title = new JLabel(); 
    80         title.setText("Inform CAD 5.3 Patch 5"); 
     99        // Check if we are running from a jar to put message from manifest into title 
     100        Package clientpkg = Login.class.getPackage(); 
     101        String builddate = clientpkg.getImplementationVersion(); 
     102        String version = ""; 
     103        if (builddate != null) 
     104        { 
     105            version = "          (build " + builddate + ")"; 
     106        } 
     107        else // We're running from a dev environment 
     108        { 
     109            version = "           00-00-00 00:00"; 
     110        } 
     111 
     112        title.setText("Inform CAD 5.3 Patch 5 "); 
    81113        title.setHorizontalAlignment(SwingConstants.CENTER); 
    82114        title.setFont(new Font("Arial", Font.PLAIN, 22)); 
     
    87119        blueBackground.add(title); 
    88120 
     121        JLabel builddateLabel = new JLabel(version); 
     122        builddateLabel.setForeground(Color.WHITE); 
     123        builddateLabel.setHorizontalAlignment(SwingConstants.CENTER); 
     124        blueBackground.add(builddateLabel); 
     125 
    89126        Box leftBox = new Box(BoxLayout.Y_AXIS); 
    90127        leftBox.setMaximumSize(new Dimension(350, 50)); 
     
    95132        JLabel userNameLabel = new JLabel("User name "); 
    96133        userNameLabel.setForeground(Color.WHITE); 
    97         userNameField = new JTextField("Enter your name"); 
     134        userNameField = new JTextField(kNamePrompt); 
    98135        Box userNameBox = new Box(BoxLayout.X_AXIS); 
    99136        userNameBox.setAlignmentX(LEFT_ALIGNMENT); 
     
    105142        JLabel passwordLabel = new JLabel("Password  "); 
    106143        passwordLabel.setForeground(Color.WHITE); 
    107         passwordField = new JTextField("Does not matter"); 
     144        passwordField = new JTextField("Not required"); 
    108145        Box passwordBox = new Box(BoxLayout.X_AXIS); 
    109146        passwordBox.setAlignmentX(LEFT_ALIGNMENT); 
  • trunk/src/tmcsim/client/cadclientgui/screens/PendingIncidents.java

    r3 r59  
    44import java.awt.Component; 
    55import java.awt.Dimension; 
     6import java.awt.Point; 
    67import java.awt.Toolkit; 
    78import java.awt.datatransfer.DataFlavor; 
     
    1415import java.rmi.RemoteException; 
    1516import java.util.List; 
    16  
    1717import javax.swing.Box; 
    1818import javax.swing.BoxLayout; 
     
    2323import javax.swing.JTable; 
    2424import javax.swing.ListSelectionModel; 
     25import javax.swing.RowSorter.SortKey; 
    2526import javax.swing.SwingUtilities; 
    2627import javax.swing.TransferHandler; 
    27 import javax.swing.RowSorter.SortKey; 
    2828import javax.swing.table.DefaultTableModel; 
    2929import javax.swing.table.TableCellRenderer; 
    30  
    3130import tmcsim.client.cadclientgui.enums.CADDataEnums; 
     31import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_VAL; 
     32import tmcsim.client.cadclientgui.enums.CADScriptTags.UNIT_TAGS; 
    3233import tmcsim.client.cadclientgui.enums.IncidentEnums; 
    3334import tmcsim.client.cadclientgui.enums.TableHeaders; 
    3435import tmcsim.client.cadclientgui.enums.UnitStatusEnums; 
    35 import tmcsim.client.cadclientgui.enums.CADDataEnums.INC_VAL; 
    36 import tmcsim.client.cadclientgui.enums.CADScriptTags.UNIT_TAGS; 
    3736 
    3837/** 
    39  * This class contains the view and controller for the PendingIncidents screen. The view was not built using a GUI builder plug-in 
    40  * (but may want to consider doing so in the future), and the controller uses listeners to control how the view and data act.  
    41  *  
     38 * This class contains the view and controller for the PendingIncidents screen. 
     39 * The view was not built using a GUI builder plug-in (but may want to consider 
     40 * doing so in the future), and the controller uses listeners to control how the 
     41 * view and data act. 
     42 * 
    4243 * @author Vincent 
    4344 */ 
    44  
    45 public class PendingIncidents extends JFrame { 
    46      
     45public class PendingIncidents extends JFrame 
     46{ 
    4747    private final String SCREEN_TITLE = "(Shift + F2) Pending Incidents"; 
    48      
    49     private final Dimension SCREEN_DIMENSIONS = new Dimension(1400,250); 
    50      
    51     private final Dimension DROP_DOWN_MENU_LABEL_DIMENSIONS = new Dimension(170,20); 
    52      
    53     private final Dimension DROP_DOWN_MENU_DIMENSIONS = new Dimension(170,180); 
    54      
     48    private final Dimension SCREEN_DIMENSIONS = new Dimension(1400, 250); 
     49    private final Dimension DROP_DOWN_MENU_LABEL_DIMENSIONS = new Dimension(170, 20); 
     50    private final Dimension DROP_DOWN_MENU_DIMENSIONS = new Dimension(170, 180); 
    5551    private final int COLUMN_WIDTH = 120; 
    56      
    57     private final String[] LABELS = {"Recommend...", "Add Resources...", "Open", "Recall Incident", 
    58             "Cancel", "Link/Append", "Map", "Recall Linked Incidents", "Read Notes", "Mail...", "Fax..."}; 
    59      
     52    private final String[] LABELS = 
     53    { 
     54        "Recommend...", "Add Resources...", "Open", "Recall Incident", 
     55        "Cancel", "Link/Append", "Map", "Recall Linked Incidents", "Read Notes", "Mail...", "Fax..." 
     56    }; 
    6057    private final String LABEL_SPACING = "     "; 
    61      
    6258    private JTable pendingIncidentsTable; 
    6359    private JFrame pendingIncidentsMenu; 
    64      
    6560    //labels for the drop down menu 
    6661    private JLabel[] dropDownLabels = new JLabel[LABELS.length]; 
    67      
    6862    private long lastLeftClick;//used for double clicking feature 
    69      
    70     public PendingIncidents(){ 
     63 
     64    public PendingIncidents() 
     65    { 
    7166        initComponents(); 
    7267    } 
    73          
    74     private void initComponents() { 
     68 
     69    private void initComponents() 
     70    { 
    7571        initializeTable(); 
    7672        initControllers(); 
    7773        initializeDropDownMenu(); 
    78          
    79         JScrollPane scrollpane = new JScrollPane(pendingIncidentsTable ); 
     74 
     75        JScrollPane scrollpane = new JScrollPane(pendingIncidentsTable); 
    8076        scrollpane.getViewport().setBackground(Color.WHITE); 
    81          
     77 
    8278        setTitle(SCREEN_TITLE); 
    8379        setPreferredSize(SCREEN_DIMENSIONS); 
     
    8682        pack(); 
    8783        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); 
    88         setLocation(0, (int) (dim.getHeight()*3/4)); 
     84        setLocation(0, (int) (dim.getHeight() * 3 / 4)); 
    8985        setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); 
    90         setVisible(false);       
    91     } 
    92      
     86        setVisible(false); 
     87    } 
     88 
    9389    /* 
    9490     * Initializes the table and prepares the cell renderer for color management. It initializes the default settings 
    9591     * and handles the drag and drop feature. 
    9692     */ 
    97     private void initializeTable(){ 
    98         pendingIncidentsTable = new JTable(){ 
     93    private void initializeTable() 
     94    { 
     95        pendingIncidentsTable = new JTable() 
     96        { 
    9997            /* 
    10098             * Custom renderer to set different background/foreground colors 
    10199             * @see javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, int, int) 
    102100             */ 
    103             public Component prepareRenderer(TableCellRenderer renderer, int row, int column){ 
     101            public Component prepareRenderer(TableCellRenderer renderer, int row, int column) 
     102            { 
    104103                Component comp = super.prepareRenderer(renderer, row, column); 
    105                  
     104 
    106105                comp.setForeground(Color.BLACK); 
    107106                comp.setBackground(Color.CYAN); 
    108                  
    109                 if (getSelectedRow() == row){ 
     107 
     108                if (getSelectedRow() == row) 
     109                { 
    110110                    comp.setForeground(Color.WHITE); 
    111111                    comp.setBackground(Color.BLUE); 
    112112                } 
    113                  
     113 
    114114                return comp; 
    115115            } 
    116              
    117             public Class getColumnClass(int c) { 
     116 
     117            public Class getColumnClass(int c) 
     118            { 
    118119                return getValueAt(0, c).getClass(); 
    119120            } 
    120121        }; 
    121          
     122 
    122123        pendingIncidentsTable.setOpaque(true); 
    123124        pendingIncidentsTable.setIntercellSpacing(new Dimension(1, 0)); 
     
    127128        pendingIncidentsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 
    128129        pendingIncidentsTable.setAutoCreateRowSorter(true); 
    129          
     130 
    130131        pendingIncidentsTable.setModel(new DefaultTableModel()); 
    131132        ((DefaultTableModel) pendingIncidentsTable.getModel()).setColumnIdentifiers(TableHeaders.PENDING_INCIDENTS_HEADERS); 
    132          
    133         pendingIncidentsTable.setTransferHandler(new TransferHandler(){ 
    134              
    135             public boolean canImport(TransferHandler.TransferSupport info) { 
     133 
     134        pendingIncidentsTable.setTransferHandler(new TransferHandler() 
     135        { 
     136            public boolean canImport(TransferHandler.TransferSupport info) 
     137            { 
    136138                // Check for String flavor 
    137                 if (!info.isDataFlavorSupported(DataFlavor.stringFlavor)) { 
     139                if (!info.isDataFlavorSupported(DataFlavor.stringFlavor)) 
     140                { 
    138141                    return false; 
    139142                } 
    140143                return true; 
    141            } 
    142              
    143             public boolean importData(TransferHandler.TransferSupport info) { 
    144                 if (!info.isDrop()) { 
     144            } 
     145 
     146            public boolean importData(TransferHandler.TransferSupport info) 
     147            { 
     148                if (!info.isDrop()) 
     149                { 
    145150                    return false; 
    146151                } 
    147           
    148                 DefaultTableModel tableModel = (DefaultTableModel)pendingIncidentsTable.getModel(); 
    149                 JTable.DropLocation dl = (JTable.DropLocation)info.getDropLocation(); 
     152 
     153                DefaultTableModel tableModel = (DefaultTableModel) pendingIncidentsTable.getModel(); 
     154                JTable.DropLocation dl = (JTable.DropLocation) info.getDropLocation(); 
    150155                int index = dl.getRow(); 
    151           
     156 
    152157                // Get the string that is being dropped. 
    153158                Transferable t = info.getTransferable(); 
    154159                String data; 
    155                 try { 
    156                     data = (String)t.getTransferData(DataFlavor.stringFlavor); 
    157                 } 
    158                 catch (Exception e) { return false; } 
    159                                           
     160                try 
     161                { 
     162                    data = (String) t.getTransferData(DataFlavor.stringFlavor); 
     163                } catch (Exception e) 
     164                { 
     165                    return false; 
     166                } 
     167 
    160168                // Perform the actual import 
    161169                // TODO 
    162                 int incidentId = (Integer)pendingIncidentsTable.getValueAt(dl.getRow(), 0); 
    163                 try { 
    164                 String masterInc = (String) ScreenManager.theCoordinator. 
    165                         getCadDataIncVal(INC_VAL.MASTER_INC, incidentId); 
    166                 ScreenManager.theCoordinator.setCadDataUnitValue(data, 
    167                           UNIT_TAGS.MASTER_INC_NUM, masterInc); 
    168                  
    169                         ScreenManager.theCoordinator.setCadDataUnitAssignedId(data, incidentId); 
    170                         ScreenManager.theCoordinator.setCadDataUnitValue(data, 
    171                       UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Arrived); 
    172                      ScreenManager.theCoordinator.addCadDataIncidentAssignedUnitNum(incidentId, data); 
    173                      ScreenManager.theCoordinator.setCadDataIncidentStatus(incidentId, IncidentEnums.Assigned); 
    174                      } catch (RemoteException e) { 
    175                         e.printStackTrace(); 
    176                      } 
     170                int incidentId = (Integer) pendingIncidentsTable.getValueAt(dl.getRow(), 0); 
     171                try 
     172                { 
     173                    String masterInc = (String) ScreenManager.theCoordinator. 
     174                            getCadDataIncVal(INC_VAL.MASTER_INC, incidentId); 
     175                    ScreenManager.theCoordinator.setCadDataUnitValue(data, 
     176                            UNIT_TAGS.MASTER_INC_NUM, masterInc); 
     177 
     178                    ScreenManager.theCoordinator.setCadDataUnitAssignedId(data, incidentId); 
     179                    ScreenManager.theCoordinator.setCadDataUnitValue(data, 
     180                            UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Arrived); 
     181                    ScreenManager.theCoordinator.addCadDataIncidentAssignedUnitNum(incidentId, data); 
     182                    ScreenManager.theCoordinator.setCadDataIncidentStatus(incidentId, IncidentEnums.Assigned); 
     183                } catch (RemoteException e) 
     184                { 
     185                    e.printStackTrace(); 
     186                } 
    177187                return true; 
    178188            } 
    179189        }); 
    180         for(int i = 0; i < pendingIncidentsTable.getColumnCount(); i++){ 
     190        for (int i = 0; i < pendingIncidentsTable.getColumnCount(); i++) 
     191        { 
    181192            pendingIncidentsTable.getColumnModel().getColumn(i).setPreferredWidth(120); 
    182193        } 
    183194    } 
    184      
    185     /*  
     195 
     196    /* 
    186197     * Adds the key and mouse listeners for the table and component listener for screen. 
    187198     */ 
    188     private void initControllers(){ 
    189         pendingIncidentsTable.addMouseListener(new MouseListener(){ 
    190             public void mouseClicked(MouseEvent e) { 
    191                 if(SwingUtilities.isLeftMouseButton(e)){ 
    192                     if(System.currentTimeMillis() - lastLeftClick < 1000){ 
     199    private void initControllers() 
     200    { 
     201        pendingIncidentsTable.addMouseListener(new MouseListener() 
     202        { 
     203            public void mouseClicked(MouseEvent e) 
     204            { 
     205                if (SwingUtilities.isLeftMouseButton(e)) 
     206                { 
     207                    if (System.currentTimeMillis() - lastLeftClick < 1000) 
     208                    { 
    193209                        int idColumn = 0; 
    194                         ScreenManager.openIncidentViewer((Integer) pendingIncidentsTable.getValueAt(pendingIncidentsTable.getSelectedRow(),idColumn)); 
    195                     }else{ 
     210                        ScreenManager.openIncidentViewer((Integer) pendingIncidentsTable.getValueAt(pendingIncidentsTable.getSelectedRow(), idColumn)); 
     211                    } 
     212                    else 
     213                    { 
    196214                        lastLeftClick = System.currentTimeMillis(); 
    197215                    } 
    198216                } 
    199                 if(SwingUtilities.isRightMouseButton(e)){ 
     217                if (SwingUtilities.isRightMouseButton(e)) 
     218                { 
     219                    // Fixed to force right click to cause the row to be selected. JD 
     220                    // get the coordinates of the mouse click 
     221                    Point p = e.getPoint(); 
     222                    // get the row index that contains that coordinate 
     223                    int rowNumber = pendingIncidentsTable.rowAtPoint(p); 
     224                    // Get the ListSelectionModel of the JTable 
     225                    ListSelectionModel model = pendingIncidentsTable.getSelectionModel(); 
     226                    // set the selected interval of rows. Using the "rowNumber" 
     227                    // variable for the beginning and end selects only that one row. 
     228                    model.setSelectionInterval(rowNumber, rowNumber); 
     229                    // go open the drop down menu 
    200230                    openDropDownMenu(e); 
    201                 }else{ 
     231                } 
     232                else 
     233                { 
    202234                    closeDropDownMenu(); 
    203235                } 
    204236            } 
    205             public void mouseEntered(MouseEvent e) {} 
    206             public void mouseExited(MouseEvent e) {} 
    207             public void mousePressed(MouseEvent e) {} 
    208             public void mouseReleased(MouseEvent e) {} 
     237 
     238            public void mouseEntered(MouseEvent e) 
     239            { 
     240            } 
     241 
     242            public void mouseExited(MouseEvent e) 
     243            { 
     244            } 
     245 
     246            public void mousePressed(MouseEvent e) 
     247            { 
     248            } 
     249 
     250            public void mouseReleased(MouseEvent e) 
     251            { 
     252            } 
    209253        }); 
    210          
    211         addComponentListener( new ComponentListener(){ 
    212             public void componentHidden(ComponentEvent e) {} 
    213             public void componentMoved(ComponentEvent e) { 
     254 
     255        addComponentListener(new ComponentListener() 
     256        { 
     257            public void componentHidden(ComponentEvent e) 
     258            { 
     259            } 
     260 
     261            public void componentMoved(ComponentEvent e) 
     262            { 
    214263                closeDropDownMenu(); 
    215264            } 
    216             public void componentResized(ComponentEvent e) {} 
    217             public void componentShown(ComponentEvent e) {} 
     265 
     266            public void componentResized(ComponentEvent e) 
     267            { 
     268            } 
     269 
     270            public void componentShown(ComponentEvent e) 
     271            { 
     272            } 
    218273        }); 
    219274    } 
    220      
     275 
    221276    /* 
    222277     * Creates the drop down menu that appears when a right click is performed on the table. 
    223278     */ 
    224     private void initializeDropDownMenu(){ 
     279    private void initializeDropDownMenu() 
     280    { 
    225281        Box menu = new Box(BoxLayout.Y_AXIS); 
    226282        initializeDropDownLabels(); 
    227283        addLabelsToBox(menu); 
    228      
     284 
    229285        //Sets the highlighted background color, note that it does not become "Highlighted" until opaque(true) is called 
    230286        setMenuHighlightedBackground(Color.BLUE); 
    231          
     287 
    232288        pendingIncidentsMenu = new JFrame(); 
    233289        pendingIncidentsMenu.getContentPane().add(menu); 
     
    237293        pendingIncidentsMenu.setVisible(false); 
    238294    } 
    239      
     295 
    240296    /* 
    241297     * Sets the text and size and adds a listener to each label. 
    242298     */ 
    243     private void initializeDropDownLabels(){  
    244         for(int i = 0; i < dropDownLabels.length; i++){ 
     299    private void initializeDropDownLabels() 
     300    { 
     301        for (int i = 0; i < dropDownLabels.length; i++) 
     302        { 
    245303            dropDownLabels[i] = new JLabel(LABEL_SPACING + LABELS[i]); 
    246304            dropDownLabels[i].setMaximumSize(DROP_DOWN_MENU_LABEL_DIMENSIONS); 
     
    252310        addMouseListenersToLabel(dropDownLabels[8]); 
    253311    } 
    254      
    255     /* 
    256      * Add the labels to the box in order with separators and spacings in between.  
    257      */ 
    258     private void addLabelsToBox(Box menu){ 
     312 
     313    /* 
     314     * Add the labels to the box in order with separators and spacings in between. 
     315     */ 
     316    private void addLabelsToBox(Box menu) 
     317    { 
    259318        menu.add(dropDownLabels[0]); 
    260319        menu.add(dropDownLabels[1]); 
    261          
     320 
    262321        menu.add(Box.createVerticalStrut(5)); 
    263322        menu.add(new JSeparator()); 
    264323        menu.add(Box.createVerticalStrut(5)); 
    265          
     324 
    266325        menu.add(dropDownLabels[2]); 
    267326        menu.add(dropDownLabels[3]); 
    268327        menu.add(dropDownLabels[4]); 
    269328        menu.add(dropDownLabels[5]); 
    270          
     329 
    271330        menu.add(Box.createVerticalStrut(5)); 
    272331        menu.add(new JSeparator()); 
    273332        menu.add(Box.createVerticalStrut(5)); 
    274          
     333 
    275334        menu.add(dropDownLabels[6]); 
    276335        menu.add(dropDownLabels[7]); 
    277336        menu.add(dropDownLabels[8]); 
    278          
     337 
    279338        menu.add(Box.createVerticalStrut(5)); 
    280339        menu.add(new JSeparator()); 
    281340        menu.add(Box.createVerticalStrut(5)); 
    282          
     341 
    283342        menu.add(dropDownLabels[9]); 
    284343        menu.add(dropDownLabels[10]); 
    285          
    286         menu.add(Box.createVerticalStrut(5)); 
    287     } 
    288      
     344 
     345        menu.add(Box.createVerticalStrut(5)); 
     346    } 
     347 
    289348    /* 
    290349     * Sets the highlighted color(when the mouse is over it) of the JLabels. 
     
    292351     * @param color the highlighted color 
    293352     */ 
    294     public void setMenuHighlightedBackground(Color color){ 
    295         for(int i = 0; i < dropDownLabels.length; i++){ 
     353    public void setMenuHighlightedBackground(Color color) 
     354    { 
     355        for (int i = 0; i < dropDownLabels.length; i++) 
     356        { 
    296357            dropDownLabels[i].setBackground(color); 
    297358        } 
    298359    } 
    299      
     360 
    300361    /* 
    301362     * Sets all JLabels to not display a highlighted background 
    302363     */ 
    303     public void unSelectAllLabels(){ 
    304         for(int i = 0; i < dropDownLabels.length; i++){ 
     364    public void unSelectAllLabels() 
     365    { 
     366        for (int i = 0; i < dropDownLabels.length; i++) 
     367        { 
    305368            dropDownLabels[i].setOpaque(false); 
    306369        } 
     
    311374     * @param label the label that is selected/highlighted 
    312375     */ 
    313     public void selectLabel(Object label){ 
    314         ((JLabel)label).setOpaque(true); 
    315     } 
    316      
     376    public void selectLabel(Object label) 
     377    { 
     378        ((JLabel) label).setOpaque(true); 
     379    } 
     380 
    317381    /* 
    318382     * Performs the label action depending on which label was clicked. 
    319383     */ 
    320     public void performLabelAction(Object label){ 
    321         if(label.equals(dropDownLabels[0])){//Recommend 
    322              
    323         }else if(label.equals(dropDownLabels[1])){//Add Resources 
    324              
    325         }else if(label.equals(dropDownLabels[2])){//Open 
    326           int idColumn = 0; 
     384    public void performLabelAction(Object label) 
     385    { 
     386        if (label.equals(dropDownLabels[0])) 
     387        {//Recommend 
     388        } 
     389        else if (label.equals(dropDownLabels[1])) 
     390        {//Add Resources 
     391        } 
     392        else if (label.equals(dropDownLabels[2])) 
     393        {//Open 
     394            int idColumn = 0; 
    327395            ScreenManager.openIncidentViewer((Integer) pendingIncidentsTable.getValueAt( 
    328                 pendingIncidentsTable.getSelectedRow(),idColumn)); 
    329         }else if(label.equals(dropDownLabels[3])){//Recall Incident 
    330              
    331         }else if(label.equals(dropDownLabels[4])){//Cancel 
    332         }else if(label.equals(dropDownLabels[5])){//Link Append 
    333              
    334         }else if(label.equals(dropDownLabels[6])){//Map 
    335              
    336         }else if(label.equals(dropDownLabels[7])){//Recall Linked Incidents 
    337            
    338         }else if(label.equals(dropDownLabels[8])){//Read Notes 
    339           int idColumn = 0; 
     396                    pendingIncidentsTable.getSelectedRow(), idColumn)); 
     397        } 
     398        else if (label.equals(dropDownLabels[3])) 
     399        {//Recall Incident 
     400        } 
     401        else if (label.equals(dropDownLabels[4])) 
     402        {//Cancel 
     403        } 
     404        else if (label.equals(dropDownLabels[5])) 
     405        {//Link Append 
     406        } 
     407        else if (label.equals(dropDownLabels[6])) 
     408        {//Map 
     409        } 
     410        else if (label.equals(dropDownLabels[7])) 
     411        {//Recall Linked Incidents 
     412        } 
     413        else if (label.equals(dropDownLabels[8])) 
     414        {//Read Notes 
     415            int idColumn = 0; 
    340416            ScreenManager.openIncidentViewer((Integer) pendingIncidentsTable.getValueAt( 
    341             pendingIncidentsTable.getSelectedRow(),idColumn)); 
    342         }else if(label.equals(dropDownLabels[9])){//Mail 
    343              
    344         }else if(label.equals(dropDownLabels[10])){//Fax 
    345              
    346         } 
    347     } 
    348      
    349     /* 
    350      * Factory method. Adds a mouse listeners to the label. The MouseMotionListener detects  
     417                    pendingIncidentsTable.getSelectedRow(), idColumn)); 
     418        } 
     419        else if (label.equals(dropDownLabels[9])) 
     420        {//Mail 
     421        } 
     422        else if (label.equals(dropDownLabels[10])) 
     423        {//Fax 
     424        } 
     425    } 
     426 
     427    /* 
     428     * Factory method. Adds a mouse listeners to the label. The MouseMotionListener detects 
    351429     * the mouse's location to highlight the label. The MouseListener detects 
    352430     * for clicks and performs the action of the label designates. 
    353431     */ 
    354     public void addMouseListenersToLabel(JLabel label){ 
    355         label.addMouseMotionListener(new MouseMotionListener(){ 
    356             public void mouseDragged(MouseEvent e) {} 
    357             public void mouseMoved(MouseEvent e) { 
     432    public void addMouseListenersToLabel(JLabel label) 
     433    { 
     434        label.addMouseMotionListener(new MouseMotionListener() 
     435        { 
     436            public void mouseDragged(MouseEvent e) 
     437            { 
     438            } 
     439 
     440            public void mouseMoved(MouseEvent e) 
     441            { 
    358442                unSelectAllLabels(); 
    359443                selectLabel(e.getSource()); 
     
    362446            } 
    363447        }); 
    364         label.addMouseListener(new MouseListener() { 
    365             public void mouseClicked(MouseEvent e) { 
     448        label.addMouseListener(new MouseListener() 
     449        { 
     450            public void mouseClicked(MouseEvent e) 
     451            { 
    366452                performLabelAction(e.getSource()); 
    367453                unSelectAllLabels(); 
     
    370456                pendingIncidentsMenu.setVisible(false); 
    371457            } 
    372             public void mouseEntered(MouseEvent e) {}            
    373             public void mouseExited(MouseEvent e) {}             
    374             public void mousePressed(MouseEvent e) {}            
    375             public void mouseReleased(MouseEvent e)  {}          
     458 
     459            public void mouseEntered(MouseEvent e) 
     460            { 
     461            } 
     462 
     463            public void mouseExited(MouseEvent e) 
     464            { 
     465            } 
     466 
     467            public void mousePressed(MouseEvent e) 
     468            { 
     469            } 
     470 
     471            public void mouseReleased(MouseEvent e) 
     472            { 
     473            } 
    376474        }); 
    377475    } 
    378      
     476 
    379477    /* 
    380478     * Displays the menu where the right click occurred. 
    381479     */ 
    382     public void openDropDownMenu(MouseEvent e){ 
     480    public void openDropDownMenu(MouseEvent e) 
     481    { 
    383482        pendingIncidentsMenu.setLocation(e.getX() + this.getX(), e.getY() + this.getY()); 
    384483        pendingIncidentsMenu.setVisible(true); 
    385484    } 
    386      
     485 
    387486    /* 
    388487     * Hides the menu. 
    389488     */ 
    390     public void closeDropDownMenu(){ 
     489    public void closeDropDownMenu() 
     490    { 
    391491        unSelectAllLabels(); 
    392492        pendingIncidentsMenu.revalidate(); 
     
    394494        pendingIncidentsMenu.setVisible(false); 
    395495    } 
    396      
     496 
    397497    /* 
    398498     * Refreshes the data in the table by updating all data and repainting the 
    399      * screen. It saves user preferences(like column sizes, selected row, sorted preferences)  
     499     * screen. It saves user preferences(like column sizes, selected row, sorted preferences) 
    400500     * and applies them to the updated model it receives from the server. 
    401501     */ 
    402     public void refreshTable(){ 
    403      
    404       if(pendingIncidentsTable.getTableHeader().getResizingColumn() == null){//only update info if resize not in progress 
    405           try { 
    406             int index = pendingIncidentsTable.getSelectedRow(); 
    407             int[] columnWidths = new int[20]; 
    408             List<? extends SortKey> keys = pendingIncidentsTable.getRowSorter().getSortKeys(); 
    409             for(int i = 0; i < pendingIncidentsTable.getColumnCount(); i++){ 
    410                 columnWidths[i] = pendingIncidentsTable.getColumnModel().getColumn(i).getWidth(); 
    411             } 
    412              
    413             pendingIncidentsTable.setModel(ScreenManager.theCoordinator.getCadDataTable(CADDataEnums.TABLE.PENDING_INCIDENTS)); 
    414              
    415             for(int i = 0; i < pendingIncidentsTable.getColumnCount(); i++){ 
    416                 pendingIncidentsTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidths[i]); 
    417             } 
    418             pendingIncidentsTable.getRowSorter().setSortKeys(keys); 
    419             pendingIncidentsTable.getSelectionModel().setSelectionInterval(index, index); 
    420             } catch (RemoteException e) { 
     502    public void refreshTable() 
     503    { 
     504 
     505        if (pendingIncidentsTable.getTableHeader().getResizingColumn() == null) 
     506        {//only update info if resize not in progress 
     507            try 
     508            { 
     509                int index = pendingIncidentsTable.getSelectedRow(); 
     510                int[] columnWidths = new int[20]; 
     511                List<? extends SortKey> keys = pendingIncidentsTable.getRowSorter().getSortKeys(); 
     512                for (int i = 0; i < pendingIncidentsTable.getColumnCount(); i++) 
     513                { 
     514                    columnWidths[i] = pendingIncidentsTable.getColumnModel().getColumn(i).getWidth(); 
     515                } 
     516 
     517                pendingIncidentsTable.setModel(ScreenManager.theCoordinator.getCadDataTable(CADDataEnums.TABLE.PENDING_INCIDENTS)); 
     518 
     519                for (int i = 0; i < pendingIncidentsTable.getColumnCount(); i++) 
     520                { 
     521                    pendingIncidentsTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidths[i]); 
     522                } 
     523                pendingIncidentsTable.getRowSorter().setSortKeys(keys); 
     524                pendingIncidentsTable.getSelectionModel().setSelectionInterval(index, index); 
     525            } catch (RemoteException e) 
     526            { 
    421527                e.printStackTrace(); 
    422528            } 
    423529            revalidate(); 
    424530            repaint(); 
    425       } 
    426     } 
    427      
    428     /*  
     531        } 
     532    } 
     533 
     534    /* 
    429535     * Makes screen visible. 
    430536     */ 
    431     public void open(){ 
     537    public void open() 
     538    { 
    432539        setVisible(true); 
    433540    } 
    434      
     541 
    435542    /* 
    436543     * Hides screen. 
    437544     */ 
    438     public void close(){ 
     545    public void close() 
     546    { 
    439547        setVisible(false); 
    440548    } 
    441          
    442549} 
  • trunk/src/tmcsim/client/cadclientgui/screens/ScreenManager.java

    r3 r59  
    11package tmcsim.client.cadclientgui.screens; 
    2  
    3 import javax.swing.InputMap; 
    4 import javax.swing.JComponent; 
    5 import javax.swing.Timer; 
    6 import javax.swing.table.DefaultTableModel; 
    7  
    8 import tmcsim.cadsimulator.Coordinator; 
    9 import tmcsim.client.cadclientgui.data.CADData; 
    10 import tmcsim.client.cadclientgui.data.Unit; 
    11 import tmcsim.interfaces.CoordinatorInterface; 
    122 
    133import java.awt.KeyEventDispatcher; 
     
    199import java.awt.event.WindowEvent; 
    2010import java.awt.event.WindowListener; 
    21 import java.rmi.RemoteException; 
    22 import java.util.Vector; 
     11import java.util.HashMap; 
     12import javax.swing.Timer; 
     13import tmcsim.interfaces.CoordinatorInterface; 
    2314 
    2415/** 
    25  * This class contains a reference to every single view-able component as well as a reference to the coordinator(which serves as the database). 
    26  * All commands to access data or manipulate a screen outside of the individual screen should be done through this ScreenManager. 
    27  *  
     16 * This class contains a reference to every single view-able component as well 
     17 * as a reference to the coordinator(which serves as the database). All commands 
     18 * to access data or manipulate a screen outside of the individual screen should 
     19 * be done through this ScreenManager. 
     20 * 
    2821 * @author Stuart 
    2922 */ 
    30  
    31 public class ScreenManager { 
    32      
     23public class ScreenManager 
     24{ 
    3325    private final static int ONE_SECOND = 1000; 
    34      
     26    private final static int FIVE_SECONDS = 5000; 
    3527    private static ActivityLogViewer activityLogViewer; 
    3628    private static AssignedIncidents assignedIncidents; 
     
    4133    private static IncidentInfo incidentInfo; 
    4234    //private static IncidentSupplementPersonForm incidentSupplementPersonForm; 
    43     private static IncidentViewer incidentViewer; 
     35    private static HashMap<Integer, IncidentViewer> incidentViewMap = new HashMap<Integer, IncidentViewer>(); //JD 
    4436    private static Login login; 
    4537    private static PendingIncidents pendingIncidents; 
     
    5446    private static UnitStatus unitStatus; 
    5547    //private static VehicleInformationEntry vehicleInformationEntry; 
    56      
    5748    //Reference to the Coordinator to use RMI methods 
    5849    protected static CoordinatorInterface theCoordinator; 
    59      
    60     public ScreenManager(CoordinatorInterface theCoor){ 
     50 
     51    private String username; // The login name entered by the trainee 
     52 
     53    public ScreenManager(CoordinatorInterface theCoor) 
     54    { 
    6155        theCoordinator = theCoor; 
    6256        activityLogViewer = new ActivityLogViewer(); 
    63          
     57 
    6458        assignedIncidents = new AssignedIncidents(); 
    6559        assignedIncidents.addWindowListener(createWindowListener()); 
     
    6761        //boloEntry = new BOLOEntry(); 
    6862        //boloEntry.addWindowListener(createWindowListener()); 
    69          
     63 
    7064        cadMenu = new CADMenu(); 
    7165        cadMenu.addWindowListener(createWindowListener()); 
    72          
     66 
    7367        cardfile = new Cardfile(); 
    7468        cardfile.addWindowListener(createWindowListener()); 
    75          
     69 
    7670        incidentEditor = new IncidentEditor(); 
    7771        incidentEditor.addWindowListener(createWindowListener()); 
    78          
     72 
    7973        incidentInfo = new IncidentInfo(); 
    8074        incidentInfo.addWindowListener(createWindowListener()); 
    81          
     75 
    8276        //incidentSupplementPersonForm = new IncidentSupplementPersonForm(); 
    8377        //incidentSupplementPersonForm.addWindowListener(createWindowListener()); 
    84          
    85         incidentViewer = new IncidentViewer(); 
    86         incidentViewer.addWindowListener(createWindowListener()); 
    87          
     78 
     79        incidentViewMap = new HashMap<Integer, IncidentViewer>(); //JD 
     80 
    8881        pendingIncidents = new PendingIncidents(); 
    8982        pendingIncidents.addWindowListener(createWindowListener()); 
     
    9184        powerlineUI1 = new PowerlineUI(false, 1); 
    9285        powerlineUI1.addWindowListener(createWindowListener()); 
    93          
     86 
    9487        powerlineUI2 = new PowerlineUI(false, 2); 
    9588        powerlineUI2.addWindowListener(createWindowListener()); 
    96          
     89 
    9790        powerlineUI3 = new PowerlineUI(false, 3); 
    9891        powerlineUI3.addWindowListener(createWindowListener()); 
    99          
     92 
    10093        powerlineUI4 = new PowerlineUI(false, 4); 
    10194        powerlineUI4.addWindowListener(createWindowListener()); 
    102          
     95 
    10396        powerlineUI5 = new PowerlineUI(false, 5); 
    10497        powerlineUI5.addWindowListener(createWindowListener()); 
    105          
     98 
    10699        //rotationServiceRequest = new RotationServiceRequest(); 
    107100        //rotationServiceRequest.addWindowListener(createWindowListener()); 
    108          
     101 
    109102        search = new Search(); 
    110103        search.addWindowListener(createWindowListener()); 
    111104        unitStatus = new UnitStatus(); 
    112105        unitStatus.addWindowListener(createWindowListener()); 
    113          
     106 
    114107        //vehicleInformationEntry = new VehicleInformationEntry(); 
    115108        //vehicleInformationEntry.addWindowListener(createWindowListener()); 
    116          
     109 
    117110        KeyboardFocusManager.getCurrentKeyboardFocusManager() 
    118         .addKeyEventDispatcher(new KeyEventDispatcher(){ 
    119             public boolean dispatchKeyEvent(KeyEvent e) { 
    120                 if(e.getKeyCode() == KeyEvent.VK_F2 && e.getID() == KeyEvent.KEY_PRESSED 
    121                         && e.getModifiers() == InputEvent.SHIFT_MASK){ 
     111                .addKeyEventDispatcher(new KeyEventDispatcher() 
     112        { 
     113            public boolean dispatchKeyEvent(KeyEvent e) 
     114            { 
     115                if (e.getKeyCode() == KeyEvent.VK_F2 && e.getID() == KeyEvent.KEY_PRESSED 
     116                        && e.getModifiers() == InputEvent.SHIFT_MASK) 
     117                { 
    122118                    openPendingIncidents(); 
    123119                    return true; 
    124120                } 
    125                 if(e.getKeyCode() == KeyEvent.VK_F3 && e.getID() == KeyEvent.KEY_PRESSED 
    126                         && e.getModifiers() == InputEvent.SHIFT_MASK){ 
     121                if (e.getKeyCode() == KeyEvent.VK_F3 && e.getID() == KeyEvent.KEY_PRESSED 
     122                        && e.getModifiers() == InputEvent.SHIFT_MASK) 
     123                { 
    127124                    openAssignedIncidents(); 
    128125                    return true; 
    129126                } 
    130                 if(e.getKeyCode() == KeyEvent.VK_F4 && e.getID() == KeyEvent.KEY_PRESSED 
    131                         && e.getModifiers() == InputEvent.SHIFT_MASK){ 
     127                if (e.getKeyCode() == KeyEvent.VK_F4 && e.getID() == KeyEvent.KEY_PRESSED 
     128                        && e.getModifiers() == InputEvent.SHIFT_MASK) 
     129                { 
    132130                    openUnitStatus(); 
    133131                    return true; 
    134132                } 
    135                 if(e.getKeyCode() == KeyEvent.VK_F4 && e.getID() == KeyEvent.KEY_PRESSED){ 
     133                if (e.getKeyCode() == KeyEvent.VK_F4 && e.getID() == KeyEvent.KEY_PRESSED) 
     134                { 
    136135                    cyclePowerlineUI(); 
    137136                    return true; 
    138137                } 
    139                 if(e.getKeyCode() == KeyEvent.VK_F5 && e.getID() == KeyEvent.KEY_PRESSED){ 
     138                if (e.getKeyCode() == KeyEvent.VK_F5 && e.getID() == KeyEvent.KEY_PRESSED) 
     139                { 
    140140                    openPowerlineUI(); 
    141141                    return true; 
    142142                } 
    143                 if(e.getKeyCode() == KeyEvent.VK_F9 && e.getID() == KeyEvent.KEY_PRESSED){ 
     143                if (e.getKeyCode() == KeyEvent.VK_F9 && e.getID() == KeyEvent.KEY_PRESSED) 
     144                { 
    144145                    openCardfile(); 
    145146                    return true; 
    146147                } 
    147                 if(e.getKeyCode() == KeyEvent.VK_F10 && e.getID() == KeyEvent.KEY_PRESSED){ 
     148                if (e.getKeyCode() == KeyEvent.VK_F10 && e.getID() == KeyEvent.KEY_PRESSED) 
     149                { 
    148150                    putRCARDinPL(); 
    149151                    return true; 
     
    152154            } 
    153155        }); 
    154          
    155         handleUpdateTimes(); 
    156     } 
    157      
    158     public WindowListener createWindowListener(){ 
    159         return new WindowListener(){ 
    160             public void windowActivated(WindowEvent e) { 
     156 
     157        launchUpdateTimers(); 
     158    } 
     159 
     160    public WindowListener createWindowListener() 
     161    { 
     162        return new WindowListener() 
     163        { 
     164            public void windowActivated(WindowEvent e) 
     165            { 
    161166                closeDropDownMenus(); 
    162167            } 
    163             public void windowClosed(WindowEvent e) { 
     168 
     169            public void windowClosed(WindowEvent e) 
     170            { 
    164171                closeDropDownMenus(); 
    165172            } 
    166             public void windowClosing(WindowEvent e) { 
     173 
     174            public void windowClosing(WindowEvent e) 
     175            { 
    167176                closeDropDownMenus(); 
    168177            } 
    169             public void windowDeactivated(WindowEvent e) {} 
    170             public void windowDeiconified(WindowEvent e) {} 
    171             public void windowIconified(WindowEvent e) { 
     178 
     179            public void windowDeactivated(WindowEvent e) 
     180            { 
     181            } 
     182 
     183            public void windowDeiconified(WindowEvent e) 
     184            { 
     185            } 
     186 
     187            public void windowIconified(WindowEvent e) 
     188            { 
    172189                closeDropDownMenus(); 
    173190            } 
    174             public void windowOpened(WindowEvent e) {} 
     191 
     192            public void windowOpened(WindowEvent e) 
     193            { 
     194            } 
    175195        }; 
    176196    } 
    177      
    178     public static void openActivityLogViewer(){ activityLogViewer.open(); } 
    179     public static void closeActivityLogViewer(){ activityLogViewer.close(); } 
    180      
    181     public static void openAssignedIncidents(){ assignedIncidents.open(); } 
    182     public static void closeAssignedIncidents(){ assignedIncidents.close(); } 
    183      
     197 
     198    public static void openActivityLogViewer() 
     199    { 
     200        activityLogViewer.open(); 
     201    } 
     202 
     203    public static void closeActivityLogViewer() 
     204    { 
     205        activityLogViewer.close(); 
     206    } 
     207 
     208    public static void openAssignedIncidents() 
     209    { 
     210        assignedIncidents.open(); 
     211    } 
     212 
     213    public static void closeAssignedIncidents() 
     214    { 
     215        assignedIncidents.close(); 
     216    } 
     217 
    184218    //public static void openBOLOEntry(){ boloEntry.open(); } 
    185219    //public static void closeBOLOEntry(){ boloEntry.close(); } 
    186      
    187     public static void openCADMenu(){ cadMenu.open(); } 
    188     public static void closeCADMenu(){ cadMenu.close(); } 
    189      
    190     public static void openCardfile(){ cardfile.open(); } 
    191     public static void closeCardfile(){ cardfile.close(); } 
    192      
    193     public static void openIncidentEditor(){ incidentEditor.open(); } 
    194     public static void closeIncidentEditor(){ incidentEditor.close(); } 
    195     public static void refreshIncidentEditor(){ incidentEditor.refreshInformation(); } 
    196      
    197     public static void openIncidentInfo(int incidentId){ incidentInfo.open(incidentId); } 
    198     public static void closeIncidentInfo(){ incidentInfo.close(); } 
    199      
     220    public static void openCADMenu() 
     221    { 
     222        cadMenu.open(); 
     223    } 
     224 
     225    public static void closeCADMenu() 
     226    { 
     227        cadMenu.close(); 
     228    } 
     229 
     230    public static void openCardfile() 
     231    { 
     232        cardfile.open(); 
     233    } 
     234 
     235    public static void closeCardfile() 
     236    { 
     237        cardfile.close(); 
     238    } 
     239 
     240    public static void openIncidentEditor() 
     241    { 
     242        incidentEditor.open(); 
     243    } 
     244 
     245    public static void closeIncidentEditor() 
     246    { 
     247        incidentEditor.close(); 
     248    } 
     249 
     250    public static void refreshIncidentEditor() 
     251    { 
     252        incidentEditor.refreshInformation(); 
     253    } 
     254 
     255    public static void openIncidentInfo(int incidentId) 
     256    { 
     257        incidentInfo.open(incidentId); 
     258    } 
     259 
     260    public static void closeIncidentInfo() 
     261    { 
     262        incidentInfo.close(); 
     263    } 
     264 
    200265    //public static void openIncidentSupplementPersonForm(){ incidentSupplementPersonForm.open(); } 
    201266    //public static void closeIncidentSupplementPersonForm(){ incidentSupplementPersonForm.close(); } 
    202      
    203     public static void openIncidentViewer(int incidentId){ incidentViewer.open(incidentId); } 
    204     public static void closeIncidentViewer(){ incidentViewer.close(); } 
    205      
    206     public static void openPendingIncidents(){ pendingIncidents.open(); } 
    207     public static void closePendingIncidents(){ pendingIncidents.close(); } 
    208      
    209     public static void openPowerlineUI(){  
    210         if(!powerlineUI1.isVisible()){ 
     267//JD    public static void openIncidentViewer(int incidentId){ incidentViewer.open(incidentId); } 
     268    public static void openIncidentViewer(int incidentId) 
     269    { 
     270        if (incidentViewMap.containsKey(new Integer(incidentId))) 
     271        { 
     272            // if incident viewer already open for this incident ... 
     273            // make it visible 
     274            incidentViewMap.get(new Integer(incidentId)).setVisible(true); 
     275        } 
     276        else  // there's no viewer open for this incident, so create it 
     277        { 
     278            // Just pass the incident ID to the constructor, not open() 
     279            IncidentViewer currIV = new IncidentViewer(incidentId); 
     280            currIV.open(); 
     281            // Don't put the item in the map until AFTER we've opened it, 
     282            // to avoid the possibility that the refresh timer happens to fire 
     283            // before we've opened the viewer. 
     284            incidentViewMap.put(new Integer(incidentId), currIV); 
     285            // Doesn't seem necessary, as this viewer has no drop down menus 
     286            // currIV.addWindowListener(createWindowListener()); 
     287        } 
     288    } 
     289 
     290    // JD Seems obsolete, never used. 
     291//    public static void closeIncidentViewer() 
     292//    { 
     293//        incidentViewer.close(); 
     294//    } 
     295    public static void openPendingIncidents() 
     296    { 
     297        pendingIncidents.open(); 
     298    } 
     299 
     300    public static void closePendingIncidents() 
     301    { 
     302        pendingIncidents.close(); 
     303    } 
     304 
     305    public static void openPowerlineUI() 
     306    { 
     307        if (!powerlineUI1.isVisible()) 
     308        { 
    211309            powerlineUI1.open(); 
    212         }else if(!powerlineUI2.isVisible()){ 
     310        } 
     311        else if (!powerlineUI2.isVisible()) 
     312        { 
    213313            powerlineUI2.open(); 
    214         }else if(!powerlineUI3.isVisible()){ 
     314        } 
     315        else if (!powerlineUI3.isVisible()) 
     316        { 
    215317            powerlineUI3.open(); 
    216         }else if(!powerlineUI4.isVisible()){ 
     318        } 
     319        else if (!powerlineUI4.isVisible()) 
     320        { 
    217321            powerlineUI4.open(); 
    218         }else if(!powerlineUI5.isVisible()){ 
     322        } 
     323        else if (!powerlineUI5.isVisible()) 
     324        { 
    219325            powerlineUI5.open(); 
    220         }     
    221     } 
    222      
    223     public static void cyclePowerlineUI(){ 
    224         if(currPowerlineFocus == 1){ 
     326        } 
     327    } 
     328 
     329    public static void cyclePowerlineUI() 
     330    { 
     331        if (currPowerlineFocus == 1) 
     332        { 
    225333            currPowerlineFocus = 2; 
    226334            powerlineUI1.setVisible(true); 
     
    228336            powerlineUI1.clearText(); 
    229337        } 
    230         else if(currPowerlineFocus == 2){ 
     338        else if (currPowerlineFocus == 2) 
     339        { 
    231340            currPowerlineFocus = 3; 
    232341            powerlineUI2.setVisible(true); 
     
    234343            powerlineUI2.clearText(); 
    235344        } 
    236         else if(currPowerlineFocus == 3){ 
     345        else if (currPowerlineFocus == 3) 
     346        { 
    237347            currPowerlineFocus = 4; 
    238348            powerlineUI3.setVisible(true); 
     
    240350            powerlineUI3.clearText(); 
    241351        } 
    242         else if(currPowerlineFocus == 4){ 
     352        else if (currPowerlineFocus == 4) 
     353        { 
    243354            currPowerlineFocus = 5; 
    244355            powerlineUI4.setVisible(true); 
     
    246357            powerlineUI4.clearText(); 
    247358        } 
    248         else if(currPowerlineFocus == 5){ 
     359        else if (currPowerlineFocus == 5) 
     360        { 
    249361            currPowerlineFocus = 1; 
    250362            powerlineUI5.setVisible(true); 
     
    253365        } 
    254366    } 
    255      
    256     public static void putRCARDinPL(){ 
    257         if(powerlineUI2.hasFocus()){ 
     367 
     368    public static void putRCARDinPL() 
     369    { 
     370        if (powerlineUI2.hasFocus()) 
     371        { 
    258372            powerlineUI2.putRCARD(); 
    259373        } 
    260         else if(powerlineUI3.hasFocus()){ 
     374        else if (powerlineUI3.hasFocus()) 
     375        { 
    261376            powerlineUI3.putRCARD(); 
    262377        } 
    263         else if(powerlineUI4.hasFocus()){ 
     378        else if (powerlineUI4.hasFocus()) 
     379        { 
    264380            powerlineUI4.putRCARD(); 
    265381        } 
    266         else if(powerlineUI5.hasFocus()){ 
     382        else if (powerlineUI5.hasFocus()) 
     383        { 
    267384            powerlineUI5.putRCARD(); 
    268385        } 
    269         else{ 
     386        else 
     387        { 
    270388            powerlineUI1.setVisible(true); 
    271389            powerlineUI1.putRCARD(); 
    272390        } 
    273391    } 
    274      
     392 
    275393    //public static void openRotationServiceRequest(){ rotationServiceRequest.open(); } 
    276394    //public static void closeRotationServiceRequest(){ rotationServiceRequest.close(); } 
    277      
    278     public static void openSearch(){ search.open(); } 
    279     public static void closeSearch(){ search.close(); } 
    280      
    281     public static void openUnitStatus(){ unitStatus.open(); } 
    282     public static void closeUnitStatus(){ unitStatus.close(); } 
    283      
     395    public static void openSearch() 
     396    { 
     397        search.open(); 
     398    } 
     399 
     400    public static void closeSearch() 
     401    { 
     402        search.close(); 
     403    } 
     404 
     405    public static void openUnitStatus() 
     406    { 
     407        unitStatus.open(); 
     408    } 
     409 
     410    public static void closeUnitStatus() 
     411    { 
     412        unitStatus.close(); 
     413    } 
     414 
    284415    //public static void openVehicleInformationEntry(){ vehicleInformationEntry.open(); } 
    285416    //public static void closeVehicleInformationEntry(){ vehicleInformationEntry.close(); } 
    286      
    287     public static void createPowerlineSearch(String search){ 
     417    public static void createPowerlineSearch(String search) 
     418    { 
    288419        new PowerlineSearch(search); 
    289420    } 
    290      
    291     public static void closeDropDownMenus(){ 
     421 
     422    public static void closeDropDownMenus() 
     423    { 
    292424        cadMenu.closeMoreMenu(); 
    293425        cadMenu.closeToolMenu(); 
     
    297429        pendingIncidents.closeDropDownMenu(); 
    298430    } 
    299      
    300     public static void refreshScreens(){ 
     431 
     432    public static void refreshScreens() 
     433    { 
    301434        assignedIncidents.refreshTable(); 
    302435        unitStatus.refreshTable(); 
    303436        pendingIncidents.refreshTable(); 
    304437    } 
    305      
    306     public static void setUserName(String username){ 
     438 
     439    public static void setUserName(String username) 
     440    { 
    307441        cadMenu.setName(username); 
    308442    } 
    309      
     443    public static String getUserName() 
     444    { 
     445        return cadMenu.getName(); 
     446    } 
     447 
    310448    /** 
    311449     * This method calls CADMenu's and UnitStatus's update time method. 
    312450     */ 
    313     public static void handleUpdateTimes(){ 
    314         Timer timer = new Timer(ONE_SECOND, new ActionListener(){ 
    315             public void actionPerformed(ActionEvent e) { 
     451    public static void launchUpdateTimers() 
     452    { 
     453        Timer timer = new Timer(ONE_SECOND, new ActionListener() 
     454        { 
     455            public void actionPerformed(ActionEvent e) 
     456            { 
    316457                refreshScreens(); 
    317458                cadMenu.handleUpdateTime(); 
    318                 unitStatus.handleUpdateTime(); 
     459                // Don't need this? Because refreshScreens already does it JD 
     460                //unitStatus.handleUpdateTime(); 
    319461            } 
    320462        }); 
    321463        timer.start(); 
    322     } 
    323      
     464 
     465        //JD  refresh the info in all the incident viewers 
     466        Timer timer2 = new Timer(FIVE_SECONDS, new ActionListener() 
     467        { 
     468            public void actionPerformed(ActionEvent e) 
     469            { 
     470                // for each incident viewer that we've created 
     471                for (Integer key : incidentViewMap.keySet()) 
     472                { 
     473                    // Fetch the viewer 
     474                    IncidentViewer viewer = incidentViewMap.get(key); 
     475                    // is the viewer visible? 
     476                    if (viewer.isVisible()) 
     477                    { 
     478                        // refresh the comments 
     479                        viewer.refreshCommentsNotesTable(); 
     480                    } 
     481                } 
     482            } 
     483        }); 
     484        timer2.start(); 
     485    } 
     486 
    324487    /** 
    325      * Removes drag and drop/button clicking in unitStatus panel if bool is false. 
    326      * This method should only be called from Login.java 
     488     * Removes drag and drop/button clicking in unitStatus panel if bool is 
     489     * false. This method should only be called from Login.java 
    327490     */ 
    328     public static void setDispatcherAuthority(boolean bool){ 
    329         if (!bool){ 
     491    public static void setDispatcherAuthority(boolean bool) 
     492    { 
     493        if (!bool) 
     494        { 
    330495            unitStatus.removeDispatcherAuthority(); 
    331496            cadMenu.removeDispatcherStatus(); 
  • trunk/src/tmcsim/client/cadclientgui/screens/UnitStatus.java

    r3 r59  
    44import java.awt.Component; 
    55import java.awt.Dimension; 
     6import java.awt.Point; 
    67import java.awt.Toolkit; 
    78import java.awt.datatransfer.DataFlavor; 
     
    1718import java.rmi.RemoteException; 
    1819import java.util.List; 
    19  
    2020import javax.swing.Box; 
    2121import javax.swing.BoxLayout; 
     
    2828import javax.swing.JTable; 
    2929import javax.swing.ListSelectionModel; 
    30 import javax.swing.RowSorter; 
    3130import javax.swing.RowSorter.SortKey; 
    3231import javax.swing.SwingUtilities; 
     
    3433import javax.swing.table.DefaultTableModel; 
    3534import javax.swing.table.TableCellRenderer; 
    36  
    3735import tmcsim.client.cadclientgui.enums.CADDataEnums; 
    3836import tmcsim.client.cadclientgui.enums.CADScriptTags.UNIT_TAGS; 
     
    4139 
    4240/** 
    43  * This class contains the view and controller for the UnitStatus screen. The view was not built using a GUI builder plug-in 
    44  * (but may want to consider doing so in the future), and the controller uses listeners to control how the view and data act.  
    45  *  
     41 * This class contains the view and controller for the UnitStatus screen. The 
     42 * view was not built using a GUI builder plug-in (but may want to consider 
     43 * doing so in the future), and the controller uses listeners to control how the 
     44 * view and data act. 
     45 * 
    4646 * @author Vincent 
    4747 */ 
    48  
    49 public class UnitStatus extends JFrame { 
    50  
     48public class UnitStatus extends JFrame 
     49{ 
    5150    private final int ONE_SECOND = 1000; 
    52      
    5351    private final String SCREEN_TITLE = "(Shift + F4)  Unit Status"; 
    54  
    5552    private final Dimension SCREEN_DIMENSIONS = new Dimension(1400, 250); 
    56  
    5753    private final Dimension DROP_DOWN_MENU_LABEL_DIMENSIONS = new Dimension( 
    5854            170, 20); 
    59  
    6055    private final Dimension DROP_DOWN_MENU_DIMENSIONS = new Dimension(170, 300); 
    61  
    6256    private final Dimension BUTTON_DIMENSIONS = new Dimension(100, 25); 
    63  
    6457    private final int COLUMN_WIDTH = 120; 
    65  
    66     private final String[] LABELS = { "10-8", "OFC", "OOS", 
    67             "Open Unit Details", "Open Unit Activity Log", "Map", 
    68             "Change Vehicle", "Unit Poll", "Quick Note...", 
    69             "Activate User Timer...", "Filters", "Page...", "Roster System", 
    70             "10-10" }; 
    71  
    72     private final String[] WITH_ASSIGNED_INC_LABELS = { "STAGE", "10-97", 
    73             "10-8", "ASSIGNED ALT...", "ENRT ALT...", "10-97 ALT...", 
    74             "Open Incident", "Recall Incident", "Open Unit Details", 
    75             "Open Unit Activity Log", "Map", "Recall Linked Incidents", 
    76             "Cancel", "Reassign", "Duplicate", "Unit Poll", "Quick Note...", 
    77             "Activate User Timer...", "Filters", "Page...", "Fax..." }; 
    78  
     58    private final String[] LABELS = 
     59    { 
     60        "10-8", "OFC", "OOS", 
     61        "Open Unit Details", "Open Unit Activity Log", "Map", 
     62        "Change Vehicle", "Unit Poll", "Quick Note...", 
     63        "Activate User Timer...", "Filters", "Page...", "Roster System", 
     64        "10-10" 
     65    }; 
     66    private final String[] WITH_ASSIGNED_INC_LABELS = 
     67    { 
     68        "STAGE", "10-97", 
     69        "10-8", "ASSIGNED ALT...", "ENRT ALT...", "10-97 ALT...", 
     70        "Open Incident", "Recall Incident", "Open Unit Details", 
     71        "Open Unit Activity Log", "Map", "Recall Linked Incidents", 
     72        "Cancel", "Reassign", "Duplicate", "Unit Poll", "Quick Note...", 
     73        "Activate User Timer...", "Filters", "Page...", "Fax..." 
     74    }; 
    7975    private final String LABEL_SPACING = "     "; 
    80  
    8176    // this box holds both the table and the buttons below 
    8277    private Box unitStatusFrame; 
    83  
    8478    private JTable unitStatusTable; 
    8579    private JFrame unitStatusMenu; 
    8680    private JFrame unitStatusWithAssignedIncMenu; 
    87  
    8881    // labels for the drop down menu 
    8982    private JLabel[] dropDownLabels = new JLabel[LABELS.length]; 
    9083    private JLabel[] dropDownWithAssignedIncLabels = new JLabel[WITH_ASSIGNED_INC_LABELS.length]; 
    91  
    9284    private JButton buttonEnrt; 
    9385    private JButton buttonStage; 
     
    10193    private JButton buttonOOS; 
    10294 
    103     public UnitStatus() { 
     95    public UnitStatus() 
     96    { 
    10497        initComponents(); 
    10598    } 
    10699 
    107     private void initComponents() { 
     100    private void initComponents() 
     101    { 
    108102        initializeTable(); 
    109103        initControllers(); 
     
    138132     * drop feature. 
    139133     */ 
    140     private void initializeTable() { 
    141         unitStatusTable = new JTable() { 
     134    private void initializeTable() 
     135    { 
     136        unitStatusTable = new JTable() 
     137        { 
    142138            /** 
    143139             * Custom renderer to set different background/foreground colors 
    144              *  
    145              * @see javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, 
    146              *      int, int) 
     140             * 
     141             * @see 
     142             * javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, 
     143             * int, int) 
    147144             */ 
    148145            public Component prepareRenderer(TableCellRenderer renderer, 
    149                     int row, int column) { 
     146                    int row, int column) 
     147            { 
    150148                Component comp = super.prepareRenderer(renderer, row, column); 
    151149 
    152150                int unitNumColumn = 2; 
    153                 try { 
     151                try 
     152                { 
    154153                    switch (ScreenManager.theCoordinator 
    155154                            .getCadDataUnitStatus((String) unitStatusTable 
    156                                     .getValueAt(row, unitNumColumn))) { 
    157                     case Assignable: 
    158                         comp.setForeground(Color.GREEN); 
    159                         comp.setBackground(Color.BLACK); 
    160                         break; 
    161                     case Arrived: 
    162                         comp.setForeground(Color.YELLOW); 
    163                         comp.setBackground(Color.BLACK); 
    164                         break; 
    165                     case NotAssignable: 
    166                         comp.setForeground(Color.BLACK); 
    167                         comp.setBackground(Color.GRAY); 
    168                         break; 
    169                     case Enroute: 
    170                         comp.setForeground(Color.CYAN); 
    171                         comp.setBackground(Color.BLACK); 
    172                         break; 
     155                            .getValueAt(row, unitNumColumn))) 
     156                    { 
     157                        case Assignable: 
     158                            comp.setForeground(Color.GREEN); 
     159                            comp.setBackground(Color.BLACK); 
     160                            break; 
     161                        case Arrived: 
     162                            comp.setForeground(Color.YELLOW); 
     163                            comp.setBackground(Color.BLACK); 
     164                            break; 
     165                        case NotAssignable: 
     166                            comp.setForeground(Color.BLACK); 
     167                            comp.setBackground(Color.GRAY); 
     168                            break; 
     169                        case Enroute: 
     170                            comp.setForeground(Color.CYAN); 
     171                            comp.setBackground(Color.BLACK); 
     172                            break; 
    173173                    } 
    174                 } catch (RemoteException e) { 
     174                } catch (RemoteException e) 
     175                { 
    175176                    e.printStackTrace(); 
    176177                } 
    177178 
    178                 if (getSelectedRow() == row) { 
     179                if (getSelectedRow() == row) 
     180                { 
    179181                    comp.setForeground(Color.WHITE); 
    180182                    comp.setBackground(Color.BLUE); 
     
    198200                .setColumnIdentifiers(TableHeaders.UNIT_STATUS_HEADERS); 
    199201 
    200         unitStatusTable.setTransferHandler(new TransferHandler() { 
    201  
    202             public boolean canImport(TransferHandler.TransferSupport info) { 
    203                 if (!info.isDataFlavorSupported(DataFlavor.stringFlavor)) { 
     202        unitStatusTable.setTransferHandler(new TransferHandler() 
     203        { 
     204            public boolean canImport(TransferHandler.TransferSupport info) 
     205            { 
     206                if (!info.isDataFlavorSupported(DataFlavor.stringFlavor)) 
     207                { 
    204208                    return false; 
    205209                } 
     
    207211            } 
    208212 
    209             public int getSourceActions(JComponent c) { 
     213            public int getSourceActions(JComponent c) 
     214            { 
    210215                return TransferHandler.COPY_OR_MOVE; 
    211216            } 
    212217 
    213             protected Transferable createTransferable(JComponent c) { 
     218            protected Transferable createTransferable(JComponent c) 
     219            { 
    214220                return new StringSelection((String) unitStatusTable.getValueAt( 
    215221                        unitStatusTable.getSelectedRow(), 2)); 
    216222            } 
    217  
    218223        }); 
    219224 
    220         for (int i = 0; i < unitStatusTable.getColumnCount(); i++) { 
     225        for (int i = 0; i < unitStatusTable.getColumnCount(); i++) 
     226        { 
    221227            unitStatusTable.getColumnModel().getColumn(i) 
    222228                    .setPreferredWidth(COLUMN_WIDTH); 
     
    228234     * screen. 
    229235     */ 
    230     private void initControllers() { 
    231         unitStatusTable.addMouseListener(new MouseListener() { 
    232             public void mouseClicked(MouseEvent e) { 
     236//TODO: JD    If one unit has been selected, but you right-click on a different one. 
     237//Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Invalid index 
     238//      at javax.swing.DefaultRowSorter.convertRowIndexToModel(DefaultRowSorter.java:514) 
     239//      at javax.swing.JTable.convertRowIndexToModel(JTable.java:2642) 
     240//      at javax.swing.JTable.getValueAt(JTable.java:2717) 
     241//      at tmcsim.client.cadclientgui.screens.UnitStatus$3.mouseClicked(UnitStatus.java:234) 
     242    private void initControllers() 
     243    { 
     244        unitStatusTable.addMouseListener(new MouseListener() 
     245        { 
     246            public void mouseClicked(MouseEvent e) 
     247            { 
    233248                int unitColumn = 2; 
     249                // Fixed to force right click to cause the row to be selected. JD 
     250                // get the coordinates of the mouse click 
     251                Point p = e.getPoint(); 
     252                // get the row index that contains that coordinate 
     253                int rowNumber = unitStatusTable.rowAtPoint(p); 
     254                // Get the ListSelectionModel of the JTable 
     255                ListSelectionModel model = unitStatusTable.getSelectionModel(); 
     256                // set the selected interval of rows. Using the "rowNumber" 
     257                // variable for the beginning and end selects only that one row. 
     258                model.setSelectionInterval(rowNumber, rowNumber); 
     259 
    234260                String unitNum = (String) unitStatusTable.getValueAt( 
    235                         unitStatusTable.getSelectedRow(), unitColumn); 
    236                 if (SwingUtilities.isRightMouseButton(e)) { 
    237                     try { 
     261                        rowNumber, unitColumn); 
     262                // Validity check for non-empty unit number 
     263                if (unitNum.equals("")) 
     264                { 
     265                    return; 
     266                } 
     267                if (SwingUtilities.isRightMouseButton(e)) 
     268                { 
     269                    try 
     270                    { 
    238271                        if (ScreenManager.theCoordinator 
    239272                                .getCadDataUnitStatus(unitNum) == UnitStatusEnums.Enroute 
    240273                                || ScreenManager.theCoordinator 
    241                                         .getCadDataUnitStatus(unitNum) == UnitStatusEnums.Arrived) { 
     274                                .getCadDataUnitStatus(unitNum) == UnitStatusEnums.Arrived) 
     275                        { 
    242276                            openDropDownWithAssignedIncMenu(e); 
    243                         } else { 
     277                        } 
     278                        else 
     279                        { 
    244280                            openDropDownMenu(e); 
    245281                        } 
    246                     } catch (RemoteException e1) { 
     282                    } catch (RemoteException e1) 
     283                    { 
    247284                        e1.printStackTrace(); 
    248285                    } 
    249                 } else { 
     286                } 
     287                else 
     288                { 
    250289                    closeDropDownMenu(); 
    251290                    closeDropDownWithAssignedIncMenu(); 
     
    253292            } 
    254293 
    255             public void mouseEntered(MouseEvent e) { 
    256             } 
    257  
    258             public void mouseExited(MouseEvent e) { 
    259             } 
    260  
    261             public void mousePressed(MouseEvent e) { 
    262             } 
    263  
    264             public void mouseReleased(MouseEvent e) { 
     294            public void mouseEntered(MouseEvent e) 
     295            { 
     296            } 
     297 
     298            public void mouseExited(MouseEvent e) 
     299            { 
     300            } 
     301 
     302            public void mousePressed(MouseEvent e) 
     303            { 
     304            } 
     305 
     306            public void mouseReleased(MouseEvent e) 
     307            { 
    265308            } 
    266309        }); 
    267310 
    268         addComponentListener(new ComponentListener() { 
    269             public void componentHidden(ComponentEvent e) { 
    270             } 
    271  
    272             public void componentMoved(ComponentEvent e) { 
     311        addComponentListener(new ComponentListener() 
     312        { 
     313            public void componentHidden(ComponentEvent e) 
     314            { 
     315            } 
     316 
     317            public void componentMoved(ComponentEvent e) 
     318            { 
    273319                closeDropDownMenu(); 
    274320            } 
    275321 
    276             public void componentResized(ComponentEvent e) { 
    277             } 
    278  
    279             public void componentShown(ComponentEvent e) { 
     322            public void componentResized(ComponentEvent e) 
     323            { 
     324            } 
     325 
     326            public void componentShown(ComponentEvent e) 
     327            { 
    280328            } 
    281329        }); 
     
    286334     * on the table. 
    287335     */ 
    288     private void initializeDropDownMenus() { 
     336    private void initializeDropDownMenus() 
     337    { 
    289338        Box menu = new Box(BoxLayout.Y_AXIS); 
    290339        initializeDropDownLabels(); 
     
    319368     * labels are not implemented so no listeners are added. 
    320369     */ 
    321     private void initializeDropDownLabels() { 
    322         for (int i = 0; i < dropDownLabels.length; i++) { 
     370    private void initializeDropDownLabels() 
     371    { 
     372        for (int i = 0; i < dropDownLabels.length; i++) 
     373        { 
    323374            dropDownLabels[i] = new JLabel(LABEL_SPACING + LABELS[i]); 
    324375            dropDownLabels[i].setMaximumSize(DROP_DOWN_MENU_LABEL_DIMENSIONS); 
     
    330381     * Sets the text and size and adds a listener to each activated label. 
    331382     */ 
    332     private void initializeDropDownWithAssignedIncLabels() { 
    333         for (int i = 0; i < dropDownWithAssignedIncLabels.length; i++) { 
     383    private void initializeDropDownWithAssignedIncLabels() 
     384    { 
     385        for (int i = 0; i < dropDownWithAssignedIncLabels.length; i++) 
     386        { 
    334387            dropDownWithAssignedIncLabels[i] = new JLabel(LABEL_SPACING 
    335388                    + WITH_ASSIGNED_INC_LABELS[i]); 
     
    347400     * between. 
    348401     */ 
    349     private void addLabelsToBox(Box menu) { 
     402    private void addLabelsToBox(Box menu) 
     403    { 
    350404        menu.add(dropDownLabels[0]); 
    351405        menu.add(dropDownLabels[1]); 
     
    400454     * between. 
    401455     */ 
    402     private void addWithAssignedIncLabelsToBox(Box menu) { 
     456    private void addWithAssignedIncLabelsToBox(Box menu) 
     457    { 
    403458        menu.add(dropDownWithAssignedIncLabels[0]); 
    404459        menu.add(dropDownWithAssignedIncLabels[1]); 
     
    454509     * Creates each button and handles the action performed by the button. 
    455510     */ 
    456     public void initializeBottomButtons(Box bottomButtons) { 
    457         bottomButtons.add(buttonEnrt = makeButton("ENRT", new ActionListener() { 
    458             public void actionPerformed(ActionEvent arg0) { 
    459                 try { 
     511    public void initializeBottomButtons(Box bottomButtons) 
     512    { 
     513        bottomButtons.add(buttonEnrt = makeButton("ENRT", new ActionListener() 
     514        { 
     515            public void actionPerformed(ActionEvent arg0) 
     516            { 
     517                try 
     518                { 
    460519                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    461520                            (String) unitStatusTable.getValueAt( 
    462                                     unitStatusTable.getSelectedRow(), 2), 
     521                            unitStatusTable.getSelectedRow(), 2), 
    463522                            UNIT_TAGS.STATUS, "ENRT"); 
    464523                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    465524                            (String) unitStatusTable.getValueAt( 
    466                                     unitStatusTable.getSelectedRow(), 2), 
     525                            unitStatusTable.getSelectedRow(), 2), 
    467526                            UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Enroute); 
    468                 } catch (RemoteException e) { 
     527                } catch (RemoteException e) 
     528                { 
    469529                    e.printStackTrace(); 
    470530                } 
     
    473533        })); 
    474534        bottomButtons.add(buttonStage = makeButton("STAGE", 
    475                 new ActionListener() { 
    476                     public void actionPerformed(ActionEvent arg0) { 
    477                         try { 
    478                             ScreenManager.theCoordinator.setCadDataUnitValue( 
    479                                     (String) unitStatusTable 
    480                                             .getValueAt(unitStatusTable 
    481                                                     .getSelectedRow(), 2), 
    482                                     UNIT_TAGS.STATUS, "STAGE"); 
    483                         } catch (RemoteException e) { 
    484                             e.printStackTrace(); 
    485                         } 
    486                         refreshTable(); 
    487                     } 
    488                 })); 
     535                new ActionListener() 
     536        { 
     537            public void actionPerformed(ActionEvent arg0) 
     538            { 
     539                try 
     540                { 
     541                    ScreenManager.theCoordinator.setCadDataUnitValue( 
     542                            (String) unitStatusTable 
     543                            .getValueAt(unitStatusTable 
     544                            .getSelectedRow(), 2), 
     545                            UNIT_TAGS.STATUS, "STAGE"); 
     546                } catch (RemoteException e) 
     547                { 
     548                    e.printStackTrace(); 
     549                } 
     550                refreshTable(); 
     551            } 
     552        })); 
    489553        bottomButtons.add(button1097 = makeButton("10-97", 
    490                 new ActionListener() { 
    491                     public void actionPerformed(ActionEvent arg0) { 
    492                         try { 
    493                             ScreenManager.theCoordinator.setCadDataUnitValue( 
    494                                     (String) unitStatusTable 
    495                                             .getValueAt(unitStatusTable 
    496                                                     .getSelectedRow(), 2), 
    497                                     UNIT_TAGS.STATUS, "10-97"); 
    498                             ScreenManager.theCoordinator.setCadDataUnitValue( 
    499                                     (String) unitStatusTable 
    500                                             .getValueAt(unitStatusTable 
    501                                                     .getSelectedRow(), 2), 
    502                                     UNIT_TAGS.UNIT_STATUS, 
    503                                     UnitStatusEnums.Arrived); 
    504                         } catch (RemoteException e) { 
    505                             e.printStackTrace(); 
    506                         } 
    507                         refreshTable(); 
    508                     } 
    509                 })); 
     554                new ActionListener() 
     555        { 
     556            public void actionPerformed(ActionEvent arg0) 
     557            { 
     558                try 
     559                { 
     560                    ScreenManager.theCoordinator.setCadDataUnitValue( 
     561                            (String) unitStatusTable 
     562                            .getValueAt(unitStatusTable 
     563                            .getSelectedRow(), 2), 
     564                            UNIT_TAGS.STATUS, "10-97"); 
     565                    ScreenManager.theCoordinator.setCadDataUnitValue( 
     566                            (String) unitStatusTable 
     567                            .getValueAt(unitStatusTable 
     568                            .getSelectedRow(), 2), 
     569                            UNIT_TAGS.UNIT_STATUS, 
     570                            UnitStatusEnums.Arrived); 
     571                } catch (RemoteException e) 
     572                { 
     573                    e.printStackTrace(); 
     574                } 
     575                refreshTable(); 
     576            } 
     577        })); 
    510578        bottomButtons.add(buttonCode4 = makeButton("CODE 4", 
    511                 new ActionListener() { 
    512                     public void actionPerformed(ActionEvent arg0) { 
    513                         try { 
    514                             ScreenManager.theCoordinator.setCadDataUnitValue( 
    515                                     (String) unitStatusTable 
    516                                             .getValueAt(unitStatusTable 
    517                                                     .getSelectedRow(), 2), 
    518                                     UNIT_TAGS.STATUS, "CODE 4"); 
    519                         } catch (RemoteException e) { 
    520                             e.printStackTrace(); 
    521                         } 
    522                         refreshTable(); 
    523                     } 
    524                 })); 
     579                new ActionListener() 
     580        { 
     581            public void actionPerformed(ActionEvent arg0) 
     582            { 
     583                try 
     584                { 
     585                    ScreenManager.theCoordinator.setCadDataUnitValue( 
     586                            (String) unitStatusTable 
     587                            .getValueAt(unitStatusTable 
     588                            .getSelectedRow(), 2), 
     589                            UNIT_TAGS.STATUS, "CODE 4"); 
     590                } catch (RemoteException e) 
     591                { 
     592                    e.printStackTrace(); 
     593                } 
     594                refreshTable(); 
     595            } 
     596        })); 
    525597        bottomButtons.add(buttonDash1 = makeButton("-", null)); 
    526598        bottomButtons.add(buttonDash2 = makeButton("-", null)); 
    527599        bottomButtons.add(buttonDash3 = makeButton("-", null)); 
    528         bottomButtons.add(button108 = makeButton("10-8", new ActionListener() { 
    529             public void actionPerformed(ActionEvent arg0) { 
    530                 try { 
     600        bottomButtons.add(button108 = makeButton("10-8", new ActionListener() 
     601        { 
     602            public void actionPerformed(ActionEvent arg0) 
     603            { 
     604                try 
     605                { 
    531606                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    532607                            (String) unitStatusTable.getValueAt( 
    533                                     unitStatusTable.getSelectedRow(), 2), 
     608                            unitStatusTable.getSelectedRow(), 2), 
    534609                            UNIT_TAGS.STATUS, "10-8"); 
    535610                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    536611                            (String) unitStatusTable.getValueAt( 
    537                                     unitStatusTable.getSelectedRow(), 2), 
     612                            unitStatusTable.getSelectedRow(), 2), 
    538613                            UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Assignable); 
    539                 } catch (RemoteException e) { 
     614                } catch (RemoteException e) 
     615                { 
    540616                    e.printStackTrace(); 
    541617                } 
     
    543619            } 
    544620        })); 
    545         bottomButtons.add(buttonOFC = makeButton("OFC", new ActionListener() { 
    546             public void actionPerformed(ActionEvent arg0) { 
    547                 try { 
     621        bottomButtons.add(buttonOFC = makeButton("OFC", new ActionListener() 
     622        { 
     623            public void actionPerformed(ActionEvent arg0) 
     624            { 
     625                try 
     626                { 
    548627                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    549628                            (String) unitStatusTable.getValueAt( 
    550                                     unitStatusTable.getSelectedRow(), 2), 
     629                            unitStatusTable.getSelectedRow(), 2), 
    551630                            UNIT_TAGS.STATUS, "OFC"); 
    552631                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    553632                            (String) unitStatusTable.getValueAt( 
    554                                     unitStatusTable.getSelectedRow(), 2), 
     633                            unitStatusTable.getSelectedRow(), 2), 
    555634                            UNIT_TAGS.UNIT_STATUS, UnitStatusEnums.Arrived); 
    556                 } catch (RemoteException e) { 
     635                } catch (RemoteException e) 
     636                { 
    557637                    e.printStackTrace(); 
    558638                } 
     
    560640            } 
    561641        })); 
    562         bottomButtons.add(buttonOOS = makeButton("OOS", new ActionListener() { 
    563             public void actionPerformed(ActionEvent arg0) { 
    564                 try { 
     642        bottomButtons.add(buttonOOS = makeButton("OOS", new ActionListener() 
     643        { 
     644            public void actionPerformed(ActionEvent arg0) 
     645            { 
     646                try 
     647                { 
    565648                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    566649                            (String) unitStatusTable.getValueAt( 
    567                                     unitStatusTable.getSelectedRow(), 2), 
     650                            unitStatusTable.getSelectedRow(), 2), 
    568651                            UNIT_TAGS.STATUS, "OOS"); 
    569652                    ScreenManager.theCoordinator.setCadDataUnitValue( 
    570653                            (String) unitStatusTable.getValueAt( 
    571                                     unitStatusTable.getSelectedRow(), 2), 
     654                            unitStatusTable.getSelectedRow(), 2), 
    572655                            UNIT_TAGS.UNIT_STATUS, 
    573656                            UnitStatusEnums.NotAssignable); 
    574                 } catch (RemoteException e) { 
     657                } catch (RemoteException e) 
     658                { 
    575659                    e.printStackTrace(); 
    576660                } 
     
    582666    /* 
    583667     * Makes a JButton with an text and listener. 
    584      *  
     668     * 
    585669     * @param text the text to be displayed 
    586      *  
     670     * 
    587671     * @param listener the action listener for this button. 
    588      *  
     672     * 
    589673     * @return the JButton. 
    590674     */ 
    591     public JButton makeButton(String text, ActionListener listener) { 
     675    public JButton makeButton(String text, ActionListener listener) 
     676    { 
    592677        JButton button = new JButton(text); 
    593678        button.setBackground(Color.GRAY); 
     
    606691     * Sets the highlighted color(when the mouse is over it) of the JLabels. 
    607692     * Note: the color is not shown until .setOpaque(true) is called. 
    608      *  
     693     * 
    609694     * @param color the highlighted color 
    610695     */ 
    611     public void setMenuHighlightedBackground(Color color) { 
    612         for (int i = 0; i < dropDownLabels.length; i++) { 
     696    public void setMenuHighlightedBackground(Color color) 
     697    { 
     698        for (int i = 0; i < dropDownLabels.length; i++) 
     699        { 
    613700            dropDownLabels[i].setBackground(color); 
    614701        } 
     
    618705     * Sets the highlighted color(when the mouse is over it) of the JLabels. 
    619706     * Note: the color is not shown until .setOpaque(true) is called. 
    620      *  
     707     * 
    621708     * @param color the highlighted color 
    622709     */ 
    623     public void setWithAssignedIncMenuHighlightedBackground(Color color) { 
    624         for (int i = 0; i < dropDownWithAssignedIncLabels.length; i++) { 
     710    public void setWithAssignedIncMenuHighlightedBackground(Color color) 
     711    { 
     712        for (int i = 0; i < dropDownWithAssignedIncLabels.length; i++) 
     713        { 
    625714            dropDownWithAssignedIncLabels[i].setBackground(color); 
    626715        } 
     
    630719     * Sets all JLabels to not display a highlighted background 
    631720     */ 
    632     public void unSelectAllLabels() { 
    633         for (int i = 0; i < dropDownLabels.length; i++) { 
     721    public void unSelectAllLabels() 
     722    { 
     723        for (int i = 0; i < dropDownLabels.length; i++) 
     724        { 
    634725            dropDownLabels[i].setOpaque(false); 
    635726        } 
     
    639730     * Sets all JLabels to not display a highlighted background 
    640731     */ 
    641     public void unSelectAllWithAssignedIncLabels() { 
    642         for (int i = 0; i < dropDownWithAssignedIncLabels.length; i++) { 
     732    public void unSelectAllWithAssignedIncLabels() 
     733    { 
     734        for (int i = 0; i < dropDownWithAssignedIncLabels.length; i++) 
     735        { 
    643736            dropDownWithAssignedIncLabels[i].setOpaque(false); 
    644737        } 
     
    647740    /* 
    648741     * Sets the label to have a highlighted background. 
    649      *  
     742     * 
    650743     * @param label the label that is selected/highlighted 
    651744     */ 
    652     public void selectLabel(Object label) { 
     745    public void selectLabel(Object label) 
     746    { 
    653747        ((JLabel) label).setOpaque(true); 
    654748    } 
     
    657751     * Performs the label action depending on which label was clicked. 
    658752     */ 
    659     public void performLabelAction(Object label) { 
    660         if (label.equals(dropDownLabels[0])) { // 10-8 
    661  
    662         } else if (label.equals(dropDownLabels[1])) { // OFC 
    663  
    664         } else if (label.equals(dropDownLabels[2])) { // OOS 
    665  
    666         } else if (label.equals(dropDownLabels[3])) { // Open Unit Details 
    667  
    668         } else if (label.equals(dropDownLabels[4])) { // Open Unit Activity Log 
    669  
    670         } else if (label.equals(dropDownLabels[5])) { // Map 
    671  
    672         } else if (label.equals(dropDownLabels[6])) { // Change Vehicle 
    673  
    674         } else if (label.equals(dropDownLabels[7])) { // Unit Poll 
    675  
    676         } else if (label.equals(dropDownLabels[8])) { // Quick Notes 
    677  
    678         } else if (label.equals(dropDownLabels[9])) { // Activate User Timer 
    679  
    680         } else if (label.equals(dropDownLabels[10])) { // Filters 
    681  
    682         } else if (label.equals(dropDownLabels[11])) { // Page 
    683  
    684         } else if (label.equals(dropDownLabels[12])) { // Roster System 
    685  
    686         } else if (label.equals(dropDownLabels[13])) { // 10-10 
    687  
     753    public void performLabelAction(Object label) 
     754    { 
     755        if (label.equals(dropDownLabels[0])) 
     756        { // 10-8 
     757        } 
     758        else if (label.equals(dropDownLabels[1])) 
     759        { // OFC 
     760        } 
     761        else if (label.equals(dropDownLabels[2])) 
     762        { // OOS 
     763        } 
     764        else if (label.equals(dropDownLabels[3])) 
     765        { // Open Unit Details 
     766        } 
     767        else if (label.equals(dropDownLabels[4])) 
     768        { // Open Unit Activity Log 
     769        } 
     770        else if (label.equals(dropDownLabels[5])) 
     771        { // Map 
     772        } 
     773        else if (label.equals(dropDownLabels[6])) 
     774        { // Change Vehicle 
     775        } 
     776        else if (label.equals(dropDownLabels[7])) 
     777        { // Unit Poll 
     778        } 
     779        else if (label.equals(dropDownLabels[8])) 
     780        { // Quick Notes 
     781        } 
     782        else if (label.equals(dropDownLabels[9])) 
     783        { // Activate User Timer 
     784        } 
     785        else if (label.equals(dropDownLabels[10])) 
     786        { // Filters 
     787        } 
     788        else if (label.equals(dropDownLabels[11])) 
     789        { // Page 
     790        } 
     791        else if (label.equals(dropDownLabels[12])) 
     792        { // Roster System 
     793        } 
     794        else if (label.equals(dropDownLabels[13])) 
     795        { // 10-10 
    688796        } 
    689797    } 
     
    692800     * Performs the label action depending on which label was clicked. 
    693801     */ 
    694     public void performWithAssignedIncLabelAction(Object label) { 
    695         if (label.equals(dropDownWithAssignedIncLabels[0])) { // STAGE 
    696  
    697         } else if (label.equals(dropDownWithAssignedIncLabels[1])) { // 10-97 
    698  
    699         } else if (label.equals(dropDownWithAssignedIncLabels[2])) { // 10-8 
    700  
    701         } else if (label.equals(dropDownWithAssignedIncLabels[3])) { // ASSIGN 
    702                                                                         // ALT... 
    703  
    704         } else if (label.equals(dropDownWithAssignedIncLabels[4])) { // ENRT 
    705                                                                         // ALT... 
    706  
    707         } else if (label.equals(dropDownWithAssignedIncLabels[5])) { // 10-97 
    708                                                                         // ALT... 
    709  
    710         } else if (label.equals(dropDownWithAssignedIncLabels[6])) { // Open 
    711                                                                         // Incident 
     802    public void performWithAssignedIncLabelAction(Object label) 
     803    { 
     804        if (label.equals(dropDownWithAssignedIncLabels[0])) 
     805        { // STAGE 
     806        } 
     807        else if (label.equals(dropDownWithAssignedIncLabels[1])) 
     808        { // 10-97 
     809        } 
     810        else if (label.equals(dropDownWithAssignedIncLabels[2])) 
     811        { // 10-8 
     812        } 
     813        else if (label.equals(dropDownWithAssignedIncLabels[3])) 
     814        { // ASSIGN 
     815            // ALT... 
     816        } 
     817        else if (label.equals(dropDownWithAssignedIncLabels[4])) 
     818        { // ENRT 
     819            // ALT... 
     820        } 
     821        else if (label.equals(dropDownWithAssignedIncLabels[5])) 
     822        { // 10-97 
     823            // ALT... 
     824        } 
     825        else if (label.equals(dropDownWithAssignedIncLabels[6])) 
     826        { // Open 
     827            // Incident 
    712828            int idColumn = 0; 
    713829            ScreenManager.openIncidentViewer(Integer 
    714830                    .parseInt((String) unitStatusTable.getValueAt( 
    715                             unitStatusTable.getSelectedRow(), idColumn))); 
    716         } else if (label.equals(dropDownWithAssignedIncLabels[7])) { // Recall 
    717                                                                         // Incident 
    718  
    719         } else if (label.equals(dropDownWithAssignedIncLabels[8])) { // Open 
    720                                                                         // Unit 
    721                                                                         // Details 
    722  
    723         } else if (label.equals(dropDownWithAssignedIncLabels[9])) { // Open 
    724                                                                         // Unit 
    725                                                                         // Activity 
    726                                                                         // Log 
    727  
    728         } else if (label.equals(dropDownWithAssignedIncLabels[10])) { // Map 
    729  
    730         } else if (label.equals(dropDownWithAssignedIncLabels[11])) { // Recall 
    731                                                                         // Linked 
    732                                                                         // Incidents 
    733  
    734         } else if (label.equals(dropDownWithAssignedIncLabels[12])) { // Cancel 
    735  
    736         } else if (label.equals(dropDownWithAssignedIncLabels[13])) { // Reassign 
    737  
    738         } else if (label.equals(dropDownWithAssignedIncLabels[14])) { // Duplicate 
    739  
    740         } else if (label.equals(dropDownWithAssignedIncLabels[15])) { // Unit 
    741                                                                         // Poll 
    742  
    743         } else if (label.equals(dropDownWithAssignedIncLabels[16])) { // Quick 
    744                                                                         // Note... 
    745  
    746         } else if (label.equals(dropDownWithAssignedIncLabels[17])) { // Activate 
    747                                                                         // User 
    748                                                                         // Timer... 
    749  
    750         } else if (label.equals(dropDownWithAssignedIncLabels[18])) { // Filters 
    751  
    752         } else if (label.equals(dropDownWithAssignedIncLabels[19])) { // Page... 
    753  
    754         } else if (label.equals(dropDownWithAssignedIncLabels[20])) { // Fax... 
    755  
     831                    unitStatusTable.getSelectedRow(), idColumn))); 
     832        } 
     833        else if (label.equals(dropDownWithAssignedIncLabels[7])) 
     834        { // Recall 
     835            // Incident 
     836        } 
     837        else if (label.equals(dropDownWithAssignedIncLabels[8])) 
     838        { // Open 
     839            // Unit 
     840            // Details 
     841        } 
     842        else if (label.equals(dropDownWithAssignedIncLabels[9])) 
     843        { // Open 
     844            // Unit 
     845            // Activity 
     846            // Log 
     847        } 
     848        else if (label.equals(dropDownWithAssignedIncLabels[10])) 
     849        { // Map 
     850        } 
     851        else if (label.equals(dropDownWithAssignedIncLabels[11])) 
     852        { // Recall 
     853            // Linked 
     854            // Incidents 
     855        } 
     856        else if (label.equals(dropDownWithAssignedIncLabels[12])) 
     857        { // Cancel 
     858        } 
     859        else if (label.equals(dropDownWithAssignedIncLabels[13])) 
     860        { // Reassign 
     861        } 
     862        else if (label.equals(dropDownWithAssignedIncLabels[14])) 
     863        { // Duplicate 
     864        } 
     865        else if (label.equals(dropDownWithAssignedIncLabels[15])) 
     866        { // Unit 
     867            // Poll 
     868        } 
     869        else if (label.equals(dropDownWithAssignedIncLabels[16])) 
     870        { // Quick 
     871            // Note... 
     872        } 
     873        else if (label.equals(dropDownWithAssignedIncLabels[17])) 
     874        { // Activate 
     875            // User 
     876            // Timer... 
     877        } 
     878        else if (label.equals(dropDownWithAssignedIncLabels[18])) 
     879        { // Filters 
     880        } 
     881        else if (label.equals(dropDownWithAssignedIncLabels[19])) 
     882        { // Page... 
     883        } 
     884        else if (label.equals(dropDownWithAssignedIncLabels[20])) 
     885        { // Fax... 
    756886        } 
    757887    } 
     
    763893     * designates. 
    764894     */ 
    765     public void addMouseListenersToLabel(JLabel label) { 
    766         label.addMouseMotionListener(new MouseMotionListener() { 
    767             public void mouseDragged(MouseEvent e) { 
    768             } 
    769  
    770             public void mouseMoved(MouseEvent e) { 
     895    public void addMouseListenersToLabel(JLabel label) 
     896    { 
     897        label.addMouseMotionListener(new MouseMotionListener() 
     898        { 
     899            public void mouseDragged(MouseEvent e) 
     900            { 
     901            } 
     902 
     903            public void mouseMoved(MouseEvent e) 
     904            { 
    771905                unSelectAllLabels(); 
    772906                selectLabel(e.getSource()); 
     
    775909            } 
    776910        }); 
    777         label.addMouseListener(new MouseListener() { 
    778             public void mouseClicked(MouseEvent e) { 
     911        label.addMouseListener(new MouseListener() 
     912        { 
     913            public void mouseClicked(MouseEvent e) 
     914            { 
    779915                performLabelAction(e.getSource()); 
    780916                unSelectAllLabels(); 
     
    784920            } 
    785921 
    786             public void mouseEntered(MouseEvent e) { 
    787             } 
    788  
    789             public void mouseExited(MouseEvent e) { 
    790             } 
    791  
    792             public void mousePressed(MouseEvent e) { 
    793             } 
    794  
    795             public void mouseReleased(MouseEvent e) { 
     922            public void mouseEntered(MouseEvent e) 
     923            { 
     924            } 
     925 
     926            public void mouseExited(MouseEvent e) 
     927            { 
     928            } 
     929 
     930            public void mousePressed(MouseEvent e) 
     931            { 
     932            } 
     933 
     934            public void mouseReleased(MouseEvent e) 
     935            { 
    796936            } 
    797937        }); 
     
    804944     * designates. 
    805945     */ 
    806     public void addMouseListenersToWithAssignedIncLabel(JLabel label) { 
    807         label.addMouseMotionListener(new MouseMotionListener() { 
    808             public void mouseDragged(MouseEvent e) { 
    809             } 
    810  
    811             public void mouseMoved(MouseEvent e) { 
     946    public void addMouseListenersToWithAssignedIncLabel(JLabel label) 
     947    { 
     948        label.addMouseMotionListener(new MouseMotionListener() 
     949        { 
     950            public void mouseDragged(MouseEvent e) 
     951            { 
     952            } 
     953 
     954            public void mouseMoved(MouseEvent e) 
     955            { 
    812956                unSelectAllLabels(); 
    813957                selectLabel(e.getSource()); 
     
    816960            } 
    817961        }); 
    818         label.addMouseListener(new MouseListener() { 
    819             public void mouseClicked(MouseEvent e) { 
     962        label.addMouseListener(new MouseListener() 
     963        { 
     964            public void mouseClicked(MouseEvent e) 
     965            { 
    820966                performWithAssignedIncLabelAction(e.getSource()); 
    821967                unSelectAllLabels(); 
     
    825971            } 
    826972 
    827             public void mouseEntered(MouseEvent e) { 
    828             } 
    829  
    830             public void mouseExited(MouseEvent e) { 
    831             } 
    832  
    833             public void mousePressed(MouseEvent e) { 
    834             } 
    835  
    836             public void mouseReleased(MouseEvent e) { 
     973            public void mouseEntered(MouseEvent e) 
     974            { 
     975            } 
     976 
     977            public void mouseExited(MouseEvent e) 
     978            { 
     979            } 
     980 
     981            public void mousePressed(MouseEvent e) 
     982            { 
     983            } 
     984 
     985            public void mouseReleased(MouseEvent e) 
     986            { 
    837987            } 
    838988        }); 
     
    842992     * Displays the menu where the right click occurred. 
    843993     */ 
    844     public void openDropDownMenu(MouseEvent e) { 
     994    public void openDropDownMenu(MouseEvent e) 
     995    { 
    845996        unitStatusMenu.setLocation(e.getX() + this.getX(), 
    846997                e.getY() + this.getY()); 
     
    8511002     * Displays the menu where the right click occurred. 
    8521003     */ 
    853     public void openDropDownWithAssignedIncMenu(MouseEvent e) { 
     1004    public void openDropDownWithAssignedIncMenu(MouseEvent e) 
     1005    { 
    8541006        unitStatusWithAssignedIncMenu.setLocation(e.getX() + this.getX(), 
    8551007                e.getY() + this.getY()); 
     
    8601012     * Hides the menu. 
    8611013     */ 
    862     public void closeDropDownMenu() { 
     1014    public void closeDropDownMenu() 
     1015    { 
    8631016        unSelectAllLabels(); 
    8641017        unitStatusMenu.revalidate(); 
     
    8701023     * Hides the menu. 
    8711024     */ 
    872     public void closeDropDownWithAssignedIncMenu() { 
     1025    public void closeDropDownWithAssignedIncMenu() 
     1026    { 
    8731027        unSelectAllLabels(); 
    8741028        unitStatusWithAssignedIncMenu.revalidate(); 
     
    8791033    /* 
    8801034     * Refreshes the data in the table by updating all data and repainting the 
    881      * screen. It saves user preferences(like column sizes, selected row, sorted preferences)  
     1035     * screen. It saves user preferences(like column sizes, selected row, sorted preferences) 
    8821036     * and applies them to the updated model it receives from the server. 
    8831037     */ 
    884     public void refreshTable() { 
    885         if(unitStatusTable.getTableHeader().getResizingColumn() == null){//only update info if resize not in progress 
    886               try { 
     1038    public void refreshTable() 
     1039    { 
     1040        if (unitStatusTable.getTableHeader().getResizingColumn() == null) 
     1041        {//only update info if resize not in progress 
     1042            try 
     1043            { 
    8871044                int index = unitStatusTable.getSelectedRow(); 
    8881045                List<? extends SortKey> keys = unitStatusTable.getRowSorter().getSortKeys(); 
    8891046                int[] columnWidths = new int[20]; 
    890                 for(int i = 0; i < unitStatusTable.getColumnCount(); i++){ 
     1047                for (int i = 0; i < unitStatusTable.getColumnCount(); i++) 
     1048                { 
    8911049                    columnWidths[i] = unitStatusTable.getColumnModel().getColumn(i).getWidth(); 
    8921050                } 
    893                  
     1051 
    8941052                unitStatusTable.setModel(ScreenManager.theCoordinator.getCadDataTable(CADDataEnums.TABLE.UNIT_STATUS)); 
    895                  
    896                 for(int i = 0; i < unitStatusTable.getColumnCount(); i++){ 
     1053 
     1054                for (int i = 0; i < unitStatusTable.getColumnCount(); i++) 
     1055                { 
    8971056                    unitStatusTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidths[i]); 
    8981057                } 
    8991058                unitStatusTable.getRowSorter().setSortKeys(keys); 
    9001059                unitStatusTable.getSelectionModel().setSelectionInterval(index, index); 
    901                 } catch (RemoteException e) { 
    902                     e.printStackTrace(); 
    903                 } 
    904                 revalidate(); 
    905                 repaint(); 
    906           } 
     1060            } catch (RemoteException e) 
     1061            { 
     1062                e.printStackTrace(); 
     1063            } 
     1064            revalidate(); 
     1065            repaint(); 
     1066        } 
    9071067    } 
    9081068 
     
    9101070     * Makes screen visible. 
    9111071     */ 
    912     public void open() { 
     1072    public void open() 
     1073    { 
    9131074        setVisible(true); 
    9141075    } 
     
    9171078     * Hides screen. 
    9181079     */ 
    919     public void close() { 
     1080    public void close() 
     1081    { 
    9201082        setVisible(false); 
    9211083    } 
     
    9231085    /** 
    9241086     * This method is called every second in ScreenManger to update the display 
    925      * time every second. 
    926      */ 
    927     public void handleUpdateTime() { 
    928         int timerColumn = 13; 
    929         int unitColumn = 2; 
    930         for (int i = 0; i < unitStatusTable.getModel().getRowCount(); i++) { 
    931             try { 
    932                 unitStatusTable.getModel().setValueAt( 
    933                         ScreenManager.theCoordinator.getCadDataUnitValue( 
    934                                 (String) unitStatusTable.getModel().getValueAt( 
    935                                         i, unitColumn), UNIT_TAGS.TIMER), i, 
    936                         timerColumn); 
    937             } catch (RemoteException e) { 
    938                 e.printStackTrace(); 
    939             } 
    940         } 
    941     } 
    942  
     1087     * time every second. Seems redundant: refreshTable already takes care of 
     1088     * it. JD 
     1089     */ 
     1090//    public void handleUpdateTime() 
     1091//    { 
     1092//        int timerColumn = 13; 
     1093//        int unitColumn = 2; 
     1094//        for (int i = 0; i < unitStatusTable.getModel().getRowCount(); i++) 
     1095//        { 
     1096//            try 
     1097//            { 
     1098//                unitStatusTable.getModel().setValueAt( 
     1099//                        ScreenManager.theCoordinator.getCadDataUnitValue( 
     1100//                        (String) unitStatusTable.getModel().getValueAt( 
     1101//                        i, unitColumn), UNIT_TAGS.TIMER), i, 
     1102//                        timerColumn); 
     1103//            } catch (RemoteException e) 
     1104//            { 
     1105//                e.printStackTrace(); 
     1106//            } 
     1107//        } 
     1108//    } 
     1109// 
     1110//    /** 
     1111//     * Replaces handleUpdateTime 
     1112//     */ 
     1113//    public void updateTimeColumn() 
     1114//    { 
     1115//        int unitColumn = 2; 
     1116//        try 
     1117//        { 
     1118//            DefaultTableModel dm = ScreenManager.theCoordinator.getCadDataTable(CADDataEnums.TABLE.UNIT_STATUS); 
     1119//            int size = dm.getRowCount(); 
     1120//            for (int i = 0; i < size; i++) 
     1121//            { 
     1122//                String cell = (String) dm.getValueAt(i, unitColumn); 
     1123//                String currTime = ScreenManager.theCoordinator.getCadDataUnitValue(cell, UNIT_TAGS.TIMER); 
     1124//            } 
     1125//        } catch (RemoteException e) 
     1126//        { 
     1127//            e.printStackTrace(); 
     1128//        } 
     1129//    } 
    9431130    /** 
    9441131     * Removes drag and drop feature/button clicking. 
    9451132     */ 
    946     public void removeDispatcherAuthority() { 
     1133    public void removeDispatcherAuthority() 
     1134    { 
    9471135        unitStatusTable.setTransferHandler(new TransferHandler("")); 
    9481136        buttonEnrt.setEnabled(false); 
     
    9571145        buttonOOS.setEnabled(false); 
    9581146    } 
    959  
    9601147} 
  • trunk/src/tmcsim/simulationmanager/model/LogEntryCellRenderer.java

    r2 r59  
    11package tmcsim.simulationmanager.model; 
    22 
     3import java.awt.Color; 
    34import java.awt.Component; 
    45import java.util.Enumeration; 
     
    67import java.util.Iterator; 
    78import java.util.Map; 
    8  
    99import javax.swing.JTable; 
    1010import javax.swing.JTextArea; 
     
    1616/** 
    1717 * TableCellRender to display a multi-line cell. 
    18  *  
     18 * 
    1919 * http://www.roseindia.net/javatutorials/JTable_in_JDK.shtml 
     20 * 
    2021 * @author Dr. Heinz M. Kabutz 
    2122 */ 
    2223@SuppressWarnings("serial") 
    2324public class LogEntryCellRenderer extends JTextArea implements 
    24         TableCellRenderer { 
    25  
    26     /** DefaultTableCellRenderer for displaying multi line cells*/ 
     25        TableCellRenderer 
     26{ 
     27    /** 
     28     * DefaultTableCellRenderer for displaying multi line cells 
     29     */ 
    2730    private final DefaultTableCellRenderer adaptee; 
    28  
    29     /** map from table to map of rows to map of column heights */ 
     31    /** 
     32     * map from table to map of rows to map of column heights 
     33     */ 
    3034    private final Map<JTable, Map<Integer, Map<Integer, Integer>>> cellSizes; 
    3135 
    32     public LogEntryCellRenderer() { 
     36    public LogEntryCellRenderer() 
     37    { 
    3338 
    34         adaptee   = new DefaultTableCellRenderer(); 
     39        adaptee = new DefaultTableCellRenderer(); 
    3540        cellSizes = new HashMap<JTable, Map<Integer, Map<Integer, Integer>>>(); 
    36          
     41 
    3742        setLineWrap(true); 
    3843        setWrapStyleWord(true); 
     
    4045 
    4146    public Component getTableCellRendererComponent(JTable table, Object obj, 
    42             boolean isSelected, boolean hasFocus, int row, int column) { 
     47            boolean isSelected, boolean hasFocus, int row, int column) 
     48    { 
    4349 
    4450        // set the colours, etc. using the standard for that platform 
    4551        adaptee.getTableCellRendererComponent(table, obj, isSelected, hasFocus, 
    4652                row, column); 
    47         setForeground(adaptee.getForeground()); 
    48         setBackground(adaptee.getBackground()); 
     53        // FIXES defect where cell text disappears when selected 
     54        // TODO: Better would be to make table not selectable 
     55        // http://stackoverflow.com/questions/8291329/set-all-jtable-cells-unselectable 
     56        if (isSelected) 
     57        { 
     58            setForeground(Color.WHITE); 
     59            setBackground(Color.GRAY); 
     60        } 
     61        else 
     62        { 
     63            setForeground(adaptee.getForeground()); 
     64            setBackground(adaptee.getBackground()); 
     65        } 
    4966        setBorder(adaptee.getBorder()); 
    5067        setFont(adaptee.getFont()); 
     
    5774        addSize(table, row, column, height_wanted); 
    5875        height_wanted = findTotalMaximumRowSize(table, row); 
    59         if (height_wanted != table.getRowHeight(row)) { 
     76        if (height_wanted != table.getRowHeight(row)) 
     77        { 
    6078            table.setRowHeight(row, height_wanted); 
    6179        } 
    62          
     80 
    6381        return this; 
    6482    } 
    6583 
    66     private void addSize(JTable table, int row, int column, int height) { 
     84    private void addSize(JTable table, int row, int column, int height) 
     85    { 
    6786        Map<Integer, Map<Integer, Integer>> rows = cellSizes.get(table); 
    68         if (rows == null) { 
     87        if (rows == null) 
     88        { 
    6989            cellSizes.put(table, rows = new HashMap<Integer, Map<Integer, Integer>>()); 
    7090        } 
    71          
     91 
    7292        Map<Integer, Integer> rowheights = rows.get(new Integer(row)); 
    73         if (rowheights == null) { 
     93        if (rowheights == null) 
     94        { 
    7495            rows.put(new Integer(row), rowheights = new HashMap<Integer, Integer>()); 
    7596        } 
     
    7899 
    79100    /** 
    80      * Look through all columns and get the renderer.  If it is 
    81      * also a TextAreaRenderer, we look at the maximum height in 
    82      * its hash table for this row. 
     101     * Look through all columns and get the renderer. If it is also a 
     102     * TextAreaRenderer, we look at the maximum height in its hash table for 
     103     * this row. 
    83104     */ 
    84     private int findTotalMaximumRowSize(JTable table, int row) { 
     105    private int findTotalMaximumRowSize(JTable table, int row) 
     106    { 
    85107        int maximum_height = 0; 
    86108        Enumeration columns = table.getColumnModel().getColumns(); 
    87         while (columns.hasMoreElements()) { 
     109        while (columns.hasMoreElements()) 
     110        { 
    88111            TableColumn tc = (TableColumn) columns.nextElement(); 
    89112            TableCellRenderer cellRenderer = tc.getCellRenderer(); 
    90             if (cellRenderer instanceof LogEntryCellRenderer) { 
     113            if (cellRenderer instanceof LogEntryCellRenderer) 
     114            { 
    91115                LogEntryCellRenderer tar = (LogEntryCellRenderer) cellRenderer; 
    92116                maximum_height = Math.max(maximum_height, tar 
     
    97121    } 
    98122 
    99     private int findMaximumRowSize(JTable table, int row) { 
     123    private int findMaximumRowSize(JTable table, int row) 
     124    { 
    100125        Map<Integer, Map<Integer, Integer>> rows = cellSizes.get(table); 
    101126        if (rows == null) 
     127        { 
    102128            return 0; 
    103          
     129        } 
     130 
    104131        Map<Integer, Integer> rowheights = rows.get(new Integer(row)); 
    105132        if (rowheights == null) 
     133        { 
    106134            return 0; 
     135        } 
    107136        int maximum_height = 0; 
    108          
    109         for (Iterator it = rowheights.entrySet().iterator(); it.hasNext();) { 
     137 
     138        for (Iterator it = rowheights.entrySet().iterator(); it.hasNext();) 
     139        { 
    110140            Map.Entry entry = (Map.Entry) it.next(); 
    111141            int cellHeight = ((Integer) entry.getValue()).intValue(); 
Note: See TracChangeset for help on using the changeset viewer.