svn-gvsig-desktop / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / extension / AbstractTableEditExtension.java @ 34007
History | View | Annotate | Download (1.08 KB)
1 | 29596 | jpiera | package org.gvsig.app.extension; |
---|---|---|---|
2 | 26053 | vcaballero | |
3 | 29596 | jpiera | import org.gvsig.andami.PluginServices; |
4 | import org.gvsig.andami.plugins.Extension; |
||
5 | import org.gvsig.andami.ui.mdiManager.IWindow; |
||
6 | 31496 | jjdelcerro | import org.gvsig.app.project.documents.table.TableOperations; |
7 | 29596 | jpiera | import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel; |
8 | 26053 | vcaballero | |
9 | |||
10 | public abstract class AbstractTableEditExtension extends Extension{ |
||
11 | protected FeatureTableDocumentPanel table=null; |
||
12 | 31496 | jjdelcerro | protected TableOperations featureTableOperations=null; |
13 | 26053 | vcaballero | |
14 | /**
|
||
15 | 29596 | jpiera | * @see org.gvsig.andami.plugins.IExtension#initialize()
|
16 | 26053 | vcaballero | */
|
17 | public void initialize() { |
||
18 | 31496 | jjdelcerro | featureTableOperations=TableOperations.getInstance(); |
19 | 26053 | vcaballero | } |
20 | |||
21 | /**
|
||
22 | 29596 | jpiera | * @see org.gvsig.andami.plugins.IExtension#isVisible()
|
23 | 26053 | vcaballero | */
|
24 | public boolean isVisible() { |
||
25 | IWindow v = PluginServices.getMDIManager().getActiveWindow(); |
||
26 | if (v!=null && v instanceof FeatureTableDocumentPanel && ((FeatureTableDocumentPanel) v).getModel().getStore().isEditing()) { |
||
27 | table=(FeatureTableDocumentPanel)v; |
||
28 | return true; |
||
29 | } |
||
30 | return false; |
||
31 | } |
||
32 | |||
33 | } |