com.vaadin.v7.client.ui.VCustomField 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-2024 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.Focusable;
@Deprecated
public class VCustomField extends VCustomComponent implements Focusable {
private Focusable focusDelegate;
@Override
public void focus() {
if (focusDelegate != null) {
focusDelegate.focus();
}
}
/**
* Sets the focusable widget to focus instead of this custom field.
*
* @param focusDelegate
* the widget to delegate focus to
*/
public void setFocusDelegate(Focusable focusDelegate) {
this.focusDelegate = focusDelegate;
}
/**
* Sets the focusable widget to focus instead of this custom field.
*
* @param focusDelegate
* the widget to delegate focus to
*/
public void setFocusDelegate(
final com.google.gwt.user.client.ui.Focusable focusDelegate) {
this.focusDelegate = new Focusable() {
@Override
public void focus() {
focusDelegate.setFocus(true);
}
};
}
}