protected void saveTLS() {
int i, j;
HashMap<EdgeModel, TrafficLightStateList> newLogic = new HashMap<EdgeModel, TrafficLightStateList>();
Color item;
TrafficLightStateList tls;
for (i = 0; i < logicTable.getRowCount(); i++) {
// Get Edge at corresponding row
EdgeModel edge = currentIncomingEdges.get(i);
tls = new TrafficLightStateList();
for (j = 0; j < logicTable.getColumnCount()-1; j++) {
item = ((TLSCellRenderer) logicTable.getDefaultRenderer(Object.class)).getTrafficLightStates().get(i).get(j);
if (item.equals(Color.GREEN)) {
tls.add(new TrafficLightStateListEntry(
TrafficLightState.Green));
}
if (item.equals(Color.YELLOW)) {
tls.add(new TrafficLightStateListEntry(
TrafficLightState.Yellow));
}
if (item.equals(Color.RED)) {
tls.add(new TrafficLightStateListEntry(
TrafficLightState.Red));
}
}
newLogic.put(edge, tls);