Package gov.nasa.arc.mct.gui

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


        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontSize().intValue(), 20);
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontSize().intValue(), 20);
        }
    }
View Full Code Here


        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontStyle().intValue(), Font.BOLD);
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontStyle().intValue(), Font.BOLD);
        }
        CanvasFormattingController.notifyTitleBarFontStyleSelected(Font.ITALIC, selectedPanels);

        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontStyle().intValue(), Font.ITALIC);
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontStyle().intValue(), Font.ITALIC);
        }
       
        CanvasFormattingController.notifyTitleBarFontStyleSelected(Font.BOLD + Font.ITALIC, selectedPanels);

        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontStyle().intValue(), Font.BOLD+ Font.ITALIC);
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontStyle().intValue(), Font.BOLD+ Font.ITALIC);
        }
    }
View Full Code Here

        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontUnderline().intValue(), TextAttribute.UNDERLINE_ON.intValue());
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontUnderline().intValue(), TextAttribute.UNDERLINE_ON.intValue());
        }
       
        CanvasFormattingController.notifyTitleBarFontUnderlineSelected(ControlAreaFormattingConstants.UNDERLINE_OFF, selectedPanels);

        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontUnderline().intValue(), ControlAreaFormattingConstants.UNDERLINE_OFF);
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontUnderline().intValue(), ControlAreaFormattingConstants.UNDERLINE_OFF);
        }
    }
View Full Code Here

        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontForegroundColor().intValue(), Color.decode("#0000FF").getRGB());
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontForegroundColor().intValue(), Color.decode("#0000FF").getRGB());
        }
    }
View Full Code Here

        for (Panel p : selectedPanels) {
            panel = (TestPanel) p;
            Assert.assertEquals(panel.getTitleFontBackgroundColor().intValue(), Color.decode("#0000FF").getRGB());
           
            MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation());
            Assert.assertEquals(info.getPanelTitleFontBackgroundColor().intValue(), Color.decode("#0000FF").getRGB());
        }
    }
View Full Code Here

            }
        }
    }
   
    private void setupTitlePanel() {
        MCTViewManifestationInfo manifestationInfo = CanvasManifestation.getManifestationInfo(this.wrappedManifestation);
        AbstractComponent wrappedComponent = wrappedManifestation.getManifestedComponent();
        icon = new TransferableIcon(wrappedComponent, new TransferableIcon.ViewTransferCallback() {
            @Override
            public List<View> getViewsToTransfer() {
                return Collections.singletonList(getWrappedManifestation());
View Full Code Here

     

    }
   
    private void init() {
        MCTViewManifestationInfo manifestationInfo = CanvasManifestation.getManifestationInfo(this.wrappedManifestation);
        byte border = PanelBorder.ALL_BORDERS;
        String borderStr = manifestationInfo.getInfoProperty(ControlAreaFormattingConstants.PANEL_BORDER_PROPERTY);
        if (borderStr != null) {
            border = Byte.parseByte(borderStr);
        }
        int borderStyle = manifestationInfo.getBorderStyle();
        Color borderColor = manifestationInfo.getBorderColor();
        this.panelBorder = new PanelBorder(border);
        panelBorder.setBorderStyle(borderStyle);
        panelBorder.setBorderColor(borderColor);
        setBorder(this.panelBorder);
        setupTitlePanel();
View Full Code Here

   
    @Override
    public void setBounds(int x, int y, int width, int height) {
        super.setBounds(x, y, width, height);
        revalidate();
        MCTViewManifestationInfo manifestInfo = CanvasManifestation.getManifestationInfo(this.wrappedManifestation);
        manifestInfo.setStartPoint(new Point(x, y));
        manifestInfo.setDimension(new Dimension(width, height));
    }
View Full Code Here

   
    @Override
    public void setBounds(Rectangle r) {
        super.setBounds(r);
        revalidate();
        MCTViewManifestationInfo manifestInfo = CanvasManifestation.getManifestationInfo(this.wrappedManifestation);
        manifestInfo.setStartPoint(r.getLocation());
        manifestInfo.setDimension(r.getSize());
    }
View Full Code Here

      Set<Object> props = properties.getProperty("CANVAS CONTENT PROPERTY");
      if (props != null) {
        for (Object prop : props) {
          if (MCTViewManifestationInfo.class
                             .isAssignableFrom(prop.getClass())) {
            MCTViewManifestationInfo info = (MCTViewManifestationInfo) prop;
            String oldID = info.getComponentId();
            // Loop through all components (except references), looking for
            // the one which used to have this ID. When it's found, take its
            // new ID and put it in the view data in place of the old one.
            for (Component comp : allComponents) {
              if (comp.getIdFromXMLFile().equals(oldID)) {
                info.setComponentId(comp.getMctComp().getComponentId());
                break;
              }
            }

            // Recursively update ids in the ownedProperties list
            if (info.getOwnedProperties() != null) {
              for (ExtendedProperties ownedProp :
                                   info.getOwnedProperties()) {
                updateCompIdInView(ownedProp);
              }
            }
          }
        }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.gui.MCTViewManifestationInfo

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.