Package com.github.gwtbootstrap.client.ui.base

Examples of com.github.gwtbootstrap.client.ui.base.ListItem


        if(!isOrWasAttached() && children.size() > 0) {
           
            Widget lastWidget = children.get(children.size() -1);
           
            for (Widget w : children) {
                ListItem item = lastWidget.equals(w)
                                ? change2TextListItem(w)
                                : getOrCreateListItem(w);
                super.add(item);
            }
        }
View Full Code Here


            //Change last widget 2 Link
           
            //pygical remove
            super.remove(getWidget(getWidgetCount() -1));
           
            ListItem item = getOrCreateListItem(children.get(children.size() -1));
           
            super.add(item);
        }
       
        ListItem newest = change2TextListItem(w);
       
        super.add(newest);
       
        children.add(w);
    }
View Full Code Here

       
        children.add(w);
    }

    private ListItem getOrCreateListItem(Widget lastWidget) {
        ListItem item = null;

        Divider dividerWidget = new Divider(divider);
        if(lastWidget instanceof NavWidget) {
            NavWidget w = (NavWidget)lastWidget;
           
            if(hasDivier(w)) {
               
                return w;
            } else {
                dividerList.add(dividerWidget);
                w.addWidget(dividerWidget);
                return w;
            }
        } else if(lastWidget instanceof ListItem) {
            item = (ListItem)lastWidget;
        } else {
            item = new ListItem(lastWidget);
        }
       
        if(hasDivier(item)) {
            return item;
        }
       
        item.add(dividerWidget);
        dividerList.add(dividerWidget);
       
        return item;
    }
View Full Code Here

            text = ((HasText) w).getText();
        } else {
            text = w.getElement().getInnerText();
        }

        ListItem newest = new ListItem();
        newest.setStyleName(Constants.ACTIVE);
        newest.getElement().appendChild(Document.get().createTextNode(text));
        return newest;
    }
View Full Code Here

                }} );
            }
        }

        if ( file != null && !file.equals( root ) ) {
            breadcrumbs.add( new ListItem( new InlineLabel( file.getFileName() ) ) {{
                setStyleName( NavigatorResources.INSTANCE.css().directory() );
            }} );
        }
    }
View Full Code Here

                       final Path file ) {
        breadcrumbs.clear();

        if ( repoName != null ) {
            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 );
                            }
                        } );
                    }} );
                }
            }
        }

        if ( file != null && !file.equals( root ) ) {
            breadcrumbs.add( new ListItem( new InlineLabel( file.getFileName() ) ) {{
                setStyleName( NavigatorResources.INSTANCE.css().directory() );
            }} );
        }

        if ( onAddClick != null ) {
View Full Code Here

TOP

Related Classes of com.github.gwtbootstrap.client.ui.base.ListItem

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.