Examples of InfoMessage


Examples of org.locationtech.udig.image.georeferencing.internal.ui.message.InfoMessage

        if (this.marksStore.canLoadMarks(marksFile, cmd.getCRS())) {

          this.mainComposite.deleteAllPoints();
          this.mainComposite.createMarks(this.marksStore.loadMarks(marksFile));
        } else {
          InfoMessage message = new InfoMessage(Messages.GeoreferencingView_errorLoadingMarks
                + this.marksStore.getLoadedCrsName(), Type.WARNING);
          this.mainComposite.setMessage(message);
        }
        // store the path
        File file = new File(marksFile);
View Full Code Here

Examples of org.locationtech.udig.image.georeferencing.internal.ui.message.InfoMessage

    gridData8.grabExcessVerticalSpace = true;
    gridData8.verticalAlignment = GridData.FILL;
    this.messageText.setLayoutData(gridData8);
    this.messageText.setFont(JFaceResources.getDialogFont());

    InfoMessage message = this.cmd.getMessage();
    displayMessage(message);
  }
View Full Code Here

Examples of org.locationtech.udig.image.georeferencing.internal.ui.message.InfoMessage

  public void displayMessage(final InfoMessage message) {

    assert message != null;

    // The following sentences does a filter of those obvious messages
    InfoMessage filteredMessage = message;
    // shows the message
    this.informationComposite.setVisible(true);
    this.messageImage.setImage(filteredMessage.getImage());
    this.messageText.setToolTipText(filteredMessage.getText());
    this.messageText.setText(filteredMessage.getText());

  }
View Full Code Here

Examples of org.locationtech.udig.image.georeferencing.internal.ui.message.InfoMessage

      pane.setCursor(display.getSystemCursor(SWT.CURSOR_WAIT));

      this.cmd.execute();

    } catch (IOException e) {
      displayMessage(new InfoMessage( e.getMessage(), InfoMessage.Type.FAIL ) );     
    } finally {
      pane.setCursor(null);

      setEnabled(true);
    }
View Full Code Here

Examples of org.locationtech.udig.image.georeferencing.internal.ui.message.InfoMessage

  }

  public void update(Observable o, Object arg) {

    InfoMessage message = this.cmd.getMessage();

    // listen to the map change notification so it can broadcast the set
    // enable=false to all his children's.

    if (!(arg instanceof GeoreferencingCommandEventChange))
      return;
    GeoreferencingCommandEventChange cmdEvent = (GeoreferencingCommandEventChange) arg;

    switch (cmdEvent.getEvent()) {
    case MAP_CHANGE:

      message.setType(Type.WARNING);
      setEnabled(false);
      break;
    case MAP_CHANGE_TO_ORIGINAL:

      message.setType(Type.INFORMATION);
      setEnabled(true);
    default:

      break;
    }
View Full Code Here

Examples of org.locationtech.udig.image.georeferencing.internal.ui.message.InfoMessage

      // create the mapGraphics
      try {
        createTheMapGraphic(map);
      } catch (IOException e) {
        InfoMessage info = new InfoMessage(Messages.MainComposite_mapGraphicFailText, Type.FAIL);
        setMessage(info);
        e.printStackTrace();
      }

      // set the values on the command.
View Full Code Here

Examples of org.locationtech.udig.tools.internal.ui.util.InfoMessage

     * @param usrMessage
     * @param type
     */
    public void setMessage(final String usrMessage, final InfoMessage.Type type) {

        InfoMessage info = new InfoMessage(usrMessage, type);
        messagePanel.setImage(info.getImage());
        messagePanel.setText(info.getText());
        messageTitle.setText(Messages.MergeFeaturesComposite_merge_result_title);
    }
View Full Code Here

Examples of org.locationtech.udig.tools.parallel.internal.InfoMessage

    distance = textDistance.getText();
    Double d;
    try {
      d = Double.valueOf(distance);
    } catch (NumberFormatException e) {
      InfoMessage message = new InfoMessage(Messages.PrecisionParallel_error_distance_NaN, Type.ERROR);
      messageImage.setImage(message.getImage());
      messageText.setText(message.getText());
      parallelContext.setMode(PrecisionToolsMode.ERROR);
      parallelContext.update(PrecisionToolsContext.UPDATE_VIEW);
      return;
    }

    if (d == 0) {
      InfoMessage message = new InfoMessage(Messages.PrecisionParallel_error_distance_zero, Type.ERROR);
      messageImage.setImage(message.getImage());
      messageText.setText(message.getText());
      parallelContext.setMode(PrecisionToolsMode.ERROR);
      parallelContext.update(PrecisionToolsContext.UPDATE_VIEW);
      return;
    }
    try {
View Full Code Here

Examples of org.locationtech.udig.tools.parallel.internal.InfoMessage

    }
  }

  protected void displayMessage(String text, Type type) {

    final InfoMessage message = new InfoMessage();

    message.setText(text);
    message.setType(type);

    Display.findDisplay(fatherThread).asyncExec(new Runnable() {

      public void run() {

        if (!messageText.isDisposed()) {
          messageText.setText(message.getText());
        }
        if (!messageImage.isDisposed()) {
          messageImage.setImage(message.getImage());
        }
      }
    });
  }
View Full Code Here

Examples of org.locationtech.udig.tools.parallel.internal.InfoMessage

    gridData8.grabExcessVerticalSpace = true;
    gridData8.verticalAlignment = GridData.FILL;
    messageText.setLayoutData(gridData8);
    messageText.setFont(JFaceResources.getDialogFont());

    InfoMessage infoMessage = new InfoMessage(Messages.PrecisionParallel_InitialMessage, Type.INFORMATION);
    messageImage.setImage(infoMessage.getImage());
    messageText.setText(infoMessage.getText());

  }
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.