Package com.github.gwtbootstrap.client.ui

Examples of com.github.gwtbootstrap.client.ui.NavLink


        Pagination pagination = new Pagination();
        pagination.setSize(Pagination.PaginationSize.NORMAL);
        pagination.setAlignment(Bootstrap.Pagination.LEFT.toString());

        for (int i = getLeftMostPageNumber(); i <= getRightMostPageNumber(); i++) {
            NavLink pageLink = new NavLink(Integer.toString(i));
            final Integer _currentPage = Integer.valueOf(i);
            if (currentPage != i) {
                pageLink.setActive(false);
                pageLink.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        gotoPage(_currentPage.intValue());
                    }
                });
            } else {
                pageLink.setActive(true);
            }
            pagination.add(pageLink);
        }

        Icon leftPageIcon = new Icon(IconType.ANGLE_LEFT);
View Full Code Here


        container.add( new NavigatorBreadcrumbs( NavigatorBreadcrumbs.Mode.HEADER ) {{

            final Dropdown groups = new Dropdown( "financial" ) {{
                add( new NavList() {{
                    add( new NavLink( "financial" ) );
                    add( new NavLink( "demo" ) );
                }} );
            }};

            final Dropdown repos = new Dropdown( "uf-playground" ) {{
                add( new NavList() {{
                    add( new NavLink( "uf-playground" ) );
                }} );
            }};

            final Dropdown projects = new Dropdown( "mortgages" ) {{
                add( new NavList() {{
                    add( new NavLink( "mortgages" ) );
                }} );
            }};

            build( groups, repos, projects );
        }} );
View Full Code Here

        build( headers );

        if ( path != null && !path.isEmpty() ) {
            for ( final Path activePath : path ) {
                breadcrumbs.add( new NavLink( activePath.getFileName() ) {{
                    setStyleName( NavigatorResources.INSTANCE.css().directory() );
                    addClickHandler( new ClickHandler() {
                        @Override
                        public void onClick( ClickEvent event ) {
                            onPathClick.execute( activePath );
View Full Code Here

            if ( onPathClick == null ) {
                breadcrumbs.add( new ListItem( new InlineLabel( repoName ) ) {{
                    setStyleName( NavigatorResources.INSTANCE.css().repoName() );
                }} );
            } else {
                breadcrumbs.add( new NavLink( repoName ) {{
                    setStyleName( NavigatorResources.INSTANCE.css().repoName() );
                    addClickHandler( new ClickHandler() {
                        @Override
                        public void onClick( ClickEvent event ) {
                            onPathClick.execute( root );
                        }
                    } );
                }} );
            }
        } else if ( root != null ) {
            if ( onPathClick == null ) {
                breadcrumbs.add( new ListItem( new InlineLabel( file.getFileName() ) ) {{
                    setStyleName( NavigatorResources.INSTANCE.css().repoName() );
                }} );
            } else {
                breadcrumbs.add( new NavLink( root.getFileName() ) {{
                    setStyleName( NavigatorResources.INSTANCE.css().repoName() );
                    addClickHandler( new ClickHandler() {
                        @Override
                        public void onClick( ClickEvent event ) {
                            onPathClick.execute( root );
                        }
                    } );
                }} );
            }
        }

        if ( path != null && !path.isEmpty() ) {
            if ( onPathClick == null ) {
                for ( final Path activePath : path ) {
                    breadcrumbs.add( new ListItem( new InlineLabel( activePath.getFileName() ) {{
                        setStyleName( NavigatorResources.INSTANCE.css().directory() );
                    }} ) );
                }
            } else {
                for ( final Path activePath : path ) {
                    breadcrumbs.add( new NavLink( activePath.getFileName() ) {{
                        setStyleName( NavigatorResources.INSTANCE.css().directory() );
                        addClickHandler( new ClickHandler() {
                            @Override
                            public void onClick( ClickEvent event ) {
                                onPathClick.execute( activePath );
View Full Code Here

    Widget makeMenuItemCommand( final MenuItem item ) {
        final MenuItemCommand cmdItem = (MenuItemCommand) item;
        final Widget gwtItem;

        gwtItem = new NavLink( cmdItem.getCaption() ) {{
            setDisabled( !item.isEnabled() );
            addClickHandler( new ClickHandler() {
                @Override
                public void onClick( final ClickEvent event ) {
                    cmdItem.getCommand().execute();
View Full Code Here

        }
        return makeNavLink( item );
    }

    Widget makeNavLink( final MenuItem item ) {
        final NavLink gwtItem = new NavLink( item.getCaption() ) {{
            setDisabled( !item.isEnabled() );
        }};
        item.addEnabledStateChangeListener( new EnabledStateChangeListener() {
            @Override
            public void enabledStateChanged( final boolean enabled ) {
                gwtItem.setDisabled( !enabled );
            }
        } );

        return gwtItem;
    }
View Full Code Here

    Widget makeMenuItemCommand( final MenuItem item ) {
        final MenuItemCommand cmdItem = (MenuItemCommand) item;
        final Widget gwtItem;

        gwtItem = new NavLink( cmdItem.getCaption() ) {{
            setDisabled( !item.isEnabled() );
            addClickHandler( new ClickHandler() {
                @Override
                public void onClick( final ClickEvent event ) {
                    cmdItem.getCommand().execute();
View Full Code Here

    Widget makeMenuItemCommand( final MenuItem item ) {
        final MenuItemCommand cmdItem = (MenuItemCommand) item;
        final Widget gwtItem;

        gwtItem = new NavLink( cmdItem.getCaption() ) {{
            setDisabled( !item.isEnabled() );
            addClickHandler( new ClickHandler() {
                @Override
                public void onClick( final ClickEvent event ) {
                    cmdItem.getCommand().execute();
View Full Code Here

                                    {
                                        displayCaret( false );
                                        setRightDropdown( true );
                                        setIcon( IconType.COG );
                                        setSize( MINI );
                                        add( new NavLink( "Business view" ) {{
                                            setIconSize( IconSize.SMALL );
                                        }} );
                                        add( new NavLink( "Tech view" ) {{
                                            setIcon( IconType.ASTERISK );
                                            setIconSize( IconSize.SMALL );
                                        }} );
                                        add( new Divider() );
                                        add( new NavLink( "Breadbrumb Explorer" ) {{
                                            setIcon( IconType.OK );
                                            setIconSize( IconSize.SMALL );
                                        }} );
                                        add( new NavLink( "Tree explorer" ) {{
                                        }} );
                                        add( new Divider() );
                                        add( new NavLink( "Flatten folders" ) {{
                                        }} );
                                        add( new NavLink( "Compact empty folders" ) {{
                                        }} );
                                        add( new NavLink( "Display hidden files" ) {{
                                        }} );
                                    }
                                };
                            }
View Full Code Here

    }

    void onNewSplash( @Observes NewSplashScreenActiveEvent event ) {
        content.clear();
        for ( final SplashScreenActivity active : placeManager.getActiveSplashScreens() ) {
            content.add( new NavLink( active.getTitle() ) {{
                addClickHandler( new ClickHandler() {
                    @Override
                    public void onClick( ClickEvent event ) {
                        active.forceShow();
                    }
                } );
            }} );
        }
        if ( content.getMenuWiget().getWidgetCount() == 0 ) {
            content.add( new NavLink( "-- none --" ) {{
                setDisabled( true );
            }} );
        }
    }
View Full Code Here

TOP

Related Classes of com.github.gwtbootstrap.client.ui.NavLink

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.