Package org.locationtech.udig.tools.parallel.internal

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


    }
  }

  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

    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

Related Classes of org.locationtech.udig.tools.parallel.internal.InfoMessage

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.