Package gov.nasa.arc.mct.gui.housing

Examples of gov.nasa.arc.mct.gui.housing.MCTAbstractHousing


            }
            list.add(new BringWindowToFrontAction(housing));
        }
       
       
        MCTAbstractHousing currentHousing = (MCTAbstractHousing) ((ActionContextImpl) context).getTargetHousing();
        List<BringWindowToFrontAction> actions = sort(map, currentHousing);
        setActions(actions.toArray(new BringWindowToFrontAction[actions.size()]));
       
        return true;
    }
View Full Code Here


        menuBar.add(mockMenu);
        MockComponent componentA = new MockComponent();
        componentA.setId("a");
       
        access.setPlatform(mockPlatform);
        MCTAbstractHousing housing = new MockHousing(new MCTHousingViewManifestation(componentA, new ViewInfo(MCTHousingViewManifestation.class,"", ViewType.LAYOUT)));
        access.releasePlatform();
       
        housing.setJMenuBar(menuBar);
        UserEnvironmentRegistry.registerHousing(housing);
    }
View Full Code Here

        }
        ((MCTAbstractHousing) housing).setJMenuBar(MenuFactory.createStandardHousingMenuBar((MCTStandardHousing) housing));
        new StatusBarContentProvider(housing);
        if (housing.getContentArea() != null && !housing.getContentArea().isAreaEmpty()) {
            // use preferred size since the content area is going to be the dominate focus
            MCTAbstractHousing abstractHousing = ((MCTAbstractHousing) housing);
            abstractHousing.pack();
            Rectangle maximumWindowBounds = abstractHousing.getGraphicsConfiguration() != null ? abstractHousing.getGraphicsConfiguration().getBounds() :
                                            GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
            abstractHousing.setSize(Math.min((int) (maximumWindowBounds.width*MAX_SCALE_FACTOR), abstractHousing.getSize().width),
                            Math.min((int) (maximumWindowBounds.height*MAX_SCALE_FACTOR), abstractHousing.getSize().height));
            housing.getContentArea().getHousedViewManifestation().requestFocusInWindow();
       
        }
       
        if (activeWindow != null) {
View Full Code Here

    @Override
    public void closeWindows(String componentId) {
        Window[] windows = getActiveWindows();
        for (Window window : windows) {
            if (MCTAbstractHousing.class.isAssignableFrom(window.getClass())) {
                MCTAbstractHousing housing = MCTAbstractHousing.class.cast(window);
                View housedManifestation = housing.getHousedViewManifestation();
                if (housedManifestation != null && componentId.equals(housedManifestation.getManifestedComponent().getId())) {
                    UserEnvironmentRegistry.removeHousing(housing);
                    housing.dispose();
                }
            }
        }
    }
View Full Code Here

        ActionManager.registerMenu(ViewMenu.class, "VIEW_MENU");
       
        // Setup manifestation for the action context
        View manifestation = Mockito.mock(View.class);
        AbstractComponent component = Mockito.mock(AbstractComponent.class);
        MCTAbstractHousing housing = Mockito.mock(MCTAbstractHousing.class);
       
        Mockito.when(manifestation.getManifestedComponent()).thenReturn(component);
        Mockito.when(manifestation.getParent()).thenReturn(housing);

        ActionContextImpl context = new ActionContextImpl();
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.gui.housing.MCTAbstractHousing

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.