blob: ac1b4d49d7127d5e6d1537cc931d689e8335b3ad (
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
|
/*******************************************************************************
* Copyright (c) 2011 Mia-Software.
* 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:
* Fabien Giquel (Mia-Software) - initial API and implementation
* Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
* Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
*******************************************************************************/
package org.eclipse.papyrus.emf.facet.widgets.celleditors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
/**
* The factory interface for creating some control
* {@link AbstractCellEditorComposite} dedicated to the edition of one java
* type. The developer should register some factories using the dedicated
* extension point "compositeEditors"
*
* @param <T>
* the java type managed by this composite editor factory.
*/
public interface ICompositeEditorFactory<T> {
/**
* @return the type handled by the composite editors created by this factory. This method is
* required because of type erasure with Java generics.
*/
Class<T> getHandledType();
/**
* Create a cell editor composite for a value of type <T>, as a subclass of
* {@link AbstractCellEditorComposite}, which is a SWT {@link Composite} suited for use as an
* in-place editor for values of type <T>.
*
* @param parent
* the SWT parent of the new composite
* @param style
* SWT style bits ({@link SWT#BORDER}, etc.)
* @return the new cell editor composite
*/
AbstractCellEditorComposite<T> createCompositeEditor(Composite parent, int style);
}
|