com.vaadin.v7.client.ui.AbstractLegacyComponentConnector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-compatibility-client Show documentation
Show all versions of vaadin-compatibility-client Show documentation
Vaadin 7 compatibility package for Vaadin 8
/*
* 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());
}
}