Revision 38564 branches/v2_0_0_prep/extensions/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/TableEditChangeColumnsExtension.java

View differences:

TableEditChangeColumnsExtension.java
21 21
 */
22 22
package org.gvsig.app.extension;
23 23

  
24
import org.gvsig.andami.IconThemeHelper;
24 25
import org.gvsig.andami.PluginServices;
25 26
import org.gvsig.andami.messages.NotificationManager;
26 27
import org.gvsig.fmap.dal.exception.DataException;
......
32 33
 */
33 34
public class TableEditChangeColumnsExtension extends AbstractTableEditExtension {
34 35

  
36
	public void initialize() {
37
		super.initialize();
38
		IconThemeHelper.registerIcon("action", "table-add-column", this);
39
		IconThemeHelper.registerIcon("action", "table-rename-column", this);
40
		IconThemeHelper.registerIcon("action", "table-remove-column", this);
41
	}
35 42
    /**
36 43
     * @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String)
37 44
     */
38 45
    public void execute(String actionCommand) {
39 46
        try {
40 47
            featureTableOperations.setStore(table.getModel().getStore());
41
            if ("REMOVECOLUMN".equals(actionCommand)) {
48
            if ("table-remove-column".equals(actionCommand)) {
42 49
                featureTableOperations.deleteAttributes(table.getTablePanel()
43 50
                    .getTable());
44 51
            } else
45
                if ("ADDCOLUMN".equals(actionCommand)) {
52
                if ("table-add-column".equals(actionCommand)) {
46 53
                    featureTableOperations.insertAttributes(table
47 54
                        .getTablePanel().getTable());
48 55
                } else
49
                    if ("RENAMECOLUMN".equals(actionCommand)) {
56
                    if ("table-rename-column".equals(actionCommand)) {
50 57
                        featureTableOperations.renameAttributes(table
51 58
                            .getTablePanel().getTable());
52 59
                    }

Also available in: Unified diff