Thanks for all your reply.

I'v find a perfect solution, here they are, hope this would help other
peoples:

public class OrderedList extends ComplexPanel {
        public OrderedList() {
                setElement(DOM.createElement("OL"));
        }

        public void add(Widget w) {
                super.add(w, getElement());
        }

        public void insert(Widget w, int beforeIndex) {
                super.insert(w, getElement(), beforeIndex, true);
        }

}

public class ListItem extends ComplexPanel implements HasText {
        public ListItem() {
                setElement(DOM.createElement("LI"));
        }

        public void add(Widget w) {
                super.add(w, getElement());
        }

        public void insert(Widget w, int beforeIndex) {
                super.insert(w, getElement(), beforeIndex, true);
        }

        public String getText() {
                return DOM.getInnerText(getElement());
        }

        public void setText(String text) {
                DOM.setInnerText(getElement(), (text == null) ? "" : text);
        }

}

On 1月16日, 下午7时31分, luisfpg <lfpg....@gmail.com> wrote:
> Create a class like this:
>
> public class ULPanel extends ComplexPanel {
>
>     private UListElement list;
>
>     public BulletPanel() {
>         list = Document.get().createULElement();
>         setElement(list);
>     }
>
>     @Override
>     public void add(Widget child) {
>         Element li = Document.get().createLIElement().cast();
>         list.appendChild(li);
>         super.add(child, li);
>     }
>
>
>
> }- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to