Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-05-14 09:32:10 -0400
committervlorenzo2013-05-14 09:32:10 -0400
commit25a33978d399b21ec61e9c51a480baf9b25af017 (patch)
treedc126c88a8cd33f5f9b138ccfcb477343b772001 /sandbox
parent75d06595e5cdd73cdeee61a65e880d71f3f758f0 (diff)
downloadorg.eclipse.papyrus-25a33978d399b21ec61e9c51a480baf9b25af017.tar.gz
org.eclipse.papyrus-25a33978d399b21ec61e9c51a480baf9b25af017.tar.xz
org.eclipse.papyrus-25a33978d399b21ec61e9c51a480baf9b25af017.zip
408006: [Table 2] The table must support the axis inversion.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=408006 408007: [Table 2] The table must support the Select All action https://bugs.eclipse.org/bugs/show_bug.cgi?id=408007
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CornerConfiguration.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/InvertAxisOnCornerConfiguration.java)8
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/CornerDataProvider.java46
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java8
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java2
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties1
5 files changed, 8 insertions, 57 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/InvertAxisOnCornerConfiguration.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CornerConfiguration.java
index 3a2d5e29bf0..29295119699 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/InvertAxisOnCornerConfiguration.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CornerConfiguration.java
@@ -25,10 +25,10 @@ import org.eclipse.swt.events.MouseEvent;
/**
*
- * This configuration allows to invert axis clicking on the top left corner of the table
+ * This configuration allows to add action clicking on the top left corner of the table
*
*/
-public class InvertAxisOnCornerConfiguration extends AbstractRegistryConfiguration {
+public class CornerConfiguration extends AbstractRegistryConfiguration {
/**
* the manager of the table
@@ -42,7 +42,7 @@ public class InvertAxisOnCornerConfiguration extends AbstractRegistryConfigurati
* @param manager
* the manager of the table
*/
- public InvertAxisOnCornerConfiguration(final INattableModelManager manager) {
+ public CornerConfiguration(final INattableModelManager manager) {
this.manager = manager;
}
@@ -58,7 +58,7 @@ public class InvertAxisOnCornerConfiguration extends AbstractRegistryConfigurati
uiBindingRegistry.registerSingleClickBinding(new MouseEventMatcher(GridRegion.CORNER), new IMouseAction() {
public void run(final NatTable natTable, final MouseEvent event) {
- manager.invertAxis();
+ manager.selectAll();
}
});
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/CornerDataProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/CornerDataProvider.java
deleted file mode 100644
index 1cf51ea85b7..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/CornerDataProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * 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.dataprovider;
-
-import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
-import org.eclipse.nebula.widgets.nattable.grid.data.DefaultCornerDataProvider;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-
-/**
- *
- * @author vl222926
- *
- */
-public class CornerDataProvider extends DefaultCornerDataProvider {
-
- public CornerDataProvider(IDataProvider columnHeaderDataProvider, IDataProvider rowHeaderDataProvider) {
- super(columnHeaderDataProvider, rowHeaderDataProvider);
- }
-
- @Override
- public Object getDataValue(final int columnIndex, final int rowIndex) {
- return Messages.CornerDataProvider_InvertAxis;
- }
-
- @Override
- public int getColumnCount() {
- return super.getColumnCount();
- }
-
- @Override
- public int getRowCount() {
- return super.getColumnCount();
- }
-
-}
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 89455f1b01c..86813ae549e 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
@@ -33,6 +33,7 @@ import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
import org.eclipse.nebula.widgets.nattable.export.command.ExportCommand;
import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.grid.data.DefaultCornerDataProvider;
import org.eclipse.nebula.widgets.nattable.grid.layer.CornerLayer;
import org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer;
import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
@@ -54,11 +55,10 @@ 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.configuration.InvertAxisOnCornerConfiguration;
+import org.eclipse.papyrus.infra.nattable.configuration.CornerConfiguration;
import org.eclipse.papyrus.infra.nattable.dataprovider.AbstractDataProvider;
import org.eclipse.papyrus.infra.nattable.dataprovider.BodyDataProvider;
import org.eclipse.papyrus.infra.nattable.dataprovider.ColumnHeaderDataProvider;
-import org.eclipse.papyrus.infra.nattable.dataprovider.CornerDataProvider;
import org.eclipse.papyrus.infra.nattable.dataprovider.RowHeaderDataProvider;
import org.eclipse.papyrus.infra.nattable.formatter.ExportFormatter;
import org.eclipse.papyrus.infra.nattable.layer.PapyrusGridLayer;
@@ -171,9 +171,9 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
this.rowHeaderLayerStack = new RowHeaderLayerStack(this.rowHeaderDataProvider, this.bodyLayerStack);
- final IDataProvider cornerDataProvider = new CornerDataProvider(this.columnHeaderDataProvider, this.rowHeaderDataProvider);
+ final IDataProvider cornerDataProvider = new DefaultCornerDataProvider(this.columnHeaderDataProvider, this.rowHeaderDataProvider);
final CornerLayer cornerLayer = new CornerLayer(new DataLayer(cornerDataProvider), this.rowHeaderLayerStack, this.columnHeaderLayerStack);
- cornerLayer.addConfiguration(new InvertAxisOnCornerConfiguration(this));
+ cornerLayer.addConfiguration(new CornerConfiguration(this));
this.gridLayer = new PapyrusGridLayer(this.bodyLayerStack, this.columnHeaderLayerStack, this.rowHeaderLayerStack, cornerLayer);
this.gridLayer.addConfiguration(new DefaultPrintBindings());
// gridLayer.addConfiguration(new StyleConfiguration());
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
index d497756c6a7..c0aebe4d82c 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
@@ -33,8 +33,6 @@ public class Messages extends NLS {
public static String CompositeAxisManager_AddAxisCommand;
- public static String CornerDataProvider_InvertAxis;
-
public static String DeleteNatTableContextAdvice_DestroyNattableCommand;
public static String EditConfiguration_ConfigurationFactoryNotFound;
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
index 60d1d11c1aa..3605134e900 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
@@ -4,7 +4,6 @@ AbstractTableHandler_CurrentEditorCantBeFound=Current Editor can't be found
AxisManagerFactory_AxisManagerClassCantBeLoaded=The AxisManager registered with the id {0} can't be loaded
AxisManagerFactory_TheClassCantBeInstanciated=The class {0} can't be instanciated
CompositeAxisManager_AddAxisCommand=Add Axis Command
-CornerDataProvider_InvertAxis=Invert Axis
DeleteNatTableContextAdvice_DestroyNattableCommand=Destroy NatTables command
EditConfiguration_ConfigurationFactoryNotFound=I can't find config factory for {0}
EditConfiguration_ConfigurationNotFound=I can't find configuration for {0}

Back to the top