Package com.dodo.blog.ui.component.input

Examples of com.dodo.blog.ui.component.input.Anchor


        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


    private Anchor renderAsideItem( String title, String url, String randomSize )
    {
        if ( randomSize != null )
        {
            Anchor asideItemLink = new Anchor( "", title, url );
            asideItemLink.setClassName( "aside-item-link" );
            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 );
        }

        return null;
    }
View Full Code Here

        {
            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

        WebApplication webApplication = WebApplication.get();
        Account account = webApplication.getLoggedInAccount();
        if ( account != null )
        {
            Anchor link = new Anchor( account.getUserInfo(), MyAccount.class );
            add( link );
        }
        else
        {
            add( new Span( localize(
View Full Code Here

        add( menu );

        for ( Class<? extends Page> page : pages )
        {
            Li menuItem = new Li();
            Anchor link = new Anchor( localize( "menu." + page.getSimpleName().toLowerCase() ), page );
            menuItem.add( link );
            if ( WebApplication.get().getPageClassByPath( RequestCycle.get().getRequest().getServletPath() ) == page )
            {
                link.setClassName( "selected" );
            }

            menu.add( menuItem );
        }
View Full Code Here

TOP

Related Classes of com.dodo.blog.ui.component.input.Anchor

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.