Package gov.nasa.arc.mct.components

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


    }
   
    @SuppressWarnings("serial")
    @Test
    public void notifyBorderColorSelectedTest() {
        final ExtendedProperties viewProps = new ExtendedProperties();
        CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) {
            public ExtendedProperties getViewProperties() {
                return viewProps;
            };
        };
View Full Code Here


      view.getManifestedComponent().save();
    }
  }
 
  public void loadFrom(View view) {
    ExtendedProperties properties = view.getViewProperties();
    for (Setting<?> setting : settingMap.values()) {
      String property = properties.getProperty(setting.name, String.class);
      if (property != null) {
        setting.setSerializedValue(property);
      }
    }   
  }
View Full Code Here

    }
   
    @SuppressWarnings("serial")
    @Test
    public void notifyBorderFormattingStyleTest() {
        final ExtendedProperties viewProps = new ExtendedProperties();
        CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) {
            public ExtendedProperties getViewProperties() {
                return viewProps;
            };
        };
View Full Code Here

  }
 
  @Test
  public void testViewStateLoading() {
    final TestAbstractComponent testComp = createAbstractComponent("test","0");
    ExtendedProperties ep = new ExtendedProperties();
    ep.addProperty("test", "abc");
    testComp.getCapability(ComponentInitializer.class).setViewRoleProperty("test", ep);
    serviceImpl.persist(Arrays.<AbstractComponent>asList(testComp));
    Map<String, ExtendedProperties> returnedEp = serviceImpl.getAllProperties(testComp.getComponentId());
    Assert.assertTrue(returnedEp.size() == 1);
    Assert.assertEquals(returnedEp.get("test").getProperty("test", String.class), "abc");
View Full Code Here

                MCTViewManifestationInfo viewManifestationInfo = new MCTViewManifestationInfoImpl();
                viewManifestationInfo.setComponentId(comp.getComponentId());
                viewManifestationInfo.setStartPoint(dropPoint);
                viewManifestationInfo.setManifestedViewType(newViewInfo.getType());
                if (v.getInfo().equals(newViewInfo)) {
                    ExtendedProperties ep = v.getViewProperties().clone();
                    ep.addProperty(CanvasViewStrategy.OWNED_TYPE_PROPERTY_NAME, v.getInfo().getType());
                    viewManifestationInfo.getOwnedProperties().add(ep);
                }
                viewManifestationInfo.addInfoProperty(ControlAreaFormattingConstants.PANEL_ORDER, String.valueOf(nextPanelId));
                // use the viewComp here instead of the master component to retrieve the actual properties for the view
                View addManifestation = CanvasViewStrategy.CANVAS_OWNED.createViewFromManifestInfo(newViewInfo, comp, canvasManifestation.getManifestedComponent(), viewManifestationInfo);
               
                addManifestation.putClientProperty(CanvasManifestation.MANIFEST_INFO, viewManifestationInfo);
                Panel panel = containerManifestation.createPanel(addManifestation, nextPanelId, containerManifestation);
                viewManifestationInfo.setDimension(panel.getPreferredSize());

                addManifestation.setNamingContext(panel);
                assert addManifestation.getNamingContext() == panel;
               
                // Add new panel info to the canvas content property list
                ExtendedProperties viewTypeProperties = containerManifestation.getViewProperties();
                viewTypeProperties.addProperty(CANVAS_CONTENT_PROPERTY, viewManifestationInfo);               
                containerManifestation.renderedPanels.put(
                                nextPanelId, panel);
                containerManifestation.canvasPanel.add(panel, new Rectangle(dropPoint, panel.getPreferredSize()));
                panels.add(panel);
                containerManifestation.changeOrder(panel, PANEL_ZORDER.FRONT);
View Full Code Here

   
    testFrame = new JFrame(WINDOW_TITLE);

    MockitoAnnotations.initMocks(this);
   
    viewProperties = new ExtendedProperties();
    Mockito.when(mockView.getManifestedComponent()).thenReturn(mockComponent);
    Mockito.when(mockView.getViewProperties()).thenReturn(viewProperties)
   
    mockComponent.setDisplayName("Test Component");
   
View Full Code Here

    }
   
    @SuppressWarnings("serial")
    @Test
    public void notifyTitleBarStatusTest() {
        final ExtendedProperties viewProps = new ExtendedProperties();
        CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) {
            public ExtendedProperties getViewProperties() {
                return viewProps;
            };
        };
View Full Code Here

    }
   
    @SuppressWarnings("serial")
    @Test
    public void notifyNewTitleTest() {
        final ExtendedProperties viewProps = new ExtendedProperties();
        CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) {
            public ExtendedProperties getViewProperties() {
                return viewProps;
            };
        };
View Full Code Here

    }
   
    @SuppressWarnings("serial")
    @Test
    public void notifyNewTitleFontTest() {
        final ExtendedProperties viewProps = new ExtendedProperties();
        CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) {
            public ExtendedProperties getViewProperties() {
                return viewProps;
            };
        };
View Full Code Here

    }
   
    @SuppressWarnings("serial")
    @Test
    public void notifyNewTitleFontSizeTest() {
        final ExtendedProperties viewProps = new ExtendedProperties();
        CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) {
            public ExtendedProperties getViewProperties() {
                return viewProps;
            };
        };
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.