Package de.hpi.eworld.model.db.data

Examples of de.hpi.eworld.model.db.data.TrafficLightStateListEntry


      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);
View Full Code Here


                int c = k - countIncomingEdge * noOutgoing - 1;
                String phaseCode = phase.substring(c, c + 1) + brake.substring(c, c + 1)
                    + yellow.substring(c, c + 1);

                if (phaseCode.equals("010")) { // red
                  dl.get(e).add(new TrafficLightStateListEntry(TrafficLightState.Red));
                } else if (phaseCode.equals("011")) { // yellow
                  dl.get(e).add(new TrafficLightStateListEntry(TrafficLightState.Yellow));
                } else if (phaseCode.equals("110") || phaseCode.equals("100")) { // green
                  dl.get(e).add(new TrafficLightStateListEntry(TrafficLightState.Green));
                }

                countIncomingEdge++;
              }
            }
View Full Code Here

TOP

Related Classes of de.hpi.eworld.model.db.data.TrafficLightStateListEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.