Package com.vaadin.terminal.gwt.client

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


        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

                e.getStyle().setProperty("display", "none");
            }
        }

        public void updateCaptionSize(int index) {
            VCaption c = getTab(index);
            c.setWidth(c.getRequiredWidth() + "px");

        }
View Full Code Here

    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

        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

        private Element captionNode = DOM.createDiv();
        private String styleName;

        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

        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

                    .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

            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

                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

TOP

Related Classes of com.vaadin.terminal.gwt.client.VCaption

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.