Example usage for com.google.gwt.user.client.ui WidgetCollection WidgetCollection

List of usage examples for com.google.gwt.user.client.ui WidgetCollection WidgetCollection

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui WidgetCollection WidgetCollection.

Prototype

public WidgetCollection(HasWidgets parent) 

Source Link

Document

Constructs a new widget collection.

Usage

From source file:bufferings.ktr.wjr.client.ui.widget.WjrTabPanel.java

License:Apache License

/**
 * Constructs the WjrTabPanel.//from   www.j  av  a  2 s. co  m
 */
public WjrTabPanel() {
    initWidget(uiBinder.createAndBindUi(this));

    tabs = new ArrayList<Tab>();
    children = new WidgetCollection(panel);
}

From source file:com.ait.toolkit.sencha.touch.client.core.ComplexContainer.java

License:Open Source License

void doLogicalClear() {
    if (orphanCommand == null) {
        orphanCommand = new AttachDetachException.Command() {
            public void execute(Widget w) {
                orphan(w);//  w ww.j  a  va  2 s .  c  om
            }
        };
    }
    try {
        AttachDetachException.tryCommand(this, orphanCommand);
    } finally {
        children = new WidgetCollection(this);
    }
}

From source file:com.alkacon.geranium.client.ui.Popup.java

License:Open Source License

/**
 * Constructor setting the width of the dialog.<p>
 * /*  w  w  w.  j ava 2  s. c  o m*/
 * @param width the width to set
 */
public Popup(int width) {

    super(false, true);
    // super(autoHide, modal);

    m_containerElement = super.getContainerElement();
    setStyleName(I_LayoutBundle.INSTANCE.dialogCss().popup());
    m_containerElement.setClassName(I_LayoutBundle.INSTANCE.dialogCss().popupContent());
    setGlassStyleName(I_LayoutBundle.INSTANCE.dialogCss().popupOverlay());
    Element dragOverlay = DOM.createDiv();
    dragOverlay.setClassName(I_LayoutBundle.INSTANCE.dialogCss().dragOverlay());
    getElement().insertFirst(dragOverlay);

    m_caption = new Caption();
    m_caption.setStyleName(I_LayoutBundle.INSTANCE.dialogCss().caption());
    // Add the caption to the top of the popup-panel. We need to
    // logically adopt the caption so we can catch mouse events.
    DOM.appendChild(m_containerElement, m_caption.getElement());
    adopt(m_caption);
    m_children = new WidgetCollection(this);
    m_main = DOM.createDiv();
    m_main.addClassName(I_LayoutBundle.INSTANCE.dialogCss().popupMainContent());
    m_main.addClassName(I_LayoutBundle.INSTANCE.dialogCss().contentPadding());
    DOM.appendChild(m_containerElement, m_main);
    m_buttonPanel = new ButtonPanel();
    m_buttonPanel.setStyleName(I_LayoutBundle.INSTANCE.dialogCss().hideButtonPanel());
    // Add the caption to the top of the popup-panel. We need to
    // logically adopt the caption so we can catch mouse events.
    DOM.appendChild(m_containerElement, m_buttonPanel.getElement());
    adopt(m_buttonPanel);

    MouseHandler mouseHandler = new MouseHandler();
    addDomHandler(mouseHandler, MouseDownEvent.getType());
    addDomHandler(mouseHandler, MouseUpEvent.getType());
    addDomHandler(mouseHandler, MouseMoveEvent.getType());

    setWidth(width);
    getElement().addClassName(I_LayoutBundle.INSTANCE.dialogCss().hideCaption());
}

From source file:com.alkacon.geranium.client.ui.Popup.java

License:Open Source License

/**
 * @see com.google.gwt.user.client.ui.Panel#clear()
 *///from w  w  w  . ja  va  2 s. c o m
@Override
public void clear() {

    for (Widget w : this) {
        // Orphan.
        try {
            orphan(w);
        } finally {
            // Physical detach.
            Element elem = w.getElement();
            DOM.removeChild(DOM.getParent(elem), elem);
        }
    }
    m_children = new WidgetCollection(this);
}

From source file:com.github.gwtbootstrap.client.ui.Breadcrumbs.java

License:Apache License

/**
 * {@inheritDoc}/*  w w  w  .java  2s.co  m*/
 */
@Override
public void clear() {
    super.clear();
    children = new WidgetCollection(this);
    dividerList.clear();
}

From source file:org.kaaproject.avro.ui.gwt.client.widget.nav.Breadcrumbs.java

License:Apache License

@Override
public void clear() {
    super.clear();
    children = new WidgetCollection(this);
    dividerList.clear();
}

From source file:org.opencms.gwt.client.ui.CmsPopup.java

License:Open Source License

/**
 * Constructor setting the width of the dialog.<p>
 * /*from w w w.  j  a va  2s  .c  o  m*/
 * @param width the width to set
 */
public CmsPopup(int width) {

    super(false, true);
    // super(autoHide, modal);

    m_containerElement = super.getContainerElement();
    setStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().popup());
    m_containerElement.setClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().popupContent());
    setGlassStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().popupOverlay());
    Element dragOverlay = DOM.createDiv();
    dragOverlay.setClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().dragOverlay());
    getElement().insertFirst(dragOverlay);

    m_caption = new Caption();
    m_caption.setStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().caption());
    // Add the caption to the top of the popup-panel. We need to
    // logically adopt the caption so we can catch mouse events.
    DOM.appendChild(m_containerElement, m_caption.getElement());
    adopt(m_caption);
    m_children = new WidgetCollection(this);
    m_main = DOM.createDiv();
    m_main.addClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().popupMainContent());
    m_main.addClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().contentPadding());
    DOM.appendChild(m_containerElement, m_main);
    m_buttonPanel = new ButtonPanel();
    m_buttonPanel.setStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().hideButtonPanel());
    // Add the caption to the top of the popup-panel. We need to
    // logically adopt the caption so we can catch mouse events.
    DOM.appendChild(m_containerElement, m_buttonPanel.getElement());
    adopt(m_buttonPanel);

    MouseHandler mouseHandler = new MouseHandler();
    addDomHandler(mouseHandler, MouseDownEvent.getType());
    addDomHandler(mouseHandler, MouseUpEvent.getType());
    addDomHandler(mouseHandler, MouseMoveEvent.getType());

    setWidth(width);
    getElement().addClassName(I_CmsLayoutBundle.INSTANCE.dialogCss().hideCaption());
}

From source file:rocket.widget.client.Panel.java

License:Apache License

protected WidgetCollection createWidgetCollection() {
    return new WidgetCollection(this);
}

From source file:ru.fly.client.ui.Container.java

License:Apache License

public Container(Element el) {
    super(el);
    widgets = new WidgetCollection(this);
}