Examples of NewStarMessage


Examples of org.aavso.tools.vstar.ui.mediator.message.NewStarMessage

        final Point2D source = new Point2D.Double(0, 0);

        double percentage = 0.01;

        XYPlot plot = chart.getXYPlot();
        NewStarMessage newStarMsg = Mediator.getInstance()
            .getLatestNewStarMessage();
        List<ValidObservation> obs = newStarMsg.getObservations();

        switch (msg.getPanType()) {
        case LEFT:
          if (plot.getDomainAxis().getLowerBound() >= obs.get(0)
              .getJD()) {
            plot.panDomainAxes(-percentage, plotInfo, source);
          } else {
            if (newStarMsg.getNewStarType() == NewStarType.NEW_STAR_FROM_DATABASE) {
              // TODO: ask whether to read more AID data before
              // last JD
            }
          }
          break;
        case RIGHT:
          if (plot.getDomainAxis().getUpperBound() <= obs.get(
              obs.size() - 1).getJD()) {
            plot.panDomainAxes(percentage, plotInfo, source);
          } else {
            if (newStarMsg.getNewStarType() == NewStarType.NEW_STAR_FROM_DATABASE) {
              // TODO: ask whether to read more AID data after
              // last JD
            }
          }
          break;
        case UP:
          if (newStarMsg.getMinMag() <= plot.getRangeAxis()
              .getLowerBound()) {
            plot.panRangeAxes(percentage, plotInfo, source);
          }
          break;
        case DOWN:
          if (newStarMsg.getMaxMag() >= plot.getRangeAxis()
              .getUpperBound()) {
            plot.panRangeAxes(-percentage, plotInfo, source);
          }
          break;
        }
View Full Code Here

Examples of org.aavso.tools.vstar.ui.mediator.message.NewStarMessage

        final Point2D source = new Point2D.Double(0, 0);

        double percentage = 0.01;

        XYPlot plot = chart.getXYPlot();
        NewStarMessage newStarMsg = Mediator.getInstance()
            .getLatestNewStarMessage();

        switch (msg.getPanType()) {
        case LEFT:
          if (plot.getDomainAxis().getLowerBound() >= -1) {
            plot.panDomainAxes(-percentage, plotInfo, source);
          }
          break;
        case RIGHT:
          if (plot.getDomainAxis().getUpperBound() <= 1) {
            plot.panDomainAxes(percentage, plotInfo, source);
          }
          break;
        case UP:
          if (newStarMsg.getMinMag() <= plot.getRangeAxis()
              .getLowerBound()) {
            plot.panRangeAxes(percentage, plotInfo, source);
          }
          break;
        case DOWN:
          if (newStarMsg.getMaxMag() >= plot.getRangeAxis()
              .getUpperBound()) {
            plot.panRangeAxes(-percentage, plotInfo, source);
          }
          break;
        }
View Full Code Here

Examples of org.aavso.tools.vstar.ui.mediator.message.NewStarMessage

      // is specified.
      visible |= series == SeriesType.Unspecified;

      // Finally, if observations come from an external source (via a
      // plugin), make a series visible by default.
      NewStarMessage msg = Mediator.getInstance()
          .getLatestNewStarMessage();
      visible |= msg.getNewStarType() == NewStarType.NEW_STAR_FROM_ARBITRARY_SOURCE;
    }

    return visible;
  }
View Full Code Here

Examples of org.aavso.tools.vstar.ui.mediator.message.NewStarMessage

  /**
   * @return the latest newStarMessage, or null if none present.
   */
  public NewStarMessage getLatestNewStarMessage() {
    NewStarMessage msg = null;

    if (!newStarMessageList.isEmpty()) {
      msg = newStarMessageList.get(newStarMessageList.size() - 1);
    }

View Full Code Here

Examples of org.aavso.tools.vstar.ui.mediator.message.NewStarMessage

      freeListeners();

      // Create a message to notify whoever is listening that a new star
      // has been loaded.
      NewStarMessage newStarMsg = new NewStarMessage(newStarType,
          starInfo, validObsList, validObservationCategoryMap,
          starInfo.getRetriever().getMinMag(), starInfo
              .getRetriever().getMaxMag(), starInfo
              .getRetriever().getSourceName());
View Full Code Here

Examples of org.aavso.tools.vstar.ui.mediator.message.NewStarMessage

    StringBuffer seriesBuf = new StringBuffer();

    // The most recent new star message will have all obs and series
    // (whether a single or additive dataset).
    NewStarMessage latestMsg = msgs.get(msgs.size() - 1);
    List<ValidObservation> obs = latestMsg.getObservations();

    seriesBuf.append("Loaded Observations: ");
    seriesBuf.append(obs.size());
    seriesBuf.append("\n");

    Map<SeriesType, List<ValidObservation>> obsCategoryMap = latestMsg
        .getObsCategoryMap();

    for (SeriesType type : obsCategoryMap.keySet()) {
      List<ValidObservation> obsOfType = obsCategoryMap.get(type);
      if (!obsOfType.isEmpty()) {
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.