Package trafficdefinition

Examples of trafficdefinition.AreaFlow


        return;
      }

      // If we are in the middle of creating an area flow
      if (creatingNewElement) {
        AreaFlow newFlow = (AreaFlow) newElement;

        newFlow.constructionPhase++;

        // If the construction has finished (4 clicks needed)
        if (newFlow.constructionPhase == 3) {
          newFlow.createHandles();

          currentTrafficLayer.AddTrafficElement(newElement);

          // Reset helper variables
          creatingNewElement = false;
          newElement = null;

          repaint();
        }
      }
      // First click - construction beginning
      else {
        // Create temporary area flow and set its starting location
        newElement = new AreaFlow();
        ((AreaFlow) newElement).setStartAreaCenter(transformedPoint);

        ((AreaFlow) newElement).constructionPhase = 0;

        creatingNewElement = true;
View Full Code Here


      break;
    case AreaFlow:
      // Set the flow's properties based on the construction phase
      if (creatingNewElement) {
        AreaFlow newFlow = (AreaFlow) newElement;

        switch (newFlow.constructionPhase) {
        case 0:
          newFlow.setStartAreaRadius(transformedPoint);
          break;
        case 1:
          newFlow.setEndAreaCenter(transformedPoint);
          break;
        case 2:
          newFlow.setEndAreaRadius(transformedPoint);
          break;
        }

        repaint();
      }
View Full Code Here

TOP

Related Classes of trafficdefinition.AreaFlow

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.