Package rinde.sim.ui.renderers

Examples of rinde.sim.ui.renderers.UiSchema


      @Override
      public void afterTick(TimeLapse timeLapse) {}
    });

    final UiSchema uis = new UiSchema();
    uis.add(TaxiBase.class, "/graphics/perspective/tall-building-64.png");
    uis.add(Taxi.class, "/graphics/flat/taxi-32.png");
    uis.add(Customer.class, "/graphics/flat/person-red-32.png");
    final View.Builder view = View.create(simulator)
        .with(new GraphRoadModelRenderer())
        .with(new RoadUserRenderer(uis, false))
        .with(new TaxiRenderer(Language.ENGLISH))
        .setTitleAppendix("Taxi Demo");
View Full Code Here


  public static void run(final boolean testing) {
    final UICreator uic = new UICreator() {
      @Override
      public void createUI(Simulator sim) {
        final UiSchema schema = new UiSchema(false);
        schema.add(Truck.class, "/graphics/perspective/bus-44.png");
        schema.add(DefaultDepot.class, "/graphics/flat/warehouse-32.png");
        schema.add(GFParcel.class, "/graphics/flat/hailing-cab-32.png");
        final View.Builder viewBuilder = View.create(sim)
            .with(
                new PlaneRoadModelRenderer(),
                new RoadUserRenderer(schema, false),
                new RouteRenderer(),
View Full Code Here

          reliability);
      simulator.register(agent);
    }

    // create GUI
    final UiSchema schema = new UiSchema(false);
    schema
        .add(ExamplePackage.class, "/graphics/perspective/deliverypackage2.png");

    final UiSchema schema2 = new UiSchema();
    schema2.add(RandomWalkAgent.C_BLACK, new RGB(0, 0, 0));
    schema2.add(RandomWalkAgent.C_YELLOW, new RGB(0xff, 0, 0));
    schema2.add(RandomWalkAgent.C_GREEN, new RGB(0x0, 0x80, 0));

    final View.Builder viewBuilder = View.create(simulator)
        .with(new GraphRoadModelRenderer())
        .with(new RoadUserRenderer(schema, false))
        .with(new MessagingLayerRenderer(roadModel, schema2))
View Full Code Here

  BoxRenderer() {
    img = ImageType.LARGE;
    roadModel = Optional.absent();
    pdpModel = Optional.absent();
    uiSchema = new UiSchema(false);
    uiSchema.add(Box.class, img.file);
  }
View Full Code Here

      @Override
      public void afterTick(TimeLapse timeLapse) {}
    });

    final UiSchema uis = new UiSchema(false);
    uis.add(AGV.class, "/graphics/flat/forklift2.png");

    final View.Builder view = View
        .create(simulator)
        .with(new GraphRoadModelRenderer(CANVAS_MARGIN, false, false, false),
            new BoxRenderer(), new RoadUserRenderer(uis, false))
View Full Code Here

    });

    UITestTools.startAndClose(-1);

    sim.register(new TestDepot());
    final UiSchema uis = new UiSchema();
    uis.add(TestDepot.class, "/graphics/perspective/tall-building-64.png");
    View.create(sim)
        .setTitleAppendix("ViewTest")
        .with(new PlaneRoadModelRenderer())
        .with(new RoadUserRenderer(uis, false))
        .show();
View Full Code Here

    /**
     * @return The default road user renderer.
     */
    protected Renderer roadUserRenderer() {
      final UiSchema schema = new UiSchema(false);
      schema.add(Vehicle.class, SWT.COLOR_RED);
      schema.add(Depot.class, SWT.COLOR_CYAN);
      schema.add(Parcel.class, SWT.COLOR_BLUE);
      return new RoadUserRenderer(schema, false);
    }
View Full Code Here

TOP

Related Classes of rinde.sim.ui.renderers.UiSchema

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.