Package gov.nasa.arc.mct.fastplot.view

Examples of gov.nasa.arc.mct.fastplot.view.Axis


    GregorianCalendar zeroCal = new GregorianCalendar();
    zeroCal.setTimeInMillis(0);
   
    Mockito.when(mockPlot.isUserOperationsLocked()).thenReturn(false);
    rectangle = new Rectangle(0,0,100,100);
    final Axis timeAxis = new Axis();
    final PinSupport pins = new PinSupport() {
      Pinnable timeAxisPin = timeAxis.createPin();


      @Override
      protected void informPinned(boolean pinned) {
        timeAxisPin.setPinned(pinned);
View Full Code Here


    Assert.assertEquals(panAndZoomManager.lastPanDirection, PlotConstants.PanDirection.PAN_HIGHER_X_AXIS);
  }
 
  @Test
  public void testPauseButton() {
    Axis timeAxis = mockPlot.getPlotAbstraction().getTimeAxis();
    ActionEvent e = new ActionEvent(testLCM, 0, "test action");
    e.setSource(testLCM.pauseButton);
    testLCM.actionPerformed(e);
    Assert.assertTrue(timeAxis.isPinned());

    testLCM.actionPerformed(e);
    Assert.assertFalse(timeAxis.isPinned());
  }
View Full Code Here

    }
   
  @Override
  public void actionPerformed(ActionEvent e) {
    if (pauseButton!=null && e.getSource() == pauseButton) {
      Axis timeAxis = plot.getPlotAbstraction().getTimeAxis();
      Pinnable timePin = plot.getPlotAbstraction().getTimeAxisUserPin();
      timePin.setPinned(!timePin.isPinned());
      plot.getPlotAbstraction().updateResetButtons();
      updatePinButton();
      // make the pause button behave as if the unpin time axis button was pressed
      if (!timeAxis.isPinned()) {
              plot.cornerResetButtonManager.informJumpToCurrentTimeSelected()
      }

    // Pan Controls
    } else if (e.getSource() == yAxisPanUpButton) {
View Full Code Here

    }
  }
 
  private boolean isPinned() {
    PlotAbstraction plotAbstraction = plot.getPlotAbstraction();
    Axis timeAxis = plotAbstraction.getTimeAxis();
    return timeAxis.isPinned() || plotAbstraction.isPinned();
  }
View Full Code Here

    pcm = new PlotCornerResetButtonManager(plot);
     
      PinSupport pins = new PinSupport();
      Mockito.when(plotAbstraction.getCurrentMCTTime()).thenReturn(new GregorianCalendar().getTimeInMillis());
    Mockito.when(plotAbstraction.getSubPlots()).thenReturn(Arrays.asList((AbstractPlottingPackage) plot));
      Mockito.when(plotAbstraction.getTimeAxis()).thenReturn(new Axis());
      Mockito.doAnswer(new Answer<Object>() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
          plot.updateResetButtons();
          return null;
        }
    }).when(plotAbstraction).updateResetButtons();
      Mockito.when(plotAbstraction.getTimeAxisUserPin()).thenReturn(pins.createPin());
      Mockito.when(plot.getNonTimeAxis()).thenReturn(new Axis());
      PinSupport pins2 = new PinSupport();
      Mockito.when(plot.getNonTimeAxisUserPin()).thenReturn(pins2.createPin());
      Mockito.when(plot.getCurrentTimeAxisMax()).thenReturn(new GregorianCalendar());
      Mockito.when(plot.getCurrentTimeAxisMin()).thenReturn(new GregorianCalendar());
      Mockito.doAnswer(new Answer<Object>() {
View Full Code Here

 
  private void pausePlot() {
    logger.debug("Plot pause called");
    // pause the nontime axis scrollpane.

    Axis timeAxis = getPlotAbstraction().getTimeAxis();
    if(timePausePin == null) {
      timePausePin = timeAxis.createPin();
    }
    if(nonTimePausePin == null) {
      nonTimePausePin = nonTimeAxis.createPin();
    }
    nonTimePausePin.setPinned(true);
View Full Code Here

      setNonTimeMinFixed(nonTimeMinFixedByPlotSettings);
      setNonTimeMaxFixed(nonTimeMaxFixedByPlotSettings);
    }
   
      // when we unpause, we want to fast forward the display to the current time.
    Axis timeAxis = getPlotAbstraction().getTimeAxis();
    setPlotDisplayState(PlotDisplayState.DISPLAY_ONLY);
    // no that we have fast forwarded to the current time, set back to display mode.
    informTimeAxisPinned(timeAxis.isPinned());
    notifyObserversTimeChange()
    updateResetButtons();
  }
View Full Code Here

    }
  }


  private void markTimeZoomed() {
    Axis axis = plot.getPlotAbstraction().getTimeAxis();
    pinTime();
    axis.setZoomed(true);
    if (plot.getLimitManager().isUntranslated()) {
      plot.getLimitManager().setModeUntranslated(false);
    }
  }
View Full Code Here

      plot.getLimitManager().setModeUntranslated(false);
    }
  }

  private void markNonTimeZoomed() {
    Axis axis = plot.getNonTimeAxis();
    pinNonTime();
    axis.setZoomed(true);
    if (plot.getLimitManager().isUntranslated()) {
      plot.getLimitManager().setModeUntranslated(false);
    }
  }
View Full Code Here

      resetTimeAxis();
    }
  }
 
  private void resetTimeAxis() {
    Axis axis = plot.getPlotAbstraction().getTimeAxis();
    axis.setZoomed(false);
    plot.fastForwardTimeAxisToCurrentMCTTime(true)
    plot.notifyObserversTimeChange();
    plot.getPlotAbstraction().getTimeAxisUserPin().setPinned(false);
    refreshPlotValues();
  }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.fastplot.view.Axis

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.