Revision 24923 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/project/document/table/gui/FeatureTableDocumentPanel.java
FeatureTableDocumentPanel.java | ||
---|---|---|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
4 | 4 |
* of the Valencian Gobernment (CIT) |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
*
|
|
10 |
* |
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
*
|
|
15 |
* |
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 | 19 |
* MA 02110-1301, USA. |
20 |
*
|
|
20 |
* |
|
21 | 21 |
*/ |
22 | 22 |
|
23 | 23 |
/* |
... | ... | |
30 | 30 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
31 | 31 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
32 | 32 |
import org.gvsig.fmap.data.feature.swing.FeatureTablePanel; |
33 |
import org.gvsig.fmap.data.feature.swing.FeatureTypesTablePanel; |
|
34 |
import org.gvsig.project.document.table.FeatureTableDocument; |
|
33 | 35 |
|
36 |
import com.iver.andami.PluginServices; |
|
37 |
import com.iver.andami.ui.mdiManager.IWindowTransform; |
|
34 | 38 |
import com.iver.andami.ui.mdiManager.SingletonWindow; |
35 | 39 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
36 | 40 |
|
37 | 41 |
/** |
38 | 42 |
* Feature table visualization panel. |
39 |
*
|
|
43 |
* |
|
40 | 44 |
* @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a> |
41 | 45 |
*/ |
42 |
public class FeatureTableDocumentPanel extends FeatureTablePanel implements |
|
43 |
SingletonWindow { |
|
46 |
public class FeatureTableDocumentPanel extends FeatureTypesTablePanel implements
|
|
47 |
SingletonWindow, IWindowTransform {
|
|
44 | 48 |
// ,IWindowListener, IWindowTransform { |
45 | 49 |
|
46 | 50 |
private static final long serialVersionUID = -1003263265311764630L; |
... | ... | |
48 | 52 |
private static final int DEFAULT_HEIGHT = 200; |
49 | 53 |
|
50 | 54 |
private static final int DEFAULT_WIDTH = 300; |
51 |
|
|
55 |
|
|
56 |
private boolean isPalette=false; |
|
57 |
|
|
58 |
private WindowInfo windowInfo = null; |
|
59 |
|
|
60 |
private FeatureTableDocument model = null; |
|
61 |
|
|
52 | 62 |
/** |
53 | 63 |
* @see FeatureTablePanel#FeatureTablePanel(FeatureStore) |
54 | 64 |
*/ |
... | ... | |
86 | 96 |
// IWindow interface |
87 | 97 |
|
88 | 98 |
public WindowInfo getWindowInfo() { |
89 |
WindowInfo windowInfo = new WindowInfo(WindowInfo.ICONIFIABLE |
|
99 |
if (windowInfo==null) { |
|
100 |
windowInfo = new WindowInfo(WindowInfo.ICONIFIABLE |
|
90 | 101 |
| WindowInfo.MAXIMIZABLE | WindowInfo.RESIZABLE); |
91 | 102 |
|
92 | 103 |
// TODO: RETURN MORE USEFUL INFO ABOUT DATA VIEWED AND ADD I18N FOR |
... | ... | |
95 | 106 |
|
96 | 107 |
windowInfo.setWidth(DEFAULT_WIDTH); |
97 | 108 |
windowInfo.setHeight(DEFAULT_HEIGHT); |
109 |
} |
|
98 | 110 |
return windowInfo; |
99 | 111 |
} |
100 | 112 |
|
... | ... | |
104 | 116 |
return getTableModel(); |
105 | 117 |
} |
106 | 118 |
|
119 |
public void toPalette() { |
|
120 |
isPalette=true; |
|
121 |
windowInfo.toPalette(true); |
|
122 |
windowInfo.setClosed(false); |
|
123 |
PluginServices.getMDIManager().changeWindowInfo(this,getWindowInfo()); |
|
124 |
} |
|
125 |
|
|
126 |
public void restore() { |
|
127 |
isPalette=false; |
|
128 |
windowInfo.toPalette(false); |
|
129 |
windowInfo.setClosed(false); |
|
130 |
PluginServices.getMDIManager().changeWindowInfo(this,getWindowInfo()); |
|
131 |
} |
|
132 |
|
|
133 |
public boolean isPalette() { |
|
134 |
return isPalette; |
|
135 |
} |
|
136 |
public void setModel(FeatureTableDocument ftd){ |
|
137 |
model=ftd; |
|
138 |
} |
|
139 |
|
|
107 | 140 |
} |
Also available in: Unified diff