Пример #1
0
  public void paintComponent(Graphics g) {
    super.paintComponent(g);
    if (transformer.isSetupDone()) {
      thread.checkSetup(transformer, config);
      Graphics2D g2 = ((Graphics2D) g.create());

      // paint the background
      g2.setColor(MapPanel.BG_COLOR);
      g2.fillRect(0, 0, getWidth(), getHeight());

      MapPanelThread.PaintInfo paintInfo = thread.getPaintInfo(transformer);
      if (paintInfo != null) {
        /*g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
        RenderingHints.VALUE_INTERPOLATION_BILINEAR);*/
        g2.drawImage(paintInfo.image, paintInfo.x, paintInfo.y, paintInfo.w, paintInfo.h, this);
      }
    }
  }
Пример #2
0
 protected void transformerChanged() {
   thread.checkSetup(transformer, config);
 }
Пример #3
0
 public void setShading(boolean enabled) {
   config.setWantShading(enabled);
   thread.checkSetup(transformer, config);
 }
Пример #4
0
 public void setDetailLevel(int detailLevel) {
   config.setDetailLevel(detailLevel);
   thread.checkSetup(transformer, config);
 }
Пример #5
0
 public void setPoiThreshold(int threshold) {
   config.setPoiThreshold(threshold);
   thread.checkSetup(transformer, config);
 }
Пример #6
0
 public void setShowPointLabel(boolean showPointLabel) {
   config.setShowPointLabel(showPointLabel);
   thread.checkSetup(transformer, config);
 }
Пример #7
0
 /** Does not trigger a repaint... */
 public void setQuality(MapConfig.Quality quality) {
   config.setQuality(quality);
   thread.checkSetup(transformer, config);
 }
Пример #8
0
 /**
  * If an external class changed manually the transformer, it must call this method to make the
  * change effective.
  */
 public void transformerChangedManually() {
   thread.checkSetup(transformer, config);
   repaint();
 }