Package com.vaadin.client

Examples of com.vaadin.client.ComponentConnector


            StackItem selectedItem = getWidget().getStackItem(
                    getWidget().selectedItemIndex);

            getWidget().open(getWidget().selectedItemIndex);

            ComponentConnector contentConnector = getChildComponents().get(0);
            if (contentConnector != null) {
                selectedItem.setContent(contentConnector.getWidget());
            }
        } else if (getWidget().getOpenStackItem() != null) {
            getWidget().close(getWidget().getOpenStackItem());
        }
        getLayoutManager().setNeedsVerticalLayout(this);
View Full Code Here


     * @return a list of ConnectorPath objects, in descending order towards the
     *         common root container.
     */
    private List<ConnectorPath> getConnectorHierarchyForElement(Element elem) {
        Element e = elem;
        ComponentConnector c = Util.findPaintable(client, e);
        List<ConnectorPath> connectorHierarchy = new ArrayList<ConnectorPath>();

        while (c != null) {

            for (String id : getIDsForConnector(c)) {
                ConnectorPath cp = new ConnectorPath();
                cp.name = getFullClassName(id);
                cp.connector = c;

                // We want to make an exception for the UI object, since it's
                // our default search context (and can't be found inside itself)
                if (!cp.name.equals("com.vaadin.ui.UI")) {
                    connectorHierarchy.add(cp);
                }
            }

            e = e.getParentElement();
            if (e != null) {
                c = Util.findPaintable(client, e);
                e = c != null ? c.getWidget().getElement() : null;
            }

        }

        return connectorHierarchy;
View Full Code Here

                .extractPostFilterPredicates(path);
        if (postFilters.size() > 0) {
            path = path.substring(1, path.lastIndexOf(')'));
        }

        final ComponentConnector searchRoot = Util.findPaintable(client, root);
        List<Element> elements = getElementsByPathStartingAtConnector(path,
                searchRoot, root);

        for (SelectorPredicate p : postFilters) {
            // Post filtering supports only indexes and follows instruction
View Full Code Here

        for (SelectorPredicate p : predicates) {

            if (p.getIndex() > -1) {
                try {
                    ComponentConnector v = potentialMatches.get(p.getIndex());
                    potentialMatches.clear();
                    potentialMatches.add(v);
                } catch (IndexOutOfBoundsException e) {
                    potentialMatches.clear();
                }
View Full Code Here

        return validSyntax.test(path);
    }

    @Override
    public String getPathForElement(Element targetElement) {
        ComponentConnector connector = Util
                .findPaintable(client, targetElement);

        Widget w = null;
        if (connector != null) {
            // If we found a Paintable then we use that as reference. We should
            // find the Paintable for all but very special cases (like
            // overlays).
            w = connector.getWidget();

            /*
             * Still if the Paintable contains a widget that implements
             * SubPartAware, we want to use that as a reference
             */
 
View Full Code Here

                    boolean sorted = tHead.getHeaderCell(col).isSorted();
                    if (cell instanceof String) {
                        addCell(uidl, cell.toString(), aligns[col++], style,
                                isRenderHtmlInCells(), sorted, description);
                    } else {
                        final ComponentConnector cellContent = client
                                .getPaintable((UIDL) cell);

                        addCell(uidl, cellContent.getWidget(), aligns[col++],
                                style, sorted, description);
                    }
                }
            }
View Full Code Here

                    + "\" ");
        } else {
            html.append("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ");
        }

        ComponentConnector paintable = ConnectorMap.get(client).getConnector(
                this);
        String height = paintable.getState().height;
        String width = paintable.getState().width;

        // Add width and height
        html.append("width=\"" + Util.escapeAttribute(width) + "\" ");
        html.append("height=\"" + Util.escapeAttribute(height) + "\" ");
        html.append("type=\"application/x-shockwave-flash\" ");
View Full Code Here

        setNeedsHorizontalMeasure(connector, needsMeasure);
        setNeedsVerticalMeasure(connector, needsMeasure);
    }

    public void setNeedsMeasure(String connectorId, boolean needsMeasure) {
        ComponentConnector connector = (ComponentConnector) ConnectorMap.get(
                connection).getConnector(connectorId);
        if (connector == null) {
            return;
        }
View Full Code Here

    }

    public void setNeedsHorizontalMeasure(String connectorId,
            boolean needsMeasure) {
        // Ensure connector exists
        ComponentConnector connector = (ComponentConnector) ConnectorMap.get(
                connection).getConnector(connectorId);
        if (connector == null) {
            return;
        }
View Full Code Here

        dependency.setNeedsMeasure(needsMeasure);
    }

    public void setNeedsVerticalMeasure(String connectorId, boolean needsMeasure) {
        // Ensure connector exists
        ComponentConnector connector = (ComponentConnector) ConnectorMap.get(
                connection).getConnector(connectorId);
        if (connector == null) {
            return;
        }
View Full Code Here

TOP

Related Classes of com.vaadin.client.ComponentConnector

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.