Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a64de501fb3a862d2ec12be85c0de825a0ad37a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*******************************************************************************
 * Copyright (c) 2015 Obeo.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Obeo - initial API and implementation
 *******************************************************************************/
package org.eclipse.eef.core.api;

import org.eclipse.eef.EEFTextDescription;

/**
 * The {@link EEFText} is used to manage the state of a Text widget.
 *
 * @author sbegaudeau
 */
public interface EEFText extends EEFWidget {
	/**
	 * Returns the description of the {@link EEFText}.
	 *
	 * @return The {@link EEFTextDescription}
	 */
	EEFTextDescription getDescription();

	/**
	 * Adds a consumer which will be triggered when the value expression is evaluated.
	 *
	 * @param consumer
	 *            A functional interface used as a callback
	 */
	void addValueExpressionConsumer(IConsumer<String> consumer);

	/**
	 * Removes the value expression consumer.
	 */
	void removeValueExpressionConsumer();

	/**
	 * Updates the value of the text.
	 * 
	 * @param selection
	 *
	 * @param newValue
	 *            The new value
	 */
	void updateValue(Object selection, String newValue);

	/**
	 * Adds a consumer which will be triggered when the label expression is evaluated.
	 *
	 * @param consumer
	 *            A functional interface used as a callback
	 */
	void addLabelExpressionConsumer(IConsumer<String> consumer);

	/**
	 * Removes the label expression consumer.
	 */
	void removeLabelExpressionConsumer();

}

Back to the top