Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Widget


    }

    @Override
    public void onConnectorHierarchyChange(
            ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
        Widget newFooterWidget = null;
        ComponentConnector footer = getFooter();

        if (footer != null) {
            newFooterWidget = footer.getWidget();
            Widget currentFooter = getWidget().footer;
            if (currentFooter != null) {
                // Remove old listener
                getLayoutManager().removeElementResizeListener(
                        currentFooter.getElement(), footerResizeListener);
            }
            getLayoutManager().addElementResizeListener(
                    newFooterWidget.getElement(), footerResizeListener);
        }
        getWidget().setFooterWidget(newFooterWidget);

        Widget newLayoutWidget = null;
        ComponentConnector newLayout = getLayout();
        if (newLayout != null) {
            newLayoutWidget = newLayout.getWidget();
        }
        getWidget().setLayoutWidget(newLayoutWidget);
View Full Code Here


public class BrowserWindowOpenerConnector extends AbstractExtensionConnector
        implements ClickHandler {

    @Override
    protected void extend(ServerConnector target) {
        final Widget targetWidget = ((ComponentConnector) target).getWidget();

        targetWidget.addDomHandler(this, ClickEvent.getType());
    }
View Full Code Here

    private IFrameElement iframe;

    @Override
    protected void extend(ServerConnector target) {
        final Widget downloadWidget = ((ComponentConnector) target).getWidget();

        downloadWidget.addDomHandler(this, ClickEvent.getType());
    }
View Full Code Here

        if (index < getWidgetCount()) {
            StackItem stackItem = getStackItem(index);
            if (stackItem == null) {
                return null;
            }
            Widget w = stackItem.getChildWidget();
            if (w != null) {
                return getConnectorForWidget(w);
            }
        }
View Full Code Here

        public void setVisible(boolean visible) {
            super.setVisible(visible);
        }

        public void setHeightFromWidget() {
            Widget widget = getChildWidget();
            if (widget == null) {
                return;
            }

            int paintableHeight = widget.getElement().getOffsetHeight();
            setHeight(paintableHeight);

        }
View Full Code Here

            }
        }

        public void replaceWidget(Widget newWidget) {
            if (getWidgetCount() > 1) {
                Widget oldWidget = getWidget(1);
                remove(oldWidget);
                widgets.remove(oldWidget);
            }
            add(newWidget, content);
            widgets.add(newWidget);
View Full Code Here

     *            Color of highlight
     * @return Highlight element
     */
    static Element show(ComponentConnector connector, String color) {
        if (connector != null) {
            Widget w = connector.getWidget();
            return show(w, color);
        }
        return null;
    }
View Full Code Here

    private void findZeroSizeComponents(
            Set<ComponentConnector> zeroHeightComponents,
            Set<ComponentConnector> zeroWidthComponents,
            ComponentConnector connector) {
        Widget widget = connector.getWidget();
        ComputedStyle computedStyle = new ComputedStyle(widget.getElement());
        if (computedStyle.getIntProperty("height") == 0) {
            zeroHeightComponents.add(connector);
        }
        if (computedStyle.getIntProperty("width") == 0) {
            zeroWidthComponents.add(connector);
View Full Code Here

            }

        }

        private TreeNode getParentNode() {
            Widget parent2 = getParent().getParent();
            if (parent2 instanceof TreeNode) {
                return (TreeNode) parent2;
            }
            return null;
        }
View Full Code Here

                    slot.getWrapperElement().getStyle().setWidth(100, Unit.PCT);
                }
                Element slotWrapper = slot.getWrapperElement();
                getElement().appendChild(slotWrapper);

                Widget widget = component.getWidget();
                insert(widget, slotWrapper, getWidgetCount(), false);
                Cell oldCell = widgetToCell.put(widget, this);
                if (oldCell != null) {
                    oldCell.slot.getWrapperElement().removeFromParent();
                    oldCell.slot = null;
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Widget

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.