Package com.vaadin.shared

Examples of com.vaadin.shared.Connector


    }

    @Override
    public void onConnectorHierarchyChange(
            ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
        Connector stateChild = getState().child;
        if (stateChild == null) {
            if (getChildComponents().size() != 0) {
                throw new IllegalStateException(
                        "Hierarchy has child but state has not");
            } else {
View Full Code Here


        } else if (value instanceof Enum) {
            return encodeEnum((Enum<?>) value, connection);
        } else if (value instanceof Map) {
            return encodeMap((Map) value, type, connection);
        } else if (value instanceof Connector) {
            Connector connector = (Connector) value;
            return new JSONString(connector.getConnectorId());
        } else if (value instanceof Collection) {
            return encodeCollection((Collection) value, type, connection);
        } else if (value instanceof UidlValue) {
            return encodeVariableChange((UidlValue) value, connection);
        } else {
View Full Code Here

    private static JSONValue encodeConnectorMap(Map<Object, Object> map,
            Type type, ApplicationConnection connection) {
        JSONObject jsonMap = new JSONObject();

        for (Entry<?, ?> entry : map.entrySet()) {
            Connector connector = (Connector) entry.getKey();

            JSONValue encodedValue = encodeChildValue(entry.getValue(), type,
                    1, connection);

            jsonMap.put(connector.getConnectorId(), encodedValue);
        }

        return jsonMap;
    }
View Full Code Here

            // generated id:s as these might not be consistent
            return "PID_S" + elementId;
        } else if (w instanceof VUI) {
            return "";
        } else if (w instanceof VWindow) {
            Connector windowConnector = ConnectorMap.get(client)
                    .getConnector(w);
            List<WindowConnector> subWindowList = client.getUIConnector()
                    .getSubWindows();
            int indexOfSubWindow = subWindowList.indexOf(windowConnector);
            return PARENTCHILD_SEPARATOR + "VWindow[" + indexOfSubWindow + "]";
View Full Code Here

        Profiler.enter("AbstractComponentConnector.updateComponentSize");

        // Parent should be updated if either dimension changed between relative
        // and non-relative
        if (newWidth.endsWith("%") != lastKnownWidth.endsWith("%")) {
            Connector parent = getParent();
            if (parent instanceof ManagedLayout) {
                getLayoutManager().setNeedsHorizontalLayout(
                        (ManagedLayout) parent);
            }
        }

        if (newHeight.endsWith("%") != lastKnownHeight.endsWith("%")) {
            Connector parent = getParent();
            if (parent instanceof ManagedLayout) {
                getLayoutManager().setNeedsVerticalLayout(
                        (ManagedLayout) parent);
            }
        }
View Full Code Here

        } else if (value instanceof Map) {
            Object jsonMap = encodeMap(valueType, (Map<?, ?>) value,
                    connectorTracker);
            return new EncodeResult(jsonMap);
        } else if (value instanceof Connector) {
            Connector connector = (Connector) value;
            if (value instanceof Component
                    && !(LegacyCommunicationManager
                            .isComponentVisibleToClient((Component) value))) {
                return encodeNull();
            }
            return new EncodeResult(connector.getConnectorId());
        } else if (value instanceof Enum) {
            return encodeEnum((Enum<?>) value, connectorTracker);
        } else if (value instanceof JSONArray || value instanceof JSONObject) {
            return new EncodeResult(value);
        } else if (valueType instanceof Class<?>) {
View Full Code Here

        } else if (value instanceof Map) {
            Object jsonMap = encodeMap(valueType, (Map<?, ?>) value,
                    connectorTracker);
            return new EncodeResult(jsonMap);
        } else if (value instanceof Connector) {
            Connector connector = (Connector) value;
            if (value instanceof Component
                    && !(AbstractCommunicationManager
                            .isComponentVisibleToClient((Component) value))) {
                return encodeNull();
            }
            return new EncodeResult(connector.getConnectorId());
        } else if (value instanceof Enum) {
            return encodeEnum((Enum<?>) value, connectorTracker);
        } else if (value instanceof JSONArray || value instanceof JSONObject) {
            return new EncodeResult(value);
        } else if (valueType instanceof Class<?>) {
View Full Code Here

TOP

Related Classes of com.vaadin.shared.Connector

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.