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/TableNumericFieldOperations.java
TableNumericFieldOperations.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import java.math.BigDecimal; |
25 | 25 |
|
26 |
import org.gvsig.andami.IconThemeHelper; |
|
26 | 27 |
import org.gvsig.andami.PluginServices; |
27 | 28 |
import org.gvsig.andami.messages.NotificationManager; |
28 | 29 |
import org.gvsig.andami.plugins.Extension; |
... | ... | |
52 | 53 |
* @see org.gvsig.andami.plugins.IExtension#initialize() |
53 | 54 |
*/ |
54 | 55 |
public void initialize() { |
55 |
registerIcons();
|
|
56 |
IconThemeHelper.registerIcon("action", "table-statistics", this);
|
|
56 | 57 |
} |
57 | 58 |
|
58 |
private void registerIcons() { |
|
59 |
PluginServices.getIconTheme().registerDefault( |
|
60 |
"table-statistics", |
|
61 |
this.getClass().getClassLoader() |
|
62 |
.getResource("images/statistics.png")); |
|
63 |
} |
|
64 |
|
|
65 | 59 |
/** |
66 | 60 |
* @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String) |
67 | 61 |
*/ |
68 | 62 |
public void execute(String actionCommand) { |
69 |
IWindow v = PluginServices.getMDIManager().getActiveWindow(); |
|
70 |
|
|
71 |
if (v != null) { |
|
72 |
if (v.getClass() == FeatureTableDocumentPanel.class) { |
|
73 |
|
|
74 |
FeatureTableDocumentPanel table = (FeatureTableDocumentPanel) v; |
|
75 |
|
|
76 |
doExecute(table); |
|
77 |
} |
|
78 |
} |
|
63 |
if( "table-statistics".equalsIgnoreCase(actionCommand)) { |
|
64 |
IWindow v = PluginServices.getMDIManager().getActiveWindow(); |
|
65 |
|
|
66 |
if (v != null) { |
|
67 |
if (v.getClass() == FeatureTableDocumentPanel.class) { |
|
68 |
|
|
69 |
FeatureTableDocumentPanel table = (FeatureTableDocumentPanel) v; |
|
70 |
|
|
71 |
doExecute(table); |
|
72 |
} |
|
73 |
} |
|
74 |
} |
|
75 |
|
|
79 | 76 |
} |
80 | 77 |
|
81 | 78 |
/** |
Also available in: Unified diff