Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.TreeItem$TreeItemImplIE8ToIE10


        navigation = new LHSNavTree("standalone-runtime");
        navigation.getElement().setAttribute("aria-label", "Runtime Tasks");

        // ----------------------------------------------------

        TreeItem serverLeaf = new LHSTreeSection("Server", true);

        LHSNavTreeItem server = new LHSNavTreeItem("Overview", NameTokens.StandaloneServerPresenter);

        serverLeaf.addItem(server);
        serverLeaf.addItem(new LHSNavTreeItem("Manage Deployments", NameTokens.DeploymentListPresenter));
        navigation.addItem(serverLeaf);


        // -------------
View Full Code Here


        };

        for (int i = 0; i < adminStructure.length; i++) {

            Object[] packageData = adminStructure[i];
            TreeItem localChildNode = new TreeItem(Util.getHeader((ImageResource) packageData[1], (String) packageData[0]));
            itemWidgets.put(localChildNode, (String) packageData[2]);

            addItem(localChildNode);
        }
    }
View Full Code Here

    // Package snapshot
    public static final String PACKAGE_SNAPSHOTS = "packageSnapshots";

    public static void setupDeploymentTree( Tree tree, Map<TreeItem, String> itemWidgets ) {
        TreeItem root = tree.addItem( Util.getHeader( images.chartOrganisation(), constants.PackageSnapshots() ) );
        root.setState( true );
        itemWidgets.put( root, PACKAGE_SNAPSHOTS );
        deploymentListPackages( root );
    }
View Full Code Here

        } );
    }

    private static void buildDeploymentTree( TreeItem root, Folder fldr ) {
        if ( fldr.getPackageConfigData() != null ) {
            TreeItem pkg = new TreeItem( Util.getHeader( images.snapshotSmall(), fldr.getPackageConfigData().name ) );
            pkg.setUserObject( fldr.getPackageConfigData() );
            pkg.addItem( new TreeItem( constants.PleaseWaitDotDotDot() ) );
            root.addItem( pkg );
        } else {
            TreeItem tn = new TreeItem( Util.getHeader( images.emptyPackage(), fldr.getFolderName() ) );
            root.addItem( tn );
            for (Folder c : fldr.getChildren()) {
                buildDeploymentTree( tn, c );
            }
        }
View Full Code Here

            private void createChildNodes( final TreeItem treeItem, final String path, final Map<TreeItem, String> itemWidgets, String[] value ) {
                for (int i = 0; i < value.length; i++) {

                    final String current = value[i];
                    final TreeItem childNode = new TreeItem( Util.getHeader( images.categorySmall(), current ) );

                    //ID for category tabs.
                    String widgetId = CATEGORY_ID + "-" + ((path.equals( "/" )) ? current : path + "/" + current);
                    itemWidgets.put( childNode, widgetId );
                    treeItem.addItem( childNode );

                    childNode.addItem( new TreeItem( Util.getHeader( images.categorySmall(), constants.PleaseWaitDotDotDot() ) ) );
                    childNode.getTree().addOpenHandler( createOpenHandlerForTree( itemWidgets, childNode ) );
                }
            }

            private void newRepoDialogIfShowAdminAndPathMatches( final String path ) {
                if ( path.equals( "/" ) && UserCapabilities.INSTANCE.hasCapability( Capability.SHOW_ADMIN ) ) {
View Full Code Here

    public static Tree getQAStructure( final Map<TreeItem, String> itemWidgets ) {
        Tree tree = new Tree();
        tree.setAnimationEnabled( true );

        final TreeItem scenarios = new TreeItem( Util.getHeader( images.testManager(), constants.TestScenariosInPackages() ) );
        scenarios.addItem( new TreeItem( constants.PleaseWaitDotDotDot() ) );
        tree.addItem( scenarios );
        itemWidgets.put( scenarios, TEST_SCENARIOS_ROOT_ID );

        final TreeItem analysis = new TreeItem( Util.getHeader( images.analyze(), constants.Analysis() ) );
        analysis.addItem( new TreeItem( constants.PleaseWaitDotDotDot() ) );
        itemWidgets.put( analysis, ANALYSIS_ROOT_ID );

        if ( ApplicationPreferences.showVerifier() ) {
            tree.addItem( analysis );
        }
View Full Code Here

                                                         public void onSuccess(String[] categories) {
                                                             selectedPath = null;
                                                             navTreeWidget.removeItems();

                                                             TreeItem root = new TreeItem();
                                                             root.setHTML( AbstractImagePrototype.create(images.desc()).getHTML() );
                                                             navTreeWidget.addItem( root );

                                                             if ( categories.length == 0 ) {
                                                                 showEmptyTree();
                                                             } else {
                                                                 hideEmptyTree();
                                                             }
                                                             for ( int i = 0; i < categories.length; i++ ) {
                                                                 TreeItem it = new TreeItem();
                                                                 it.setHTML( AbstractImagePrototype.create(images.categorySmall()).getHTML() + h( categories[i] ) );
                                                                 it.setUserObject( categories[i] );
                                                                 it.addItem( new PendingItem() );
                                                                 root.addItem( it );
                                                             }

                                                             root.setState( true );
                                                         }
View Full Code Here

        this.selectedPath = getPath( event.getSelectedItem() );
        this.categorySelectHandler.selected( selectedPath );
    }

    public void onOpen(OpenEvent<TreeItem> event) {
        TreeItem item = event.getTarget();

        if ( hasBeenLoaded( item ) ) {
            return;
        }

        final TreeItem root = item;

        //walk back up to build a tree
        this.selectedPath = getPath( item );

        categoryService.loadChildCategories( selectedPath,
                                             new GenericCallback<String[]>() {

                                                 public void onSuccess(String[] list) {
                                                     TreeItem child = root.getChild( 0 );
                                                     if ( child instanceof PendingItem ) {
                                                         // root.removeItem( child );
                                                         child.setVisible( false );
                                                     }
                                                     for ( int i = 0; i < list.length; i++ ) {
                                                         TreeItem it = new TreeItem();
                                                         it.setHTML( AbstractImagePrototype.create(images.categorySmall()).getHTML() + h( list[i] ) );
                                                         it.setUserObject( list[i] );
                                                         it.addItem( new PendingItem() );

                                                         root.addItem( it );
                                                     }
                                                 }
View Full Code Here

    }

    private String getPath(TreeItem item) {
        String categoryPath = (String) item.getUserObject();
        if ( categoryPath == null ) return null;
        TreeItem parent = item.getParentItem();
        while ( parent.getUserObject() != null ) {
            categoryPath = ((String) parent.getUserObject()) + "/" + categoryPath;
            parent = parent.getParentItem();
        }
        return categoryPath;
    }
View Full Code Here

        navigation = new LHSNavTree("standalone-runtime");
        navigation.getElement().setAttribute("aria-label", "Runtime Tasks");

        // ----------------------------------------------------

        TreeItem serverLeaf = new LHSTreeSection("Server", true);

        LHSNavTreeItem server = new LHSNavTreeItem("Overview", NameTokens.StandaloneServerPresenter);

        serverLeaf.addItem(server);
        serverLeaf.addItem(new LHSNavTreeItem("Manage Deployments", NameTokens.DeploymentBrowserPresenter));
        navigation.addItem(serverLeaf);


        // -------------
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.TreeItem$TreeItemImplIE8ToIE10

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.