Revision 42967 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/TableEditStartExtension.java
TableEditStartExtension.java | ||
---|---|---|
33 | 33 |
import org.gvsig.fmap.dal.exception.DataException; |
34 | 34 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
35 | 35 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
36 |
import org.gvsig.tools.util.ArrayUtils; |
|
36 | 37 |
import org.slf4j.Logger; |
37 | 38 |
import org.slf4j.LoggerFactory; |
38 | 39 |
|
... | ... | |
40 | 41 |
|
41 | 42 |
private static final Logger logger = LoggerFactory.getLogger(TableEditStartExtension.class); |
42 | 43 |
|
44 |
@Override |
|
43 | 45 |
public void initialize() { |
44 | 46 |
super.initialize(); |
45 | 47 |
IconThemeHelper.registerIcon("action", "table-start-editing", this); |
46 | 48 |
} |
47 | 49 |
|
48 | 50 |
public void execute(String actionCommand) { |
51 |
this.execute(actionCommand,null); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public void execute(String actionCommand, Object[] args) { |
|
49 | 56 |
if ("table-start-editing".equals(actionCommand)) { |
50 | 57 |
try { |
51 |
TableDocument doc = (TableDocument) table.getDocument(); |
|
58 |
TableDocument doc = (TableDocument)ArrayUtils.get(args,0); |
|
59 |
if( doc == null ) { |
|
60 |
doc = (TableDocument) table.getDocument(); |
|
61 |
} |
|
52 | 62 |
EditingNotificationManager editingNotification = DALSwingLocator.getEditingNotificationManager(); |
53 | 63 |
EditingNotification notification = editingNotification.notifyObservers( |
54 | 64 |
this, |
Also available in: Unified diff