Changeset 63 in tmcsimulator
- Timestamp:
- 03/15/2017 08:00:53 PM (9 years ago)
- Location:
- trunk/src/tmcsim/client/cadclientgui/screens
- Files:
-
- 2 edited
-
AssignedIncidents.java (modified) (2 diffs)
-
UnitStatus.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/client/cadclientgui/screens/AssignedIncidents.java
r59 r63 104 104 public Component prepareRenderer(TableCellRenderer renderer, int row, int column) 105 105 { 106 Component comp = super.prepareRenderer(renderer, row, column); 106 Component comp; 107 // In a rare odd circumstance of timing, this exception is thrown: 108 // http://pastebin.com/A3tZe07a 109 try 110 { 111 comp = super.prepareRenderer(renderer, row, column); 112 } catch (ArrayIndexOutOfBoundsException ex) 113 { 114 // our workaround is to just return a dummy value 115 // all will be redrawn in the next one second interval 116 return new JLabel("?"); 117 } 107 118 108 119 comp.setForeground(Color.BLACK); … … 121 132 { 122 133 // Fetch the unit's current status from server 123 UnitStatusEnums ustatus = ScreenManager.theCoordinator.getCadDataUnitStatus(unitname);134 UnitStatusEnums ustatus = ScreenManager.theCoordinator.getCadDataUnitStatus(unitname); 124 135 // Decide which color to use for displaying the status 125 136 switch (ustatus) -
trunk/src/tmcsim/client/cadclientgui/screens/UnitStatus.java
r59 r63 146 146 int row, int column) 147 147 { 148 Component comp = super.prepareRenderer(renderer, row, column); 148 Component comp; 149 // In a rare odd circumstance of timing, this exception is thrown: 150 // http://pastebin.com/f5wtSMHN 151 try 152 { 153 comp = super.prepareRenderer(renderer, row, column); 154 } catch (ArrayIndexOutOfBoundsException ex) 155 { 156 // our workaround is to just return a dummy value 157 // all will be redrawn in the next one second interval 158 return new JLabel("?"); 159 } 149 160 150 161 int unitNumColumn = 2;
Note: See TracChangeset
for help on using the changeset viewer.
