org.eclipse.jface.widgets.Property Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2018 SAP SE and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SAP SE - initial version
******************************************************************************/
package org.eclipse.jface.widgets;
import org.eclipse.pde.api.tools.annotations.NoExtend;
import org.eclipse.pde.api.tools.annotations.NoImplement;
import org.eclipse.swt.widgets.Widget;
/**
* Represents a property for widgets, like text, enabled state, image, ...
*
* Used to apply the property to the given widget in the {@link #apply(Widget)}
* methods.
*
*
* This is a functional interface whose
* functional method is {@link #apply(Widget)}.
*
*
* @param the type of the widget the property is used for
*
* @since 3.18
*/
@NoImplement
@NoExtend
@FunctionalInterface
public interface Property {
/**
* Called when the widget is created and the property should be applied.
*/
void apply(T widget);
}