Examples of VCaptionWrapper


Examples of com.vaadin.client.VCaptionWrapper

    public void updateCaption(ComponentConnector component) {
        if (VCaption.isNeeded(component.getState())) {
            if (getWidget().popup.captionWrapper != null) {
                getWidget().popup.captionWrapper.updateCaption();
            } else {
                getWidget().popup.captionWrapper = new VCaptionWrapper(
                        component, getConnection());
                getWidget().popup.setWidget(getWidget().popup.captionWrapper);
                getWidget().popup.captionWrapper.updateCaption();
            }
        } else {
View Full Code Here

Examples of com.vaadin.client.VCaptionWrapper

    }

    /** Update caption for given widget */
    public void updateCaption(ComponentConnector paintable) {
        Widget widget = paintable.getWidget();
        VCaptionWrapper wrapper = childWidgetToCaptionWrapper.get(widget);
        if (VCaption.isNeeded(paintable.getState())) {
            if (wrapper == null) {
                // Add a wrapper between the layout and the child widget
                final String loc = getLocation(widget);
                super.remove(widget);
                wrapper = new VCaptionWrapper(paintable, client);
                super.add(wrapper, locationToElement.get(loc));
                childWidgetToCaptionWrapper.put(widget, wrapper);
            }
            wrapper.updateCaption();
        } else {
            if (wrapper != null) {
                // Remove the wrapper and add the widget directly to the layout
                final String loc = getLocation(widget);
                super.remove(wrapper);
View Full Code Here

Examples of com.vaadin.client.VCaptionWrapper

    public boolean remove(Widget w) {
        final String location = getLocation(w);
        if (location != null) {
            locationToWidget.remove(location);
        }
        final VCaptionWrapper cw = childWidgetToCaptionWrapper.get(w);
        if (cw != null) {
            childWidgetToCaptionWrapper.remove(w);
            return super.remove(cw);
        } else if (w != null) {
            return super.remove(w);
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

        return locationToWidget.containsValue(component);
    }

    /** Update caption for given widget */
    public void updateCaption(Paintable component, UIDL uidl) {
        VCaptionWrapper wrapper = widgetToCaptionWrapper.get(component);
        if (VCaption.isNeeded(uidl)) {
            if (wrapper == null) {
                final String loc = getLocation((Widget) component);
                super.remove((Widget) component);
                wrapper = new VCaptionWrapper(component, client);
                super.add(wrapper, locationToElement.get(loc));
                widgetToCaptionWrapper.put(component, wrapper);
            }
            wrapper.updateCaption(uidl);
        } else {
            if (wrapper != null) {
                final String loc = getLocation((Widget) component);
                super.remove(wrapper);
                super.add((Widget) wrapper.getPaintable(),
                        locationToElement.get(loc));
                widgetToCaptionWrapper.remove(component);
            }
        }
    }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

        client.unregisterPaintable((Paintable) w);
        final String location = getLocation(w);
        if (location != null) {
            locationToWidget.remove(location);
        }
        final VCaptionWrapper cw = widgetToCaptionWrapper.get(w);
        if (cw != null) {
            widgetToCaptionWrapper.remove(w);
            return super.remove(cw);
        } else if (w != null) {
            return super.remove(w);
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

        return locationToWidget.containsValue(component);
    }

    /** Update caption for given widget */
    public void updateCaption(Paintable component, UIDL uidl) {
        VCaptionWrapper wrapper = (VCaptionWrapper) widgetToCaptionWrapper
                .get(component);
        if (VCaption.isNeeded(uidl)) {
            if (wrapper == null) {
                final String loc = getLocation((Widget) component);
                super.remove((Widget) component);
                wrapper = new VCaptionWrapper(component, client);
                super.add(wrapper, (Element) locationToElement.get(loc));
                widgetToCaptionWrapper.put(component, wrapper);
            }
            wrapper.updateCaption(uidl);
        } else {
            if (wrapper != null) {
                final String loc = getLocation((Widget) component);
                super.remove(wrapper);
                super.add((Widget) wrapper.getPaintable(),
                        (Element) locationToElement.get(loc));
                widgetToCaptionWrapper.remove(component);
            }
        }
    }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

        client.unregisterPaintable((Paintable) w);
        final String location = getLocation(w);
        if (location != null) {
            locationToWidget.remove(location);
        }
        final VCaptionWrapper cw = (VCaptionWrapper) widgetToCaptionWrapper
                .get(w);
        if (cw != null) {
            widgetToCaptionWrapper.remove(w);
            return super.remove(cw);
        } else if (w != null) {
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

        return locationToWidget.containsValue(component);
    }

    /** Update caption for given widget */
    public void updateCaption(Paintable component, UIDL uidl) {
        VCaptionWrapper wrapper = widgetToCaptionWrapper.get(component);
        if (VCaption.isNeeded(uidl)) {
            if (wrapper == null) {
                final String loc = getLocation((Widget) component);
                super.remove((Widget) component);
                wrapper = new VCaptionWrapper(component, client);
                super.add(wrapper, locationToElement.get(loc));
                widgetToCaptionWrapper.put(component, wrapper);
            }
            wrapper.updateCaption(uidl);
        } else {
            if (wrapper != null) {
                final String loc = getLocation((Widget) component);
                super.remove(wrapper);
                super.add((Widget) wrapper.getPaintable(),
                        locationToElement.get(loc));
                widgetToCaptionWrapper.remove(component);
            }
        }
    }
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

        client.unregisterPaintable((Paintable) w);
        final String location = getLocation(w);
        if (location != null) {
            locationToWidget.remove(location);
        }
        final VCaptionWrapper cw = widgetToCaptionWrapper.get(w);
        if (cw != null) {
            widgetToCaptionWrapper.remove(w);
            return super.remove(cw);
        } else if (w != null) {
            return super.remove(w);
View Full Code Here

Examples of com.vaadin.terminal.gwt.client.VCaptionWrapper

    public void updateCaption(Paintable component, UIDL uidl) {
        if (VCaption.isNeeded(uidl)) {
            if (popup.captionWrapper != null) {
                popup.captionWrapper.updateCaption(uidl);
            } else {
                popup.captionWrapper = new VCaptionWrapper(component, client);
                popup.setWidget(popup.captionWrapper);
                popup.captionWrapper.updateCaption(uidl);
            }
        } else {
            if (popup.captionWrapper != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.