Examples of MCTViewManifestationInfo


Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

   
    /** Get the panel title font  color from the manifestation info
     * @return the panel title font color from the manifestation info
     */
    public Integer getTitleFontForegroundColor() {
        MCTViewManifestationInfo manifestInfo = CanvasManifestation.getManifestationInfo(this.wrappedManifestation);
        return manifestInfo.getPanelTitleFontForegroundColor();
    }
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

   
    /** Get the panel title background color from the manifestation info
     * @return the panel title background color from the manifestation info
     */
    public Integer getTitleFontBackgroundColor() {
        MCTViewManifestationInfo manifestInfo = CanvasManifestation.getManifestationInfo(this.wrappedManifestation);
        return manifestInfo.getPanelTitleFontBackgroundColor();
    }
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

            // Remove stale manifestation info in the canvas view property
            // Note that changes will not be persisted until the next commit.
            AbstractComponent component = getManifestedComponent();
            Iterator<Object> iterator = canvasContents.iterator();
            while(iterator.hasNext()) {
                MCTViewManifestationInfo info = (MCTViewManifestationInfo) iterator.next();
                if (!containsChildComponent(component, info.getComponentId())) {
                    iterator.remove();
                }
            }
       
            int zorder = 0;
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

    }
    private void removeStalePanels(Set<Object> canvasCotents) {
        Iterator<Panel> it = renderedPanels.values().iterator();
        while (it.hasNext()) {
            Panel p = it.next();
            MCTViewManifestationInfo paneInfo = CanvasManifestation.getManifestationInfo(p.getWrappedManifestation());
            if (!canvasCotents.contains(paneInfo)) {
                this.canvasPanel.remove(p);
                it.remove();
                selectedPanels.remove(p);
                augmentation.removeHighlights(Collections.singleton(p));
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

        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);
                Panel panel = renderedPanels.get(Integer.valueOf(panelOrder));
               
                if (panel != null) {
                   
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

        assert key != null : "Panel not found in canvas view.";
        renderedPanels.remove(key);
        canvasPanel.remove(panel);
        canvasPanel.repaint();
        Set<Object> viewProperties = getViewProperties().getProperty(CanvasManifestation.CANVAS_CONTENT_PROPERTY);
        MCTViewManifestationInfo info = null;
        for (Object viewProperty : viewProperties) {
            assert viewProperty instanceof MCTViewManifestationInfo : "Canvas property must be MCTViewManifestationInfo";
            info = (MCTViewManifestationInfo) viewProperty;
            if (info == CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation())) {
                break;
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

    public void fireSelectionCloned(Collection<Panel> panels) {
        for (Panel panel : panels) {
            int nextPanelId = panelId++;
            panel.setId(nextPanelId);
            View manifestation = panel.getWrappedManifestation();        
            MCTViewManifestationInfo viewManifestationInfo = CanvasManifestation.getManifestationInfo(manifestation);
            getViewProperties().addProperty(CANVAS_CONTENT_PROPERTY, viewManifestationInfo);           
            viewManifestationInfo.addInfoProperty(ControlAreaFormattingConstants.PANEL_ORDER, Integer.toString(nextPanelId));
            canvasPanel.add(panel, new Rectangle(viewManifestationInfo.getStartPoint(), viewManifestationInfo.getDimension()));
            renderedPanels.put(nextPanelId, panel);
        }

        canvasPanel.revalidate();
        setSelection(panels);
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

    }
   
    void changeOrder(Panel panel, PANEL_ZORDER order) {
        ExtendedProperties viewProperties = getViewProperties();
        gov.nasa.arc.mct.util.LinkedHashSet<Object> canvasContents = (gov.nasa.arc.mct.util.LinkedHashSet<Object>)viewProperties.getProperty(CanvasManifestation.CANVAS_CONTENT_PROPERTY);
        MCTViewManifestationInfo movedManifestInfo = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
        canvasContents.remove(movedManifestInfo);

        switch(order) {
            case FRONT: changeOrder(panel, 0);
                canvasContents.add(movedManifestInfo);
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

                AbstractComponent viewComp = v.getManifestedComponent();
                ViewInfo newViewInfo = getViewInfoForCanvas(v, viewComp);
                AbstractComponent comp = viewComp;
               
                int nextPanelId = containerManifestation.panelId++;
                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
View Full Code Here

Examples of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

        Platform mockPlatform = Mockito.mock(Platform.class);
        PersistenceProvider mockPersistenceProvider = Mockito.mock(PersistenceProvider.class);
        access.setPlatform(mockPlatform);
        Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistenceProvider);
        Mockito.when(mockPersistenceProvider.getComponent(component.getComponentId())).thenReturn(component);
        MCTViewManifestationInfo manifInfo = Mockito.mock(MCTViewManifestationInfo.class);       
        View view = CanvasViewStrategy.CANVAS_OWNED.createViewFromManifestInfo(viewInfo, component, canvasComponent, manifInfo);
        Assert.assertEquals(view.getManifestedComponent().getComponentId(), canvasComponent.getComponentId());
    }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.