Package gov.nasa.arc.mct.components

Examples of gov.nasa.arc.mct.components.FeedProvider$RenderingInfo


        Assert.assertFalse(visibleProvidersInvoked.get());
    }
   
    @DataProvider(name="requestProvider")
    Object[][] generateDataForCurrentIterationRequestImpl() {
        FeedProvider fp = Mockito.mock(FeedProvider.class);
        Mockito.when(fp.getMaximumSampleRate()).thenReturn(1);
        return new Object[][] {
            new Object[] {Collections.singletonMap(new Request(1000,3000), Collections.singleton(fp)), Arrays.asList(new Request(1000,1999), new Request(2000,2999), new Request(3000,3000))},
            new Object[] {Collections.singletonMap(new Request(3000,1000), Collections.singleton(fp)), Arrays.asList(new Request(2001,3000), new Request(1001,2000), new Request(1000,1000))},
            new Object[] {Collections.singletonMap(new Request(1000,1000), Collections.singleton(fp)), Collections.singletonList(new Request(1000,1000))}
        };
View Full Code Here


    AbstractComponent[][] result = new AbstractComponent[rows][];
   
    for (int r = 0 ; r < rows ; r++) {
      result[r] = new AbstractComponent[cols];
      for (int c = 0 ; c < cols ; c++) {
        FeedProvider fp      = Mockito.mock(FeedProvider.class);
        TimeService  ts      = Mockito.mock(TimeService.class);
        AbstractComponent ac = Mockito.mock(AbstractComponent.class);
        Mockito.when(ac.isLeaf()).thenReturn(true);
        Mockito.when(ac.getCapability(FeedProvider.class)).thenReturn(fp);
        Mockito.when(fp.getTimeService()).thenReturn(ts);
        Mockito.when(fp.isPrediction()).thenReturn(false);
        Mockito.when(ts.getTimeSystems()).thenReturn(multiTS ? timeSystems : new String[]{timeSystems[r]});
        Mockito.when(ts.getTimeFormats()).thenReturn(multiTF ? timeFormats : new String[]{timeFormats[c]});
        result[r][c] = ac;
      }
    }
View Full Code Here

   
    int compCount = 0;
    for (AbstractComponent[] compArray : comps) {
      compCount += compArray.length;
      for (AbstractComponent c : compArray) {
        FeedProvider fp = c.getCapability(FeedProvider.class);
        Mockito.when(view.getFeedProvider(c)).thenReturn(fp);
      }
    }

    PlotDataAssigner pda = new PlotDataAssigner(view);
View Full Code Here

    // during each rendering cycle

    List<FeedProvider> feeds = new ArrayList<FeedProvider>(
        getManifestedComponent().getComponents().size());
    for (AbstractComponent childComp : getManifestedComponent().getComponents()) {
      FeedProvider fp = getFeedProvider(childComp);
      if (fp != null) {
        feeds.add(fp);
      }
    }
    return feeds;
View Full Code Here

        for (int i = 0; i < numOfChildren; i++) {
          AbstractComponent childComp = children.next();
          data[i][0] = childComp.getId();
          data[i][1] = childComp.getDisplayName();
          data[i][2] = childComp.getClass().getName();
          FeedProvider fp = childComp.getCapability(FeedProvider.class);
          List<Map<String, String>> feedVal = fp == null ? null : feedData.get(fp.getSubscriptionId());
          if (feedVal != null && !feedVal.isEmpty()) {
            Map<String, String> valMap = feedVal.get(0);
            String feedData = valMap.get(FeedProvider.NORMALIZED_VALUE_KEY);
            data[i][3] = feedData == null ? "" : feedData;
          } else {
View Full Code Here

  private List<FeedProvider> getFeedProviders(AbstractComponent component) {

    List<FeedProvider> feedProviders = new ArrayList<FeedProvider>(
        component.getComponents().size());
    for (AbstractComponent referencedComponent : component.getComponents()) {
      FeedProvider fp = referencedComponent.getCapability(
          FeedProvider.class);
      if (fp != null) {
        feedProviders.add(fp);
      }
    }
View Full Code Here

      for (int columnIndex = 0; columnIndex < structure
          .getColumnCount(); ++columnIndex) {
        AbstractComponent component = structure.getValue(rowIndex,
            columnIndex);
        if (component != null) {
          FeedProvider fp = getFeedProvider(component);
          if (fp != null) {
            feedProviders.add(fp);
            TimeConversion tc = component.getCapability(TimeConversion.class);
            if (tc != null) {
              timeConversionMap.put(fp.getSubscriptionId(), tc);
            }             
          } else {
            if (component.getCapability(Evaluator.class) != null) {
              for (AbstractComponent referencedComponent : component.getComponents()) {
                fp = getFeedProvider(referencedComponent);
View Full Code Here

      return false;
    }
    for (Integer row : table.getSelectedRows()) {
      for (Integer col : table.getSelectedColumns()) {
        AbstractComponent component = (AbstractComponent) model.getStoredValueAt(row, col);
        FeedProvider fp = component.getCapability(FeedProvider.class);
        if (fp == null || fp.getFeedType() == FeedType.STRING) {
          return false;
        }
      }
    }
   
View Full Code Here

        String id = tableModel.getKey(component);
        TableCellSettings settings = tableModel.getCellSettings(id);
        int decimals = settings.getNumberOfDecimals();
        // determine default decimal places
        if (decimals == -1) {
          FeedProvider fp = component.getCapability(FeedProvider.class);
          if (fp != null) {
            decimals = fp.getFeedType() == FeedType.INTEGER ? 0 : TableCellSettings.DEFAULT_DECIMALS;
          }
        }
        if (decimalPlaces != null && decimalPlaces != decimals) {
          return null;
        }
View Full Code Here

   * @param component the component for which to determine the key
   * @return a unique key for the component
   */
  public String getKey(AbstractComponent component) {
    AbstractComponent delegate = component;
    FeedProvider fp = component.getCapability(FeedProvider.class);
    if (fp != null) {
      return fp.getSubscriptionId();
    }   
    return delegate.getComponentId();
  }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.components.FeedProvider$RenderingInfo

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.