Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ebc5deeab3de8fc41306d71e6ed0e2fdd896beef (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
65
66
67
68
69
70
71
72
73
/*****************************************************************************
 * Copyright (c) 2015 CEA LIST.
 *
 * 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:
 *   Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;

import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;

/**
 * This interface allow to define the reference value editor methods to implements.
 */
public interface IReferenceValueEditor {

	/**
	 * Sets the Content provider for this editor
	 *
	 * @param provider
	 *            The content provider used to retrieve the possible values for this Reference.
	 */
	void setContentProvider(final IStaticContentProvider provider);

	/**
	 * Sets the Label provider for this editor If the label provider is null, a
	 * default one will be used. The same label provider is used for both the
	 * editor's label and the selection dialog.
	 *
	 * @param provider
	 *            The label provider.
	 */
	void setLabelProvider(final ILabelProvider provider);

	/**
	 * Sets the factory.
	 *
	 * @param factory
	 *            The reference value factory.
	 */
	void setValueFactory(final ReferenceValueFactory factory);

	/**
	 * Sets the direct creation value.
	 *
	 * @param directCreation
	 *            Boolean to determinate the direct creation value.
	 */
	void setDirectCreation(final boolean directCreation);

	/**
	 * Sets the mandatory.
	 *
	 * @param mandatory
	 *            The mandatory boolean value.
	 */
	void setMandatory(final boolean mandatory);

	/**
	 * Sets the read only value.
	 *
	 * @param readOnly
	 *            The read only value.
	 */
	void setReadOnly(final boolean readOnly);
}

Back to the top