Package gov.nasa.arc.mct.gui.impl

Examples of gov.nasa.arc.mct.gui.impl.ActionContextImpl


   
    public MCTControlArea(MCTHousing parentHousing) {
        this.parentHousing = parentHousing;
        this.parentHousing.setControlArea(this);

        final ActionContextImpl actionContext = new ActionContextImpl();
        actionContext.setTargetHousing(parentHousing);
        actionContext.setTargetComponent( ((MCTStandardHousing) parentHousing).getWindowComponent() );
        actionContext.addTargetViewComponent(parentHousing.getHousedViewManifestation());
        if (parentHousing.getDirectoryArea() != null) {
            actionContext.addTargetViewComponent(parentHousing.getDirectoryArea().getHousedViewManifestation());
        }
        if (parentHousing.getContentArea() != null) {
            actionContext.addTargetViewComponent(parentHousing.getContentArea().getHousedViewManifestation());
        }
        this.setLayout(new BorderLayout());
    }
View Full Code Here


        for (int i = 0; i < standardMenuBar.getMenuCount(); i++) {
            Assert.assertFalse(standardMenuBar.getMenu(i) instanceof EditMenu);
        }

        ActionContextImpl context = new ActionContextImpl();
        context.setTargetHousing(housing);
        context.addTargetViewComponent(housing.getHousedViewManifestation());
        List<ContextAwareMenu> userObjectMenus = standardMenuBar.getUserObjectMenus(context);
        Assert.assertEquals(userObjectMenus.size(), 1);
        Assert.assertTrue(userObjectMenus.get(0) instanceof ObjectsMenu);
       
    }
View Full Code Here

            logger.error("View Manifestation count = 0, should be non-zero. MCTPopupOpenerForInspector");
            return;
        }

        // Set action context
        ActionContextImpl context = new ActionContextImpl();
        context.setTargetComponent(viewManifestationSet.iterator().next().getManifestedComponent());
        context.setInspectorComponent(inspector.getCurrentlyShowingComponent());

        context.setTargetHousing((MCTHousing) SwingUtilities.getAncestorOfClass(MCTAbstractHousing.class, viewManifestationSet.iterator().next()));
        for (View viewManifestation: viewManifestationSet) {
            context.addTargetViewComponent(viewManifestation);
        }
        JPopupMenu popupMenu = MenuFactory.createUserObjectPopupMenu(context);
        popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
        popupMenu.validate();
    }
View Full Code Here

         * @param e the event.
         * @param mousePressed state of the mouse button.
         */
        private void processPopUpListenerEvent(MouseEvent e, boolean mousePressed) {
            if (e.isPopupTrigger()) {
                ActionContextImpl context = new ActionContextImpl();
                context.setTargetComponent(ownerComponentCanvasManifestation.getManifestedComponent());
                context.setTargetHousing((MCTHousing) SwingUtilities.getAncestorOfClass(MCTAbstractHousing.class,
                        ownerComponentCanvasManifestation));
                JPopupMenu popup = MenuFactory.createViewPopupMenu(context);
                assert popup != null;
                if (!testMode) {
                    popup.show(e.getComponent(), e.getX(), e.getY());
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.gui.impl.ActionContextImpl

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.