Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2425a64f6ab5517b23964d8f64c542ea7f236bf0 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*****************************************************************************
 * Copyright (c) 2012 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:
 *  Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.infra.nattable.celleditor.config;

import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter;
import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator;
import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;

/**
 *
 * This interface declares the methods used to get the element for the configuration of celleditors when they are declared by axis
 *
 */
public interface IAxisCellEditorConfiguration {

	/**
	 *
	 * @param table
	 *            the table
	 * @param axisElement
	 *            the axis element
	 * @param provider
	 *            the label provider to use
	 * @return
	 *         the display converter
	 */
	public IDisplayConverter getDisplayConvert(Table table, Object axisElement, final ILabelProvider provider);

	/**
	 *
	 * @param table
	 *            the table
	 * @param axisElement
	 *            the axis element
	 * @return
	 *         the cell painter for the editor
	 */
	public ICellPainter getCellPainter(Table table, Object axisElement);

	/**
	 *
	 * @param table
	 *            the table
	 * @param axisElement
	 *            the edited element axis
	 * @param elementProvider
	 * @return
	 */
	public ICellEditor getICellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider);


	/**
	 *
	 * @param table
	 *            the table
	 * @param axisElement
	 *            the axis element
	 * @return
	 *         the display mode to use for the editor
	 */
	public String getDisplayMode(Table table, Object axisElement);

	/**
	 *
	 * @return
	 *         the id of the editor
	 */
	public String getEditorConfigId();

	/**
	 *
	 *
	 * @param table
	 *            the table
	 * @param axisElement
	 *            the axis element
	 * @return the data validator
	 */
	public IDataValidator getDataValidator(Table table, Object axisElement);

	/**
	 *
	 * @return
	 *         the description for the editor (should be used by the preferences)
	 */
	public String getEditorDescription();

	/**
	 *
	 * @param table
	 *            the table
	 * @param object
	 *            an object
	 * @return
	 *         <code>true</code> if the cell editor configuration is able to manage the object
	 */
	public boolean handles(Table table, Object object);
}

Back to the top