Examples of VCaption


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

                    .hasNext();) {
                final UIDL r = (UIDL) i.next();
                final Paintable child = client.getPaintable(r);
                if (oldWidgets.contains(child)) {
                    oldWidgets.remove(child);
                    VCaption vCaption = widgetToCaption.get(child);
                    if (vCaption != null) {
                        add(vCaption);
                        oldWidgets.remove(vCaption);
                    }
                }
View Full Code Here

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

            return component.getParent() == this;
        }

        public void replaceChildComponent(Widget oldComponent,
                Widget newComponent) {
            VCaption caption = widgetToCaption.get(oldComponent);
            if (caption != null) {
                remove(caption);
                widgetToCaption.remove(oldComponent);
            }
            int index = getWidgetIndex(oldComponent);
View Full Code Here

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

                insert(newComponent, index);
            }
        }

        public void updateCaption(Paintable component, UIDL uidl) {
            VCaption caption = widgetToCaption.get(component);
            if (VCaption.isNeeded(uidl)) {
                Widget widget = (Widget) component;
                if (caption == null) {
                    caption = new VCaption(component, client);
                    widgetToCaption.put(widget, caption);
                    insert(caption, getWidgetIndex(widget));
                } else if (!caption.isAttached()) {
                    insert(caption, getWidgetIndex(widget));
                }
                caption.updateCaption(uidl);
            } else if (caption != null) {
                remove(caption);
                widgetToCaption.remove(component);
            }
        }
View Full Code Here

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

        private Element content = DOM.createDiv();
        private Element captionNode = DOM.createDiv();

        public StackItem(UIDL tabUidl) {
            setElement(DOM.createDiv());
            caption = new VCaption(null, client);
            caption.addClickHandler(this);
            if (BrowserInfo.get().isIE6()) {
                DOM.setEventListener(captionNode, this);
                DOM.sinkEvents(captionNode, Event.BUTTON_LEFT);
            }
View Full Code Here

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

    public void updateCaption(UIDL uidl, ApplicationConnection client) {
        if (VCaption.isNeeded(uidl)) {
            // We need a caption

            VCaption newCaption = caption;

            if (newCaption == null) {
                newCaption = new VCaption((Paintable) widget, client);
                // Set initial height to avoid Safari flicker
                newCaption.setHeight("18px");
                // newCaption.setHeight(newCaption.getHeight()); // This might
                // be better... ??
                if (BrowserInfo.get().isIE()) {
                    /*
                     * Must attach caption here so IE sends an immediate onload
                     * event for images coming from the cache
                     */
                    setCaption(newCaption);
                }
            }

            boolean positionChanged = newCaption.updateCaption(uidl);

            if (newCaption != caption || positionChanged) {
                setCaption(newCaption);
            }

View Full Code Here

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

        public void updateCaption(UIDL uidl) {

            boolean captionIsNeeded = VCaption.isNeeded(uidl);
            if (captionIsNeeded) {
                if (caption == null) {
                    caption = new VCaption(paintable, client);
                    VAbsoluteLayout.this.add(caption);
                }
                caption.updateCaption(uidl);
                updateCaptionPosition();
            } else {
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.