svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.geodb.app / org.gvsig.geodb.app.mainplugin / src / main / java / org / gvsig / geodb / workspace / WorkspaceExtension.java @ 44297
History | View | Annotate | Download (1.03 KB)
1 | 44297 | jjdelcerro | package org.gvsig.geodb.workspace; |
---|---|---|---|
2 | |||
3 | import org.apache.commons.lang3.StringUtils; |
||
4 | import org.gvsig.andami.plugins.Extension; |
||
5 | import org.gvsig.tools.swing.api.ToolsSwingLocator; |
||
6 | import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
||
7 | |||
8 | /**
|
||
9 | *
|
||
10 | * @author jjdelcerro
|
||
11 | */
|
||
12 | public class WorkspaceExtension extends Extension { |
||
13 | |||
14 | @Override
|
||
15 | public void initialize() { |
||
16 | } |
||
17 | |||
18 | @Override
|
||
19 | public void execute(String actionCommand) { |
||
20 | if( StringUtils.equalsIgnoreCase(actionCommand, "database-workspace-manage") ) { |
||
21 | WindowManager winManager = ToolsSwingLocator.getWindowManager(); |
||
22 | WorkspaceConfigurationPanel panel = new DefaultWorkspaceConfigurationPanel();
|
||
23 | winManager.showWindow( |
||
24 | panel.asJComponent(), |
||
25 | "Manage Dabatase workspace",
|
||
26 | WindowManager.MODE.WINDOW |
||
27 | ); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | @Override
|
||
32 | public boolean isEnabled() { |
||
33 | return true; |
||
34 | } |
||
35 | |||
36 | @Override
|
||
37 | public boolean isVisible() { |
||
38 | return true; |
||
39 | } |
||
40 | |||
41 | } |