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 |
package org.gvsig.app.extension; |
---|---|
2 |
|
3 |
import org.gvsig.andami.PluginServices; |
4 |
import org.gvsig.andami.plugins.Extension; |
5 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
6 |
import org.gvsig.app.project.documents.table.TableOperations; |
7 |
import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel; |
8 |
|
9 |
|
10 |
public abstract class AbstractTableEditExtension extends Extension{ |
11 |
protected FeatureTableDocumentPanel table=null; |
12 |
protected TableOperations featureTableOperations=null; |
13 |
|
14 |
/**
|
15 |
* @see org.gvsig.andami.plugins.IExtension#initialize()
|
16 |
*/
|
17 |
public void initialize() { |
18 |
featureTableOperations=TableOperations.getInstance(); |
19 |
} |
20 |
|
21 |
/**
|
22 |
* @see org.gvsig.andami.plugins.IExtension#isVisible()
|
23 |
*/
|
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 |
} |