Package org.apache.ecs.html

Examples of org.apache.ecs.html.LI


        // Header table
        // ------------

        UL headerList = new UL();
        for(int i = 0; i < texts.length; i++) {
            LI listItem = new LI();
            listItem.setNeedClosingTag(true);
            if(i == up)
                listItem.setID("current");

            Span headerSpan = new Span();

            String link = links != null && links[i] != null ? links[i] : null;
            String text = texts[i] != null ? texts[i] : "";
            text = text.trim();

            if(link == null){
                link = "#";               
            } else if(link.length() == 0){
              link = "#";
              listItem.setID("dummy");
            }
           
            if(parameters != null) {
                link += parameters;
            }
            A anchor = new A(link.trim(), text);
            anchor.setOnMouseOver("window.status='" + text + "'; return true");
            anchor.setOnMouseOut("window.status=''; return true");
            headerSpan.addElement(anchor);

            headerList.addElement(listItem.addElement(headerSpan));
        }

        Table headerTable = new Table()
            .setWidth(width)
            .setBorder(0)
View Full Code Here


            ElementContainer newContent = new ElementContainer().addElement(new BR());
           
            if(errors != null && errors.size() > 0) {
                UL errorList = new UL();
                for(Iterator it=errors.iterator(); it.hasNext();) {
                    errorList.addElement(new LI( (String) it.next() ));
                }
                Div errorDiv = new Div().addElement(errorList);
                errorDiv.setID(errorCssId);
               
                newContent.addElement(errorDiv);
            }
            if(notices != null && notices.size() > 0) {
                UL noticeList = new UL();
                for(Iterator it=notices.iterator(); it.hasNext();) {
                    noticeList.addElement(new LI( (String) it.next() ));
                }
                Div noticeDiv = new Div().addElement(noticeList);
                noticeDiv.setID(noticeCssId);
               
                newContent.addElement(noticeDiv);
View Full Code Here

            /* It can happen that url is no longer in list while
               we are processing */
            if( info != null ) {
                uri.removeQueryData( RETRY_URL );
                uri.addQueryData(RETRY_URL, info.getURL());
                ul.addElement( new LI()
                    .addElement( new A(uri.toString() )
                        .addElement( info.getURL() ) )
                    .addElement( new B( info.getMessage() ) ) );
            }
        }
       
        root.addElement( ul );

        java.util.Hashtable rt = URLFetcher.getRealtimeURLs();

        root.addElement( "The following " +
                         rt.size() +
                         " URL(s) are being loaded: " );

        root.addElement( new BR() );
        ul = new UL();
       
        java.util.Enumeration en = rt.keys();
        while (en.hasMoreElements()) {
            String key = (String)en.nextElement();
            LI li = new LI().addElement( key )
                .addElement( " - by " );
            if (rt.get(key) != null )
                li.addElement( String.valueOf(((Vector)rt.get(key)).size()) )
                    .addElement( " threads." );
            ul.addElement( li );
        }
       
        root.addElement( ul );
View Full Code Here

            /* It can happen that url is no longer in list while
               we are processing */
            if( info != null ) {
                uri.removeQueryData( RETRY_URL );
                uri.addQueryData(RETRY_URL, info.getURL());
                ul.addElement( new LI()
                    .addElement( new A(uri.toString() )
                        .addElement( info.getURL() ) )
                    .addElement( new B( info.getMessage() ) ) );
            }
        }
       
        root.addElement( ul );

        java.util.Hashtable rt = URLFetcher.getRealtimeURLs();

        root.addElement( "The following " +
                         rt.size() +
                         " URL(s) are being loaded: " );

        root.addElement( new BR() );
        ul = new UL();
       
        java.util.Enumeration en = rt.keys();
        while (en.hasMoreElements()) {
            String key = (String)en.nextElement();
            LI li = new LI().addElement( key )
                .addElement( " - by " );
            if (rt.get(key) != null )
                li.addElement( String.valueOf(((Vector)rt.get(key)).size()) )
                    .addElement( " threads." );
            ul.addElement( li );
        }
       
        root.addElement( ul );
View Full Code Here

TOP

Related Classes of org.apache.ecs.html.LI

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.