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

Examples of com.google.gwt.user.client.ui.IsTreeItem


        categoriesRootItem = this.view.addRootCategoryTreeItem();
        categories.put( categoriesRootItem, "/" );
    }

    private void addCategoryItem(String categoryName, IsTreeItem treeItem) {
        IsTreeItem subItem = view.addTreeItem( treeItem, categoryName );
        String path = getItemPath( categoryName, categories.get( treeItem ) );
        categories.put( subItem, path );
    }
View Full Code Here


    private void addSubStatesToTreeItem() {
        view.removeStates();
        clientFactory.getRepositoryService().listStates( new GenericCallback<String[]>() {
            public void onSuccess(String[] result) {
                for (String name : result) {
                    IsTreeItem item = view.addStateItem( name );
                    states.add( item );
                }
            }
        } );
    }
View Full Code Here

        }*/
        root = this.view.addRootTreeItem();
        addInbox();
        findRootTreeItem = this.view.addFind();
        if ( canShowStates() ) {
            IsTreeItem statesRootTreeItem = this.view.addRootStateTreeItem();
        }
        addRootCategory();
    }
View Full Code Here

        categoriesRootItem = this.view.addRootCategoryTreeItem();
        categories.put( categoriesRootItem, "/" );
    }

    private void addCategoryItem(String categoryName, IsTreeItem treeItem) {
        IsTreeItem subItem = view.addTreeItem( treeItem, categoryName );
        String path = getItemPath( categoryName, categories.get( treeItem ) );
        categories.put( subItem, path );
    }
View Full Code Here

    private void addSubStatesToTreeItem() {
        view.removeStates();
        clientFactory.getRepositoryService().listStates( new GenericCallback<String[]>() {
            public void onSuccess(String[] result) {
                for (String name : result) {
                    IsTreeItem item = view.addStateItem( name );
                    states.add( item );
                }
            }
        } );
    }
View Full Code Here

    public void testOpenStateSelection() throws Exception {
        setUpStates( "title1" );
        categoryServiceAsyncMock.addCategorySelection( "/" );
        setUpCapabilities( Capability.SHOW_KNOWLEDGE_BASES_VIEW );

        IsTreeItem state = mock( IsTreeItem.class );
        when( view.addStateItem( "title1" ) ).thenReturn( state );

        setUpPresenter();

        presenter.onTreeItemOpen( rootTreeItem );
View Full Code Here

    @Test
    public void testCategorySelection() throws Exception {
        categoryServiceAsyncMock.addCategorySelection( "/", "categoryName1", "categoryName2", "categoryName3" );

        IsTreeItem category1 = mock( IsTreeItem.class );
        when( view.addTreeItem( rootCategoryTreeItem, "categoryName1" ) ).thenReturn( category1 );

        presenter.onTreeItemOpen( rootTreeItem );
        presenter.onTreeItemOpen( rootCategoryTreeItem );
        presenter.onTreeItemSelection( category1, "categoryName1" );
View Full Code Here

    public void testLoadThirdLevelCategory() throws Exception {
        categoryServiceAsyncMock.addCategorySelection( "/", "one", "two", "three" );
        categoryServiceAsyncMock.addCategorySelection( "/one", "t1", "t2" );
        categoryServiceAsyncMock.addCategorySelection( "/one/t2", "a", "b", "c", "d", "e", "f" );

        IsTreeItem oneTreeItem = mock( IsTreeItem.class );
        when( view.addTreeItem( rootCategoryTreeItem, "one" ) ).thenReturn( oneTreeItem );
        IsTreeItem t2TreeItem = mock( IsTreeItem.class );
        when( view.addTreeItem( oneTreeItem, "t2" ) ).thenReturn( t2TreeItem );

        setUpChildren( rootCategoryTreeItem, oneTreeItem );
        setUpChildren( oneTreeItem, t2TreeItem );
        setUpChildren( t2TreeItem );
View Full Code Here

        mortgageConfigData.setSubPackages( secondLevelDatas.toArray( new PackageConfigData[secondLevelDatas.size()] ) );
        firstLevelDatas.add( mortgageConfigData );

        packageConfigDatas = firstLevelDatas.toArray( new PackageConfigData[firstLevelDatas.size()] );

        IsTreeItem mortgagesRootTreeItem = mock( IsTreeItem.class );
        when(
                view.addModuleTreeSelectableItem( modulesTreeItem,
                                                  "mortgage" ) ).thenReturn(
                                                                             mortgagesRootTreeItem
                );

        IsTreeItem thirdLevelParentRootTreeItem = mock( IsTreeItem.class );
        when(
                view.addModuleTreeSelectableItem( mortgagesRootTreeItem,
                                                  "sub2" ) ).thenReturn(
                                                                         thirdLevelParentRootTreeItem
                );
View Full Code Here

        PackageConfigData mortgageConfigData = new PackageConfigData( moduleName );
        mortgageConfigData.setUuid( "defaultUuid" );
        firstLevelDatas.add( mortgageConfigData );
        packageConfigDatas = firstLevelDatas.toArray( new PackageConfigData[firstLevelDatas.size()] );

        IsTreeItem defaultRootTreeItem = mock( IsTreeItem.class );
        when(
                view.addModuleTreeItem( modulesTreeItem,
                                        "default" ) ).thenReturn(
                                                                  defaultRootTreeItem
                );
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.IsTreeItem

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.