Package gov.nasa.arc.mct.gui

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


        // To verify (AbstractComponent cannot be entirely stubbed)
        final Collection<AbstractComponent> added = new ArrayList<AbstractComponent>();
       
        // Set up the root node.
        View rootView = mock(View.class);
        MCTMutableTreeNode root = createMockNode(rootView);
        when(model.getRoot()).thenReturn(root);

        DataFlavor[] flavors = new DataFlavor[]{GOOD_FLAVOR};
        Transferable transferable = createMockTransferable(flavors);
       
        Component mockTree = mock(Component.class);
       
        TransferSupport support = createDropTransferSupport(mockTree, transferable, flavors);

        View targetView = mock(View.class);
        MCTMutableTreeNode target = createMockNode(targetView);
        AbstractComponent targetComponent = new AbstractComponent() {

            @Override
            protected void addDelegateComponentsCallback(Collection<AbstractComponent> childComponents) {
                added.addAll(childComponents);
View Full Code Here


    @SuppressWarnings("unchecked")
    @Test(dataProvider="importTests")
    public void testImportIntoEmptyRoot(int childIndex) throws Exception {
        // Set up the root node.
        View rootView = mock(View.class);
        MCTMutableTreeNode root = createMockNode(rootView);
        when(model.getRoot()).thenReturn(root);
        AbstractComponent rootComponent = Mockito.mock(AbstractComponent.class);
        Mockito.when(rootView.getManifestedComponent()).thenReturn(rootComponent);

        DataFlavor[] flavors = new DataFlavor[]{GOOD_FLAVOR};
View Full Code Here

     * @param component - The AbstractComponent to be cloned.
     * @param viewInfo
     * @return cloned subtree rooted from view role's model role.
     */
    private static final MCTMutableTreeNode cloneFirstLevelViewRoles(AbstractComponent component, ViewInfo info) {
        MCTMutableTreeNode cloned = new MCTMutableTreeNode(info.createView(component));
        if (!component.isLeaf()) {
            cloned.setProxy(true);
            MCTMutableTreeNode proxyChildNode = new MCTMutableTreeNode(View.NULL_VIEW_MANIFESTATION);
            cloned.add(proxyChildNode);
        }

        return cloned;
    }
View Full Code Here

TOP

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

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.