Examples of MCTStandardHousing


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

            @Override
            protected Transferable createTransferable(JComponent c) {
                View v = context.getWindowManifestation();
                Container container = v.getTopLevelAncestor();
                if (container instanceof MCTStandardHousing) {
                    MCTStandardHousing housing = (MCTStandardHousing) container;
                    MCTContentArea contentArea = housing.getContentArea();
                    if (contentArea != null) {
                        v = contentArea.getHousedViewManifestation();
                    }
                }
                return new ViewRoleSelection(new View[] { v });
View Full Code Here

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

        }

        UtilComponent component = new UtilComponent(IdGenerator.nextComponentId());

        MCTHousingViewManifestation housingView = new MCTHousingViewManifestation(component, new ViewInfo(MCTHousingViewManifestation.class,"", ViewType.LAYOUT));
        MCTStandardHousing housing = new MCTStandardHousing(100,100,WindowConstants.EXIT_ON_CLOSE, housingView);

        UserEnvironmentRegistry.registerHousing(housing);
        housing.dispatchEvent(new WindowEvent(housing, WindowEvent.WINDOW_GAINED_FOCUS));
        return housing;
    }
View Full Code Here

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

        }

       
        @Override
        public void actionPerformed(ActionEvent event) {
            MCTStandardHousing housing = (MCTStandardHousing) context.getTargetHousing();           
            AbstractComponent c = housing.getContentArea().getHousedViewManifestation().getManifestedComponent();
            if (!c.isStale() && c.isDirty()) {
                if (!commitOrAbortPendingChanges()) {
                    return; // Abandon event if user aborts.
                }
            }
           
            View currentCanvasViewManifestation = housing.getContentArea().getHousedViewManifestation();
            if (!viewInfo.equals(currentCanvasViewManifestation.getInfo())) {
                // get a component from the persistence provider to ensure the component always reflects the most recent updates
                // this also ensures that when changing a view any non saved changes will be lost
                AbstractComponent ac = PlatformAccess.getPlatform().getPersistenceProvider().getComponent(currentCanvasViewManifestation.getManifestedComponent().getComponentId());
                View v = viewInfo.createView(ac);
                housing.getContentArea().setOwnerComponentCanvasManifestation(v);
                housing.setTitle(v.getManifestedComponent().getDisplayName()
                        + " - " + viewInfo.getViewName() + PLUS);
                housing.getContentArea().getHousedViewManifestation().requestFocusInWindow();
            }
        }
View Full Code Here

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

        }

        @Override
        public boolean isSelected() {
            putValue(Action.SELECTED_KEY, true);
            MCTStandardHousing housing = (MCTStandardHousing) context.getTargetHousing();
            View currentCanvasViewManifestation = housing.getContentArea().getHousedViewManifestation();
            return viewInfo.getType().equals(currentCanvasViewManifestation.getInfo().getType());
        }
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.