Examples of RoadSpotModel


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

      new CircleEventView(new CircleEventModel(CircleEventModel.Type.Ice, 1, null)),
      new PolygonEventView(new PolygonEventModel(PolygonEventModel.Type.Fog, 1, null)),
      new PolygonEventView(new PolygonEventModel(PolygonEventModel.Type.Rain, 1, null)),
      new PolygonEventView(new PolygonEventModel(PolygonEventModel.Type.Snow, 1, null)),
      new PolygonEventView(new PolygonEventModel(PolygonEventModel.Type.Ice, 1, null)),
      new StreetBarrierView(new RoadSpotModel(RoadSpotModel.Type.Busstop)),
      new StreetBarrierView(new RoadSpotModel(RoadSpotModel.Type.Liftgate)),
      new TrafficLightView(new TrafficLightModel(new NodeModel(0,0))));
    return (List<GraphicsView<EventModel>>) list;
  }
View Full Code Here

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

        case itemClicked:
          clearSelection();
 
          Object item = notification.getObj1();
          if (item instanceof StreetBarrierView) {
            RoadSpotModel roadSpot = (RoadSpotModel) ((StreetBarrierView) item)
                .getModelElement();
            if (roadSpot.getEventType() == Type.School) {
              SchoolModel school = (SchoolModel) roadSpot;
              closingHourModel.add(school);
              descriptionModel.setMappingKey(school);
              lowerAgeLimitModel.add(school);
              openingHourModel.add(school);
View Full Code Here

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

  @Override
  protected List<GraphicsView<RoadSpotModel>> provideAnnotationItems() {
    final List<GraphicsView<RoadSpotModel>> annotationItems = new ArrayList<GraphicsView<RoadSpotModel>>();

    annotationItems.add(new StreetBarrierView(new SchoolModel()));
    annotationItems.add(new StreetBarrierView(new RoadSpotModel(
        Type.Busstop)));

    return annotationItems;
  }
View Full Code Here

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

  
   * @author: Martin Horst Boissier
   */
  @Override
  public ModelElement getAdjustedAssociatedElement(Point2D scrolledPoint, GraphController graphController) {
    RoadSpotModel model = (RoadSpotModel) getModelElement().clone();
    if (this.graphController == null) this.graphController = graphController;
    // get items at the clicked position
   
    return updateModel(model,scrolledPoint);
  }
View Full Code Here

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

      switch (notificationType) {
        case itemClicked:
          Object item = notification.getObj1();
          if (item instanceof StreetBarrierView) {
            RoadSpotModel roadSpot = (RoadSpotModel) ((StreetBarrierView) item)
                .getModelElement();
            if (roadSpot.getEventType() == roadSpotType) {
              descriptionModel.setMappingKey(roadSpot);
              return;
            }
          }
 
View Full Code Here

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

          Object item = notification.getObj1();
          if (item instanceof WayView) {
            propertyPaneLayout.show(propertyPane, edgePaneName);
 
          } else if (item instanceof StreetBarrierView) {
            RoadSpotModel roadSpot = (RoadSpotModel) ((StreetBarrierView) item)
                .getModelElement();
            if (roadSpot.getEventType() == Type.Busstop) {
              streetOfBusStopLabel
                  .setText("Bus stop located at street "
                      + roadSpot.getWay().getDescription());
              propertyPaneLayout.show(propertyPane, busStopName);
 
            } else if (roadSpot.getEventType() == Type.School) {
              SchoolModel school = (SchoolModel) roadSpot;
              streetOfSchoolLabel.setText("School located at street "
                  + school.getWay().getDescription());
              propertyPaneLayout.show(propertyPane, schoolPaneName);
            }
View Full Code Here

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

          // The created nodes (variable n) will be added later at endDocument()!
          // modelManager.addModelElement( new TrafficLight( lat, lon ) );
          // if you do this, it is added twice
         
        } else if ( ( at != null ) && (at.equals( "bus_stop" ) )) {
          node = new RoadSpotModel(lat, lon, RoadSpotModel.Type.Busstop);
          modelManager.addModelElement(node);
        } else if ( ( at != null ) && (at.equals( "stop" ) )) {
         
          PointOfInterest poi = new PointOfInterest(lat, lon, "stop_sign");
          imported = true;
View Full Code Here

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

    Assert.assertSame(trafficLight, viewObject.getModelElement());
  }
 
  @Test
  public void testBusStopItem() {
    RoadSpotModel busStop = new RoadSpotModel(0, 0, RoadSpotModel.Type.Busstop);
    AbstractView<Observable> viewObject = AbstractViewFactory.createView(busStop);
    Assert.assertNotNull(viewObject);
    Assert.assertTrue(viewObject instanceof AbstractView<?>);
//    RoadSpotView busStopItem = (RoadSpotView) viewObject;
//    Assert.assertSame(busStop, busStopItem.getAssociatedElement());
View Full Code Here

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

      } else if (me instanceof CityModel) {
        city = (CityModel) me;

      } else if (me instanceof RoadSpotModel) {
        RoadSpotModel r = (RoadSpotModel) me;
        if (r.getEventType() == Type.Busstop) {
          busStations.add(r);
        }
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.