Пример #1
0
  /** Create a dependent MapPanel, with its converter and maps provided from outside. */
  public MapPanel(ImgFilesBag map, MapTransformer<COORD> transformer) {
    this.map = map;
    this.transformer = transformer;
    thread = new MapPanelThread<COORD>(this, config);
    thread.start();

    addComponentListener(
        new ComponentListener() {
          public void componentResized(ComponentEvent e) {
            MapPanel.this.componentResized();
          }

          public void componentMoved(ComponentEvent e) {}

          public void componentShown(ComponentEvent e) {}

          public void componentHidden(ComponentEvent e) {}
        });

    transformer.setDimensions(getWidth(), getHeight());
  }