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

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


    }
   
    @Override
    public boolean canHandle(ActionContext context) {
        actionContext = (ActionContextImpl) context;
        MCTHousing activeHousing = actionContext.getTargetHousing();
        if (activeHousing == null)
            return false;

        Collection<View> selection =
            activeHousing.getSelectionProvider().getSelectedManifestations();
       
        if (selection.isEmpty())
            return false;
       
        ViewInfo vi = selection.iterator().next().getInfo();
       
        if (selection.isEmpty() ||
                !(vi != null && vi.getViewType() == ViewType.NODE)){
            return false;
        }

        if (!(activeHousing.getDirectoryArea() instanceof MCTDirectoryArea)) {
            return false;
        }
           
        MCTDirectoryArea directory = MCTDirectoryArea.class.cast(activeHousing.getDirectoryArea());
        MCTMutableTreeNode firstSelectedNode = directory.getSelectedDirectoryNode();
        if (firstSelectedNode == null)
            return false;
       
        JTree tree = firstSelectedNode.getParentTree();
View Full Code Here

TOP

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

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.