All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.v7.client.ui.AbstractLegacyComponentConnector Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2023 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.v7.client.ui;

import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.AbstractConnector;
import com.vaadin.shared.communication.ServerRpc;
import com.vaadin.v7.client.ComponentConnector;
import com.vaadin.v7.shared.AbstractLegacyComponentState;

/**
 * Legacy connector for Vaadin 7 compatibility connectors. Needed because
 * immediate has been removed from {@link AbstractConnector} in
 * Vaadin 8.
 *
 * @author Vaadin Ltd
 * @since 8.0
 * @deprecated only used for Vaadin 7 compatiblity components
 */
@Deprecated
public class AbstractLegacyComponentConnector extends AbstractComponentConnector
        implements ComponentConnector {

    // overridden to be visible to VUpload in the same package. Without making
    // it public in VUploadConnector
    @Override
    protected  T getRpcProxy(Class rpcInterface) {
        return super.getRpcProxy(rpcInterface);
    }

    @Override
    public AbstractLegacyComponentState getState() {
        return (AbstractLegacyComponentState) super.getState();
    }

    @Override
    public boolean isReadOnly() {
        return getState().readOnly;
    }

    @Override
    protected void updateWidgetStyleNames() {
        super.updateWidgetStyleNames();

        // add / remove read-only style name
        setWidgetStyleName("v-readonly", isReadOnly());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy