Package org.aavso.tools.vstar.exception

Examples of org.aavso.tools.vstar.exception.CancellationException


      wwt = new WeightedWaveletZTransform(obs, decay, timeDivisions);
      wwt.make_freqs_from_period_range(Math.min(minPeriod, maxPeriod),
          Math.max(minPeriod, maxPeriod), deltaPeriod);
      wwt.execute();
    } else {
      throw new CancellationException("WWZ "
          + LocaleProps.get("CANCELLED"));
    }
  }
View Full Code Here


      periodAnalysisAlgorithm.setHiFreqValue(currHiFreq);
      periodAnalysisAlgorithm.setResolutionValue(currResolution);

      periodAnalysisAlgorithm.execute();
    } else {
      throw new CancellationException();
    }
  }
View Full Code Here

      wwt = new WeightedWaveletZTransform(obs, decay, timeDivisions);
      wwt.make_freqs_from_freq_range(Math.min(minFreq, maxFreq), Math
          .max(minFreq, maxFreq), deltaFreq);
      wwt.execute();
    } else {
      throw new CancellationException("WWZ "
          + LocaleProps.get("CANCELLED"));
    }
  }
View Full Code Here

      periodAnalysisAlgorithm.setHiPeriodValue(currHiPeriod);
      periodAnalysisAlgorithm.setResolutionValue(currResolution);

      periodAnalysisAlgorithm.execute();
    } else {
      throw new CancellationException();
    }
  }
View Full Code Here

    }

    Mediator.getUI().getStatusPane().setMessage("");

    if (cancelled) {
      throw new CancellationException();
    }

    if (!authenticated) {
      throw new AuthenticationError("Unable to authenticate.");
    }
View Full Code Here

          throw new ObservationReadError("Cannot construct " + kind
              + " URL (reason: " + e.getLocalizedMessage() + ")");
        }
      }
    } else {
      throw new CancellationException();
    }

    return urls;
  }
View Full Code Here

              streams.add(new FileInputStream(file));
              obSourcePlugin
                  .setInputInfo(streams, file.getName());
            }
          } else {
            throw new CancellationException();
          }
        }
        break;

      case URL:
        // If the plug-in specifies a username and password, create and
        // set an authenticator.
        String userName = obSourcePlugin.getUsername();
        String password = obSourcePlugin.getPassword();

        if (userName != null && password != null) {
          java.net.Authenticator.setDefault(new URLAuthenticator(
              userName, password));
        }

        // Does the plug-in supply URLs? Or do we have to ask the user
        // for a URL?
        List<URL> urls = obSourcePlugin.getURLs();
        if (urls != null) {
          String urlStrs = "";
          for (URL url : urls) {
            streams.add(url.openStream());
            urlStrs += url.getPath() + ", ";
          }
          urlStrs = urlStrs.substring(0, urlStrs.lastIndexOf(", "));
          obSourcePlugin.setInputInfo(streams, urlStrs);
        } else {
          // Request a URL from the user.
          TextField urlField = new TextField("URL");
          Checkbox additiveLoadCheckbox = new Checkbox(
              "Add to current?", false);
          MultiEntryComponentDialog urlDialog = new MultiEntryComponentDialog(
              "Enter URL", urlField, additiveLoadCheckbox);
          if (!urlDialog.isCancelled()
              && !urlField.getValue().matches("^\\s*$")) {
            String urlStr = urlField.getValue();
            obSourcePlugin.setAdditive(additiveLoadCheckbox.getValue());
            URL url = new URL(urlStr);
            streams.add(url.openStream());
            obSourcePlugin.setInputInfo(streams, urlStr);
          } else {
            throw new CancellationException();
          }
        }

        break;

View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.exception.CancellationException

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.