Package aimax.osm.viewer

Examples of aimax.osm.viewer.MapViewPane$MyKeyListener


    eClassifier.addRule("track_type", TRACK_NAME + 1, msf
        .createTrackInfo(Color.GREEN));
    eClassifier.addRule("track_type", TRACK_NAME + 2, msf
        .createTrackInfo(Color.BLUE));
    mapData.setEntityClassifier(eClassifier);
    mapViewPane = new MapViewPane();
    mapViewPane.setMap(mapData);
    mapViewPane.setPopupMenu(new MapViewPopupWithLoad());
    setLayout(new BorderLayout());
    add(mapViewPane, BorderLayout.CENTER);
  }
View Full Code Here


  protected DefaultEntityRenderer createDayRenderer() {
    return new DefaultEntityRenderer();
  }

  public void actionPerformed(ActionEvent e) {
    MapViewPane view = frame.getView();
    if (e.getSource() == zoomInButton) {
      view.zoom(2, view.getWidth() / 2, view.getHeight() / 2);
    } else if (e.getSource() == zoomOutButton) {
      view.zoom(0.5f, view.getWidth() / 2, view.getHeight() / 2);
    } else if (e.getSource() == leftButton) {
      view.adjust((int) (0.3 * view.getWidth()), 0);
    } else if (e.getSource() == rightButton) {
      view.adjust((int) (-0.3 * view.getWidth()), 0);
    else if (e.getSource() == upButton) {
      view.adjust(0, (int) (0.3 * view.getHeight()));
    } else if (e.getSource() == downButton) {
      view.adjust(0, (int) (-0.3 * view.getHeight()));
    } else if (e.getSource() == nightButton) {
      if (nightButton.isSelected()) {
        EntityClassifier<EntityViewInfo> eClassifier =
          new MapStyleFactory().createNightViewClassifier();
        frame.getView().getRenderer().setBackgroundColor(Color.BLACK);
View Full Code Here

TOP

Related Classes of aimax.osm.viewer.MapViewPane$MyKeyListener

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.