Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/emf/facet/widgets/celleditors/IWidget2.java')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/emf/facet/widgets/celleditors/IWidget2.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/emf/facet/widgets/celleditors/IWidget2.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/emf/facet/widgets/celleditors/IWidget2.java
new file mode 100644
index 00000000000..0a0a3b720b6
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/emf/facet/widgets/celleditors/IWidget2.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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 Guyomar (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software)
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ *****************************************************************************/
+package org.eclipse.emf.facet.widgets.celleditors;
+
+import org.eclipse.swt.widgets.Composite;
+
+/** Implemented by {@link Composite}s that are encapsulated in {@link IModelCellEditor cell editors} */
+public interface IWidget2<T extends Object> {
+ /** @return the validator used to determine whether an entered value is accepted */
+ IValidator getValidator();
+
+ /**
+ * Add a listener that is notified when the value in the widget is "committed". That is, when
+ * the user hits Enter or clicks outside the widget.
+ */
+ void addCommitListener(IListener listener);
+
+ /** Remove an existing commit listener */
+ void removeCommitListener(IListener listener);
+
+ /** Add a listener for changes to the value */
+ void addChangeListener(IListener listener);
+
+ /** Remove an existing change listener */
+ void removeChangeListener(IListener listener);
+
+ /** Set the given value in the widget */
+ void setValue(final T value);
+
+ /** Get the value from the widget */
+ T getValue();
+}

Back to the top