Revision 38564 branches/v2_0_0_prep/extensions/extDalTransformJoin/src/org/gvsig/app/join/JoinToolExtension.java
JoinToolExtension.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import javax.swing.JOptionPane; |
33 | 33 |
|
34 |
import org.gvsig.andami.IconThemeHelper; |
|
34 | 35 |
import org.gvsig.andami.PluginServices; |
35 | 36 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
36 | 37 |
import org.gvsig.app.extension.TableOperations; |
... | ... | |
44 | 45 |
*/ |
45 | 46 |
public class JoinToolExtension extends TableOperations { |
46 | 47 |
|
48 |
public void initialize() { |
|
49 |
IconThemeHelper.registerIcon("action", "table-create-join", this); |
|
50 |
} |
|
51 |
|
|
47 | 52 |
/** |
48 | 53 |
* @see com.iver.mdiApp.plugins.IExtension#updateUI(java.lang.String) |
49 | 54 |
*/ |
50 | 55 |
public void execute(String actionCommand) { |
51 |
try { |
|
52 |
DataTransformWizard dataTransformWizard = DataTransformLocator.getDataTransformManager().createWizard(); |
|
53 |
dataTransformWizard.setDataTransformGui(new JoinTransformGui()); |
|
54 |
PluginServices.getMDIManager().addWindow(dataTransformWizard.getWindow()); |
|
55 |
} catch (Exception e) { |
|
56 |
|
|
57 |
IWindow iw = PluginServices.getMDIManager().getActiveWindow(); |
|
58 |
JOptionPane.showInternalMessageDialog( |
|
59 |
iw instanceof Component ? (Component) iw : null, |
|
60 |
PluginServices.getText(this, "transform_create_wizard_exception"), |
|
61 |
PluginServices.getText(this, "feature_transform"), |
|
62 |
JOptionPane.ERROR_MESSAGE); |
|
63 |
} |
|
56 |
if( "table-create-join".equalsIgnoreCase(actionCommand)) { |
|
57 |
try { |
|
58 |
DataTransformWizard dataTransformWizard = DataTransformLocator.getDataTransformManager().createWizard(); |
|
59 |
dataTransformWizard.setDataTransformGui(new JoinTransformGui()); |
|
60 |
PluginServices.getMDIManager().addWindow(dataTransformWizard.getWindow()); |
|
61 |
} catch (Exception e) { |
|
62 |
|
|
63 |
IWindow iw = PluginServices.getMDIManager().getActiveWindow(); |
|
64 |
JOptionPane.showInternalMessageDialog( |
|
65 |
iw instanceof Component ? (Component) iw : null, |
|
66 |
PluginServices.getText(this, "transform_create_wizard_exception"), |
|
67 |
PluginServices.getText(this, "feature_transform"), |
|
68 |
JOptionPane.ERROR_MESSAGE); |
|
69 |
} |
|
70 |
} |
|
64 | 71 |
} |
65 | 72 |
|
66 | 73 |
} |
Also available in: Unified diff