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/TableRowsOperations.java
TableRowsOperations.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.andami.plugins.Extension; |
... | ... | |
29 | 30 |
import org.gvsig.fmap.dal.exception.DataException; |
30 | 31 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
31 | 32 |
|
32 |
/** |
|
33 |
* DOCUMENT ME! |
|
34 |
* |
|
35 |
* @author Vicente Caballero Navarro |
|
36 |
* @author gvSIG team |
|
37 |
*/ |
|
38 | 33 |
public class TableRowsOperations extends Extension { |
39 | 34 |
|
40 |
/** |
|
41 |
* DOCUMENT ME! |
|
42 |
*/ |
|
43 | 35 |
public void initialize() { |
44 | 36 |
registerIcons(); |
45 | 37 |
} |
46 | 38 |
|
47 | 39 |
private void registerIcons() { |
48 |
PluginServices.getIconTheme().registerDefault( |
|
49 |
"table-selection-up", |
|
50 |
this.getClass().getClassLoader() |
|
51 |
.getResource("images/selectionUp.png")); |
|
52 |
|
|
53 |
PluginServices.getIconTheme().registerDefault( |
|
54 |
"table-invert", |
|
55 |
this.getClass().getClassLoader() |
|
56 |
.getResource("images/invertSelection.png")); |
|
40 |
IconThemeHelper.registerIcon("action", "selection-move-up", this); |
|
41 |
IconThemeHelper.registerIcon("action", "selection-reverse", this); |
|
57 | 42 |
} |
58 | 43 |
|
59 |
/** |
|
60 |
* DOCUMENT ME! |
|
61 |
* |
|
62 |
* @param actionCommand |
|
63 |
* DOCUMENT ME! |
|
64 |
*/ |
|
65 | 44 |
public void execute(String actionCommand) { |
66 | 45 |
FeatureTableDocumentPanel tableDocument = getTableDocument(); |
67 |
if (actionCommand.compareTo("SELECTIONUP") == 0) {
|
|
46 |
if (actionCommand.equalsIgnoreCase("selection-move-up") ) {
|
|
68 | 47 |
showsSelectedRows(tableDocument); |
69 | 48 |
} |
70 |
if (actionCommand.compareTo("INVERTSELECTION") == 0) {
|
|
49 |
if (actionCommand.equalsIgnoreCase("selection-reverse") ) {
|
|
71 | 50 |
invertSelection(tableDocument); |
72 | 51 |
} |
73 | 52 |
tableDocument.getModel().setModified(true); |
... | ... | |
92 | 71 |
table.setSelectionUp(true); |
93 | 72 |
} |
94 | 73 |
|
95 |
/** |
|
96 |
* DOCUMENT ME! |
|
97 |
* |
|
98 |
* @return DOCUMENT ME! |
|
99 |
*/ |
|
100 | 74 |
public boolean isEnabled() { |
101 | 75 |
FeatureTableDocumentPanel tableDocument = getTableDocument(); |
102 | 76 |
|
... | ... | |
112 | 86 |
return false; |
113 | 87 |
} |
114 | 88 |
|
115 |
/** |
|
116 |
* DOCUMENT ME! |
|
117 |
* |
|
118 |
* @return DOCUMENT ME! |
|
119 |
*/ |
|
120 | 89 |
public boolean isVisible() { |
121 | 90 |
return getTableDocument() != null; |
122 | 91 |
} |
Also available in: Unified diff