///**** I don't like to re-post, but here's the complete code of what
I'm trying to to *****///

public class AnchorsPanel extends Composite {

    private FlowPanel fpLinks;
    private VerticalPanel verticalPanel;

    public AnchorsPanel() {
        verticalPanel = new VerticalPanel();
        verticalPanel.setStylePrimaryName("caronte-VerticalTabPanel-
VPanel");
        fpLinks = new FlowPanel();
        verticalPanel.add(fpLink);
        this.initWidget(verticalPanel);
    }

        // ADD A WIDGET
    public void addTab(String name, String refName, Widget widget) {
        HTMLLinkSource sourceLink = new HTMLLinkSource(name,refName);
        HTMLLinkTarget targetLink = new HTMLLinkTarget(name,refName);
        fpLinks.add(sourceLink);
        verticalPanel.add(targetLink);
        verticalPanel.add(widget);
    }



        // CLASS FOR LINK
    public class HTMLLinkSource extends Widget {

        public HTMLLinkSource(String text, String anchorName) {
            Element element = DOM.createAnchor();
            setElement(element);
            DOM.setElementAttribute(element, "href", anchorName ==
null ? "" : "#" + anchorName);
            DOM.setInnerText(element, text == null ? "" : text);
        }

    }

        // CLASS FOR TARGET
    public class HTMLLinkTarget extends Widget {

        public HTMLLinkkDestino(String text, String anchorName) {
            Element element = DOM.createAnchor();
            setElement(element);
            DOM.setElementAttribute(element, "name", anchorName ==
null ? "" : anchorName);
            DOM.setInnerText(element, text == null ? "" : text);
        }

    }
}

--~--~---------~--~----~------------~-------~--~----~
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