Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-05-02 12:09:50 +0000
committervlorenzo2013-05-02 12:09:50 +0000
commitc43bc507b721a92c3e8613f5339915d715d76fa5 (patch)
treef6a991323f8513366ed26eeadc5694bf9dc38e4b /sandbox
parent029b4fc15522ad216180d590c0f4228a86a8b4f0 (diff)
downloadorg.eclipse.papyrus-c43bc507b721a92c3e8613f5339915d715d76fa5.tar.gz
org.eclipse.papyrus-c43bc507b721a92c3e8613f5339915d715d76fa5.tar.xz
org.eclipse.papyrus-c43bc507b721a92c3e8613f5339915d715d76fa5.zip
401764: [Table 2] The classes managing the table model and Nattable must be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401764 Correct the move axis
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortColumnsHandler.java2
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortRowsHandler.java2
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java46
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractSynchronizedOnFeatureAxisManager.java5
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java25
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java11
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/ICompositeAxisManager.java2
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java2
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java9
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java47
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomCellDragModeForColumn.java6
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomColumnReorderDragMode.java6
12 files changed, 101 insertions, 62 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortColumnsHandler.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortColumnsHandler.java
index 314de8e41c7..48d313cce0f 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortColumnsHandler.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortColumnsHandler.java
@@ -53,7 +53,7 @@ public class SortColumnsHandler extends AbstractTableHandler {
public void setEnabled(Object evaluationContext) {
INattableModelManager manager = getCurrentNattableModelManager();
if(manager != null) {
- setBaseEnabled(manager.canReorderColumns());
+ setBaseEnabled(manager.canMoveColumns());
}
setBaseEnabled(false);
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortRowsHandler.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortRowsHandler.java
index 2b87ca8a28e..0ff9f6b4c71 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortRowsHandler.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortRowsHandler.java
@@ -52,7 +52,7 @@ public class SortRowsHandler extends AbstractTableHandler {
public void setEnabled(Object evaluationContext) {
INattableModelManager manager = getCurrentNattableModelManager();
if(manager != null) {
- setBaseEnabled(manager.canReorderColumns());
+ setBaseEnabled(manager.canMoveColumns());
}
super.setBaseEnabled(false);
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java
index 4f2624c8f80..cdb4b4630d7 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java
@@ -22,8 +22,14 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.nattable.Activator;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
@@ -224,11 +230,11 @@ public abstract class AbstractAxisManager implements IAxisManager {
/**
*
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canReoderElements()
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canMoveAxis()
*
* @return
*/
- public boolean canReoderElements() {
+ public boolean canMoveAxis() {
return true;
}
@@ -282,4 +288,40 @@ public abstract class AbstractAxisManager implements IAxisManager {
}
return eObjects;
}
+
+ /**
+ * Returns the EditingDomain associated to the table
+ *
+ * @return
+ */
+ protected EditingDomain getTableEditingDomain() {//Duplicated from NatTableModelManager
+ ServicesRegistry registry = null;
+ try {
+ registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(getTableManager().getTable());
+ return registry.getService(EditingDomain.class);
+ } catch (final ServiceException e) {
+ Activator.log.error(Messages.NattableModelManager_ServiceRegistryNotFound, e);
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the EditingDomain associated to the context
+ *
+ * @return
+ */
+ protected EditingDomain getContextEditingDomain() { //Duplicated from NatTableModelManager
+ ServicesRegistry registry = null;
+ try {
+ registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(getTableContext());
+ return registry.getService(TransactionalEditingDomain.class);
+ } catch (final ServiceException e) {
+ Activator.log.error(Messages.NattableModelManager_ServiceRegistryNotFound, e);
+ }
+ return null;
+ }
+
+ public void moveAxis(Object elementToMove, int newIndex) {
+ }
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractSynchronizedOnFeatureAxisManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractSynchronizedOnFeatureAxisManager.java
index a72877d5e29..5cdccd93dd2 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractSynchronizedOnFeatureAxisManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractSynchronizedOnFeatureAxisManager.java
@@ -206,12 +206,12 @@ public abstract class AbstractSynchronizedOnFeatureAxisManager extends AbstractA
/**
*
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canReoderElements()
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canMoveAxis()
*
* @return
*/
@Override
- public boolean canReoderElements() {
+ public boolean canMoveAxis() {
return false;
}
@@ -228,4 +228,5 @@ public abstract class AbstractSynchronizedOnFeatureAxisManager extends AbstractA
public boolean isSlave() {
return false;
}
+
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
index 5f6ba0b63cb..f1e33ecd2c0 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
@@ -23,6 +23,7 @@ import java.util.Set;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.util.TransactionUtil;
@@ -46,7 +47,7 @@ public class CompositeAxisManager extends AbstractAxisManager implements ICompos
/**
* the id of this manager
*/
- public static final String MANAGER_ID = "org.eclipse.papyrus.infra.nattable.composite.axis.manager"; //$NON-NLS-1$
+ private static final String MANAGER_ID = "org.eclipse.papyrus.infra.nattable.composite.axis.manager"; //$NON-NLS-1$
/**
* the sub managers
@@ -197,14 +198,14 @@ public class CompositeAxisManager extends AbstractAxisManager implements ICompos
/**
*
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canReoderElements()
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canMoveAxis()
*
* @return
*/
@Override
- public boolean canReoderElements() {
+ public boolean canMoveAxis() {
for(final IAxisManager current : this.subManagers) {
- if(!current.canReoderElements() || current.isDynamic()) {
+ if(!current.canMoveAxis() || current.isDynamic()) {
return false;
}
}
@@ -220,7 +221,7 @@ public class CompositeAxisManager extends AbstractAxisManager implements ICompos
* @param configRegistry
*/
public void sortAxisByName(boolean alphabeticOrder, final IConfigRegistry configRegistry) {
- if(canReoderElements()) {
+ if(canMoveAxis()) {
final List<IAxis> axis = new ArrayList<IAxis>(getRepresentedContentProvider().getAxis());
Collections.sort(axis, new AxisComparator(alphabeticOrder, configRegistry));
final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(getRepresentedContentProvider());
@@ -342,4 +343,18 @@ public class CompositeAxisManager extends AbstractAxisManager implements ICompos
return false;
}
+
+ /**
+ *
+ * @param elementToMove
+ * @param newIndex
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#moveAxis(java.lang.Object, int)
+ */
+ public void moveAxis(Object elementToMove, int newIndex) {
+ if(!isDynamic() && elementToMove instanceof IAxis) {
+ EditingDomain domain = getTableEditingDomain();
+ final Command command = MoveCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), elementToMove, newIndex);
+ domain.getCommandStack().execute(command);
+ };
+ }
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java
index 8daee60a36f..c86d4f720f3 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java
@@ -120,9 +120,9 @@ public interface IAxisManager extends IDisposable {
/**
*
- * @return <code>true</code> if we can reorder the elements on the axis
+ * @return <code>true</code> if we can move elements on the axis
*/
- public boolean canReoderElements();
+ public boolean canMoveAxis();
/**
*
@@ -154,5 +154,10 @@ public interface IAxisManager extends IDisposable {
*/
public boolean isDynamic();
-
+ /**
+ *
+ * @param newIndex
+ * @param axisToMove
+ */
+ public void moveAxis(final Object elementToMove, final int newIndex);
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/ICompositeAxisManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/ICompositeAxisManager.java
index 55a56e80862..c7dbda2d04d 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/ICompositeAxisManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/ICompositeAxisManager.java
@@ -45,4 +45,6 @@ public interface ICompositeAxisManager extends IAxisManager {
* the config registry used to find the label provider
*/
public void sortAxisByName(final boolean alpabeticOrder, IConfigRegistry iConfigRegistry);
+
+
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
index be2198ab3ce..89455f1b01c 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
@@ -338,7 +338,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
final List<IAxis> allAxis = AbstractNattableWidgetManager.this.table.getCurrentColumnAxisProvider().getAxis();
final IAxis axisToMove = allAxis.get(start);
if(axisToMove != null) {
- reorderColumnsElements(axisToMove, end);
+ moveColumnElement(axisToMove, end);
}
}
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
index 418fbbd0046..139835fa8a7 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
@@ -22,7 +22,6 @@ import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
import org.eclipse.papyrus.infra.nattable.layerstack.BodyLayerStack;
import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
import org.eclipse.papyrus.infra.nattable.utils.LocationValue;
import org.eclipse.swt.graphics.Point;
@@ -60,13 +59,13 @@ public interface INattableModelManager extends ILimitedNattableModelManager, ITa
public IAxisManager getLineDataProvider();
- public boolean canReorderColumns();
+ public boolean canMoveColumns();
- public boolean canReoderRows();
+ public boolean canMoveRows();
- public void reorderColumnsElements(final IAxis axisToMove, final int newIndex);
+ public void moveColumnElement(final Object axisToMove, final int newIndex);
- public void reorderRowElements(final IAxis axisToMove, final int newIndex);
+ public void moveRowElement(final Object axisToMove, final int newIndex);
public void invertAxis();
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
index a884c78c119..06e4a792b0e 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
@@ -51,7 +51,6 @@ import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
import org.eclipse.papyrus.infra.nattable.messages.Messages;
import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
@@ -491,28 +490,6 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
}
}
- // /**
- // *
- // * @param obj
- // * an eobject linked to the model
- // * @return the editing domain to use
- // *
- // * @deprecated Use getTableEditingDomain() or getContextEditingDomain() instead
- // */
- // //FIXME Use either getTableEditingDomain() or getContextEditingDomain()
- // @Deprecated
- // private EditingDomain getEditingDomain(EObject eobject) {
- // ServicesRegistry registry = null;
- // try {
- // registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(eobject);
- // return registry.getService(EditingDomain.class);
- // } catch (final ServiceException e) {
- // Activator.log.error(Messages.NattableModelManager_ServiceRegistryNotFound, e);
- // }
- //
- // return null;
- // }
-
/**
* Returns the EditingDomain associated to the table
*
@@ -737,26 +714,21 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
return null;
}
- public boolean canReoderRows() {
- return this.rowManager.canReoderElements();
+ public boolean canMoveRows() {
+ return this.rowManager.canMoveAxis();
}
- public boolean canReorderColumns() {
- return this.columnManager.canReoderElements();
+ public boolean canMoveColumns() {
+ return this.columnManager.canMoveAxis();
}
- public void reorderColumnsElements(final IAxis axisToMove, final int newIndex) {
- final EditingDomain domain = getContextEditingDomain();
- //FIXME
- // final Command cmd = MoveCommand.create(getEditingDomain(getTable().getContext()), this.columnProvider, NattableaxisproviderPackage.eINSTANCE.getDefaultAxisProvider_Axis(), axisToMove, newIndex);
- // domain.getCommandStack().execute(cmd);
+ public void moveColumnElement(final Object axisToMove, final int newIndex) {
+ this.columnManager.moveAxis(axisToMove, newIndex);
}
// not tested
- public void reorderRowElements(final IAxis axisToMove, final int newIndex) {
- final EditingDomain domain = getContextEditingDomain();
- // final Command cmd = MoveCommand.create(getEditingDomain(getTable().getContext()), this.rowProvider, NattableaxisproviderPackage.eINSTANCE.getDefaultAxisProvider_Axis(), axisToMove, newIndex);
- // domain.getCommandStack().execute(cmd);
+ public void moveRowElement(final Object axisToMove, final int newIndex) {
+ this.rowManager.moveAxis(axisToMove, newIndex);
}
/**
@@ -928,4 +900,7 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
return getTable().getCurrentRowAxisProvider();
}
}
+
+
+
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomCellDragModeForColumn.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomCellDragModeForColumn.java
index e223f4a366a..d0589d99080 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomCellDragModeForColumn.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomCellDragModeForColumn.java
@@ -50,7 +50,7 @@ public class CustomCellDragModeForColumn extends CellDragMode {
* @param event
*/
public void mouseDown(NatTable natTable, MouseEvent event) {
- if(this.manager.canReorderColumns()) {
+ if(this.manager.canMoveColumns()) {
super.mouseDown(natTable, event);
}
}
@@ -64,7 +64,7 @@ public class CustomCellDragModeForColumn extends CellDragMode {
* @param event
*/
public void mouseMove(NatTable natTable, MouseEvent event) {
- if(this.manager.canReorderColumns()) {
+ if(this.manager.canMoveColumns()) {
super.mouseMove(natTable, event);
}
@@ -79,7 +79,7 @@ public class CustomCellDragModeForColumn extends CellDragMode {
* @param event
*/
public void mouseUp(NatTable natTable, MouseEvent event) {
- if(this.manager.canReorderColumns()) {
+ if(this.manager.canMoveColumns()) {
super.mouseUp(natTable, event);
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomColumnReorderDragMode.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomColumnReorderDragMode.java
index 86abda7e7d8..06d894cf01a 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomColumnReorderDragMode.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomColumnReorderDragMode.java
@@ -50,7 +50,7 @@ public class CustomColumnReorderDragMode extends ColumnReorderDragMode {
* @param event
*/
public void mouseDown(NatTable natTable, MouseEvent event) {
- if(this.manager.canReorderColumns()) {
+ if(this.manager.canMoveColumns()) {
super.mouseDown(natTable, event);
}
}
@@ -64,7 +64,7 @@ public class CustomColumnReorderDragMode extends ColumnReorderDragMode {
* @param event
*/
public void mouseMove(NatTable natTable, MouseEvent event) {
- if(this.manager.canReorderColumns()) {
+ if(this.manager.canMoveColumns()) {
super.mouseMove(natTable, event);
}
}
@@ -78,7 +78,7 @@ public class CustomColumnReorderDragMode extends ColumnReorderDragMode {
* @param event
*/
public void mouseUp(NatTable natTable, MouseEvent event) {
- if(this.manager.canReorderColumns()) {
+ if(this.manager.canMoveColumns()) {
super.mouseUp(natTable, event);
}
}

Back to the top