Package gov.nasa.arc.mct.components

Examples of gov.nasa.arc.mct.components.ExtendedProperties


   * to the manifestation.)
   * @param key the name of the setting
   * @param value the new value
   */
  private void set(String key, String value) {
    ExtendedProperties viewProperties = manifestation.getViewProperties();
    viewProperties.setProperty(key, value);
  }
View Full Code Here


      }
    }
  }
 
  public void persist(View view) {
    ExtendedProperties properties = view.getViewProperties();
    for (Entry<String, String> setting : this.getPersistableSettings().entrySet()) {
      properties.setProperty(setting.getKey(), setting.getValue());
    }
    if (view.getManifestedComponent() != null) {
      view.getManifestedComponent().save();
    }
  }
View Full Code Here

   
    private ExtendedProperties ep;
   
    @BeforeMethod
    void setup() {
        ep = new ExtendedProperties();
    }
View Full Code Here

        MCTViewManifestationInfo info = new MCTViewManifestationInfoImpl();
        info.setManifestedViewType(viewValue);
       
        ep.setProperty(viewManifestationKey, info);
       
        ExtendedProperties clonedEp = ep.clone();
        MCTViewManifestationInfo clonedInfo = clonedEp.getProperty(viewManifestationKey, MCTViewManifestationInfo.class);
        Assert.assertNotSame(info, clonedInfo);
        Assert.assertEquals(viewValue, clonedInfo.getManifestedViewType());
        Assert.assertEquals(stringValue, clonedEp.getProperty(stringKey, String.class));
    }
View Full Code Here

        load();
    }
   
    private void load() {
        if (!canvasEnabled) return; // Disabled panels should load nothing
        ExtendedProperties viewProperties = getViewProperties();
        Set<Object> canvasContents = viewProperties.getProperty(CanvasManifestation.CANVAS_CONTENT_PROPERTY);

        if (canvasContents != null) {
            // Remove stale manifestation info in the canvas view property
            // Note that changes will not be persisted until the next commit.
            AbstractComponent component = getManifestedComponent();
View Full Code Here

     * @param p location on screen
     * @return the <code>Panel</code> that contains point p
     */
    Panel findImmediatePanel(Point p) {
        if (!canvasEnabled) return null; // Disabled panels have no sub panels
        ExtendedProperties viewProperties = getViewProperties();
        gov.nasa.arc.mct.util.LinkedHashSet<Object> canvasContents = (gov.nasa.arc.mct.util.LinkedHashSet<Object>)viewProperties.getProperty(CanvasManifestation.CANVAS_CONTENT_PROPERTY);
        if (canvasContents != null) {
            for (Object object : canvasContents) {
                MCTViewManifestationInfo info = (MCTViewManifestationInfo) object;
                String panelOrder = info
                                .getInfoProperty(ControlAreaFormattingConstants.PANEL_ORDER);
View Full Code Here

//        }
      }
      lineSettingsBuilder.append('\n');
    }
   
    ExtendedProperties viewProperties = plotViewManifestation.getViewProperties();
   
    viewProperties.setProperty(PlotConstants.LINE_SETTINGS, lineSettingsBuilder.toString());

    if (plotViewManifestation.getManifestedComponent() != null) {
      plotViewManifestation.getManifestedComponent().save();
    }
  }
View Full Code Here

  @Test (dataProvider = "feedProviders")
  public void testUpdateFeedProviders(AbstractComponent[][] comps, Set<String> expectedTS, Set<String> expectedTF) {
    AbstractComponent comp = generateMockGrandparent(comps);
    PlotViewManifestation view = Mockito.mock(PlotViewManifestation.class);
    Mockito.when(view.getManifestedComponent()).thenReturn(comp);
    Mockito.when(view.getViewProperties()).thenReturn(new ExtendedProperties());
   
    int compCount = 0;
    for (AbstractComponent[] compArray : comps) {
      compCount += compArray.length;
      for (AbstractComponent c : compArray) {
View Full Code Here

    }
    return value;
  }
 
  public void setProps(String key, String value) {
    ExtendedProperties viewProperties = manifestation.getViewProperties();
    viewProperties.setProperty(key, value);
  }
View Full Code Here

  @BeforeMethod
  public void setup() {
    MockitoAnnotations.initMocks(this);
    Mockito.when(manifestation.getInfo()).thenReturn(new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    Mockito.when(manifestation.getViewProperties()).thenReturn(new ExtendedProperties());
  }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.components.ExtendedProperties

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.