Package com.dodo.blog.ui.component.container

Examples of com.dodo.blog.ui.component.container.Panel


            asideItemLink.setStyle( MessageFormat.format( "font-size:{0}px;", randomSize ) );
            return asideItemLink;
        }
        else
        {
            Panel asideItem = new Panel();
            asideItem.setClassName( "aside-item" );
            add( asideItem );

            Panel asideItemStar = new Panel();
            asideItemStar.setClassName( "aside-item-star" );
            asideItem.add( asideItemStar );

            Anchor asideItemLink = new Anchor( "", title, url );
            asideItemLink.setClassName( "aside-item-link" );
            asideItem.add( asideItemLink );
View Full Code Here


        else
        {
            err = throwable.toString();
        }

        Panel stackWrapper = new Panel();
        stackWrapper.setAttribute( "style", "border: 1px solid #a00;margin: 0;padding: 10px;" );
        body.add( stackWrapper );

        H2 cause = new H2( err );
        cause.setAttribute( "style", "color: #a00; 10px;border-bottom: 1px solid #a00;font-weight: bold;" );
        stackWrapper.add( cause );

        StringWriter sw = new StringWriter();
        throwable.printStackTrace( new PrintWriter( sw ) );

        Paragraph stack = new Paragraph( sw.toString().replace( "\n", "<br/>" ).replace( "\t", "<span>&nbsp;&nbsp;&nbsp;<span>" ) );
        stack.setAttribute( "style", "margin: 0; padding: 0;color: #555;" );
        stackWrapper.add( stack );
    }
View Full Code Here

    public FooterContentPanel( Class<? extends Page>... pages )
    {
        setClassName( "footer-content" );

        // menu panel
        Panel menuWrapper = new Panel();
        add( menuWrapper );
        int s = 0;
        for ( Class<? extends Page> page : pages )
        {
            if ( s > 0 )
            {
                menuWrapper.add( getSeparator() );
            }
            menuWrapper.add( new Anchor( localize( "menu." + page.getSimpleName().toLowerCase() ), page ) );
            s++;
        }

        // archive panel
        Panel archiveWrapper = new Panel();
        add( archiveWrapper );
        Calendar calendar = Calendar.getInstance();
        s = 0;
        for ( int i = 0; i < 5; i++ )
        {
            if ( s > 0 )
            {
                archiveWrapper.add( getSeparator() );
            }
            calendar.set( Calendar.MONTH, calendar.get( Calendar.MONTH ) - 1 );
            archiveWrapper.add( new Anchor(
                    "",
                    FormatUtil.formatDate( calendar.getTime(), FormatUtil.DATE_FORMAT_MONTH_YEAR ),
                    UriConstructor.createDateUri( Integer.valueOf( calendar.get( Calendar.YEAR ) ).toString(), Integer.valueOf( calendar.get( Calendar.MONTH ) + 1 ).toString(), null )
            ) );
            s++;
        }

        // contact panel
        Panel contactWrapper = new Panel();
        add( contactWrapper );
        contactWrapper.add( new Anchor( "", localize( "contact.label.gmail" ), localize( "contact.href.gmail" ) ) );
        contactWrapper.add( getSeparator() );
        contactWrapper.add( new Anchor( "", localize( "contact.label.linkedin" ), localize( "contact.href.linkedin" ) ) );
        contactWrapper.add( getSeparator() );
        contactWrapper.add( new Anchor( "", localize( "contact.label.facebook" ), localize( "contact.href.facebook" ) ) );

        // copyright
        Span copyright = new Span( localize( "label.copyright", WebApplication.get().getPathByPageClass( About.class ) ) );
        copyright.setClassName( "copyright" );
        add( copyright );
View Full Code Here

    {
        super( Tag.FIELDSET );

        if ( label != null )
        {
            Panel legend = new Panel();
            legend.setClassName( "legend" );
            legend.add( label );
            add( legend );
        }
    }
View Full Code Here

{
    public AsideContentPanel()
    {
        setClassName( "aside-content" );

        Panel asideLeft = new Panel();
        asideLeft.setClassName( "aside-left" );
        add( asideLeft );

        Panel asideRight = new Panel();
        asideRight.setClassName( "aside-right" );
        add( asideRight );

        asideLeft.add( new AsidePanel( AsidePanel.Type.MOST_VIEWED ) );
        asideLeft.add( new AsidePanel( AsidePanel.Type.BEST_RATED ) );
        asideLeft.add( new AsidePanel( AsidePanel.Type.RECENT_POSTS ) );
        asideRight.add( new AsidePanel( AsidePanel.Type.CATEGORIES ) );
        asideRight.add( new AsidePanel( AsidePanel.Type.TAGS ) );
    }
View Full Code Here

        // body
        add( body );
        body.add( header );

        Panel headerContent = new Panel();
        headerContent.setClassName( "header-content" );
        header.add( headerContent );

        headerContent.add( new UserInfoPanel() );
        headerContent.add( new Clearer() );
        headerContent.add( nav );
        headerContent.add( new Clearer() );
        headerContent.add( h1 );

        Panel navPhantom = new Panel();
        navPhantom.setClassName( "aside-phantom" );
        headerContent.add( navPhantom );

        Panel content = new Panel();
        content.setClassName( "content" );
        content.add( section );

        aside.add( asideContent );
        content.add( aside );

        body.add( content );

        footer.add( footerContent );
        body.add( footer );
View Full Code Here

                gap = 0;
            }

            component.setStyle( MessageFormat.format( "margin-right:{0}{1};", gap, unit.getValue() ) );

            Panel column = new Panel();
            column.setClassName( "multi-column-item" );
            column.setStyle( MessageFormat.format( "float:left;width:{0}{1};", width, unit.getValue() ) );
            column.add( component );
            add( column );
            i++;
        }
    }
View Full Code Here

    public AsidePanel( Type type )
    {
        setClassName( "aside-panel" );

        Panel titleWrapper = new Panel();
        titleWrapper.setClassName( "aside-panel-title-wrapper" );
        add( titleWrapper );

        Panel titlePanel = new Panel();
        titlePanel.setClassName( "aside-panel-title" );
        titlePanel.addClassName( type.getClassName() );
        titlePanel.setInnerHtml( Localization.localize( "title." + type.getLabel() ) );
        titleWrapper.add( titlePanel );

        Panel triangle = new Panel();
        triangle.setClassName( "aside-panel-triangle" );
        titleWrapper.add( triangle );

        switch ( type )
        {
            case MOST_VIEWED:
View Full Code Here

        {
            RequestCycle.get().addMessage( new FeedbackMessage( message, level ) );
        }
        else
        {
            Panel feedback = new Panel();
            feedback.add( message );
            feedback.setClassName( "feedback-box" );
            feedback.addClassName( "feedback-box-" + level.name().toLowerCase() );

            layout.getSection().prepend( feedback );
        }
    }
View Full Code Here

    private void renderTags()
    {
        BasicRequest request = new BasicRequest();
        request.addSort( "name", OrderDirection.ASC );

        Panel asideItem = new Panel();
        asideItem.setClassName( "aside-item-tag" );
        add( asideItem );

        int i = 0;
        for ( com.dodo.blog.model.Tag tag : tagService.getTagList( request ) )
        {
            Anchor anchor = renderAsideItem( tag.getLabel(), UriConstructor.createTagUri( tag ), randomFontSizes[i] );
            asideItem.add( anchor );
            i++;
            if ( i >= randomFontSizes.length )
            {
                i = 0;
            }
View Full Code Here

TOP

Related Classes of com.dodo.blog.ui.component.container.Panel

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.