Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiUnlimitedNaturalCellEditor.java')
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiUnlimitedNaturalCellEditor.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiUnlimitedNaturalCellEditor.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiUnlimitedNaturalCellEditor.java
new file mode 100644
index 00000000000..e266e164f16
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiUnlimitedNaturalCellEditor.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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.uml.nattable.editor;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.creation.UnlimitedNaturalEditionFactory;
+import org.eclipse.papyrus.infra.widgets.editors.IElementSelector;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.selectors.IntegerSelector;
+
+/**
+ * CellEditor for multivalued unlimited natural
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class MultiUnlimitedNaturalCellEditor extends AbstractUMLMultiValueCellEditor {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param axisElement
+ * @param elementProvider
+ */
+ public MultiUnlimitedNaturalCellEditor(Object axisElement, ITableAxisElementProvider elementProvider) {
+ super(axisElement, elementProvider);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.celleditor.AbstractUMLMultiValueCellEditor#getElementSelector(boolean,
+ * org.eclipse.jface.viewers.ILabelProvider, org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider)
+ *
+ * @param isUnique
+ * @param labelProvider
+ * @param contentProvider
+ * @return
+ */
+ @Override
+ protected IElementSelector getElementSelector(boolean isUnique, ILabelProvider labelProvider, IStaticContentProvider contentProvider) {
+ return new IntegerSelector();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.celleditor.AbstractUMLMultiValueCellEditor#getFactory()
+ *
+ * @return
+ */
+ @Override
+ protected ReferenceValueFactory getFactory() {
+ return new UnlimitedNaturalEditionFactory();
+ }
+}

Back to the top