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

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


    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);
      }
    };
    Mockito.when(plotAbstraction.getTimeAxis()).thenReturn(timeAxis);
      Mockito.when(plotAbstraction.getTimeAxisUserPin()).thenReturn(pins.createPin());
      Mockito.when(plotAbstraction.createPin()).thenAnswer(new Answer<Pinnable>() {
        @Override
        public Pinnable answer(InvocationOnMock invocation) throws Throwable {
          return pins.createPin();
        }
    });
      Mockito.when(plotView.getContents()).thenReturn(new XYPlotContents());
      Mockito.when(plotView.getLayout()).thenReturn(new SpringLayout());
    setTestLCM();
View Full Code Here


    plot.localControlsManager = plotControlManager;
    plot.panAndZoomManager = panAndZoomManager;

    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>() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

  public void setup() {
    MockitoAnnotations.initMocks(this);
    Mockito.when(plotView.getCurrentMCTTime()).thenReturn(new GregorianCalendar().getTimeInMillis());
      Mockito.when(plotView.getTimeAxis()).thenReturn(new Axis());
      Mockito.when(plotView.getSubPlots()).thenReturn(plots);
    final PinSupport pins = new PinSupport();
    Mockito.when(plotView.createPin()).thenAnswer(new Answer<Pinnable>() {
      @Override
      public Pinnable answer(InvocationOnMock invocation) throws Throwable {
        return pins.createPin();
      }
    });
  }
View Full Code Here

  private long now = System.currentTimeMillis();
 
  @BeforeMethod
  public void setup() {
    MockitoAnnotations.initMocks(this);
    PinSupport pins = new PinSupport();
   
    Mockito.when(plotAbstraction.getCurrentMCTTime()).thenReturn(new GregorianCalendar().getTimeInMillis());
    Mockito.when(plotAbstraction.getTimeAxis()).thenReturn(new Axis());
    Mockito.when(plotAbstraction.getTimeAxisUserPin()).thenReturn(pins.createPin());
    Mockito.when(plotAbstraction.getPlotLineDraw()).thenReturn(new PlotLineDrawingFlags(true,false));

    PlotSettings settings = new PlotSettings();
    settings.setAxisOrientationSetting(AxisOrientationSetting.X_AXIS_AS_TIME);
    settings.setMaxNonTime(100);
View Full Code Here

    long now = new GregorianCalendar().getTimeInMillis();
    MockitoAnnotations.initMocks(this);
    Mockito.when(mockPlotViewManifestation.getCurrentMCTTime()).thenReturn(now);
    Mockito.when(plotView.getCurrentMCTTime()).thenReturn(now);
      Mockito.when(plotView.getTimeAxis()).thenReturn(new Axis());
      Mockito.when(plotView.getTimeAxisUserPin()).thenReturn(new PinSupport().createPin());
      Mockito.when(plotView.getSubPlots()).thenReturn(plots);
      Mockito.when(plotView.getMinTime()).thenReturn(now - 360000);
      Mockito.when(plotView.getMaxTime()).thenReturn(now + 360000);
      Mockito.when(plotView.getXAxisMaximumLocation()).thenReturn(XAxisMaximumLocationSetting.MAXIMUM_AT_RIGHT);
      Mockito.when(plotView.getYAxisMaximumLocation()).thenReturn(YAxisMaximumLocationSetting.MAXIMUM_AT_TOP);
View Full Code Here

TOP

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

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.