Revision 2310
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Mon Sep 07 09:17:56 CEST 2020 |
|
2 |
buildNumber=48 |
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
|
|
3 |
gvSIG. Desktop Geographic Information System. |
|
4 |
|
|
5 |
Copyright (C) 2007-2013 gvSIG Association. |
|
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
|
8 |
modify it under the terms of the GNU General Public License |
|
9 |
as published by the Free Software Foundation; either version 3 |
|
10 |
of the License, or (at your option) any later version. |
|
11 |
|
|
12 |
This program is distributed in the hope that it will be useful, |
|
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 |
GNU General Public License for more details. |
|
16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
|
18 |
along with this program; if not, write to the Free Software |
|
19 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
20 |
MA 02110-1301, USA. |
|
21 |
|
|
22 |
For any additional information, do not hesitate to contact us |
|
23 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
24 |
|
|
25 |
--> |
|
26 |
<assembly> |
|
27 |
<id>gvsig-plugin-package</id> |
|
28 |
<formats> |
|
29 |
<format>zip</format> |
|
30 |
</formats> |
|
31 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
32 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
33 |
<files> |
|
34 |
<file> |
|
35 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
36 |
<outputDirectory>lib</outputDirectory> |
|
37 |
</file> |
|
38 |
<file> |
|
39 |
<source>target/package.info</source> |
|
40 |
</file> |
|
41 |
</files> |
|
42 |
|
|
43 |
<fileSets> |
|
44 |
<fileSet> |
|
45 |
<directory>src/main/resources-plugin</directory> |
|
46 |
<outputDirectory>.</outputDirectory> |
|
47 |
</fileSet> |
|
48 |
</fileSets> |
|
49 |
|
|
50 |
|
|
51 |
<dependencySets> |
|
52 |
<dependencySet> |
|
53 |
<useProjectArtifact>false</useProjectArtifact> |
|
54 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
55 |
<outputDirectory>lib</outputDirectory> |
|
56 |
<includes> |
|
57 |
<include>org.gvsig:org.gvsig.report.lib.api</include> |
|
58 |
<include>org.gvsig:org.gvsig.report.lib.impl</include> |
|
59 |
<include>org.gvsig:org.gvsig.report.swing.api</include> |
|
60 |
<include>org.gvsig:org.gvsig.report.swing.impl</include> |
|
61 |
|
|
62 |
<include>org.apache.httpcomponents:httpcore-nio</include> |
|
63 |
<include>org.apache.httpcomponents:httpcore</include> |
|
64 |
|
|
65 |
<include>net.sf.jasperreports:jasperreports</include> |
|
66 |
<include>net.sf.jasperreports:jasperreports-metadata</include> |
|
67 |
<!-- |
|
68 |
<include>net.sf.jasperreports:jasperreports-fonts</include> |
|
69 |
Lleva dejavu, casi que prefiero la liberation. |
|
70 |
--> |
|
71 |
<include>net.sf.jasperreports:jasperreports-fonts-liberation</include> |
|
72 |
<include>net.sf.jasperreports:jasperreports-functions</include> |
|
73 |
<include>net.sf.jasperreports:jasperreports-custom-visualization</include> |
|
74 |
<!--<include>net.sf.jasperreports:jasperreports-chart-themes</include>--> |
|
75 |
<include>net.sf.jasperreports:jasperreports-chart-customizers</include> |
|
76 |
<include>net.sf.jasperreports:jasperreports-annotation-processors</include> |
|
77 |
|
|
78 |
<include>commons-beanutils:commons-beanutils</include> |
|
79 |
<include>commons-digester:commons-digester</include> |
|
80 |
<include>commons-logging:commons-logging</include> |
|
81 |
<include>com.lowagie:itext</include> |
|
82 |
<!-- |
|
83 |
<include>bouncycastle:bcmail-jdk14</include> |
|
84 |
<include>bouncycastle:bcprov-jdk14</include> |
|
85 |
<include>org.bouncycastle:bctsp-jdk14</include> |
|
86 |
<include>org.bouncycastle:bcprov-jdk14</include> |
|
87 |
<include>org.bouncycastle:bcmail-jdk14</include> |
|
88 |
--> |
|
89 |
<include>org.jfree:jcommon</include> |
|
90 |
<include>org.jfree:jfreechart</include> |
|
91 |
<include>org.eclipse.jdt.core.compiler:ecj</include> |
|
92 |
<include>org.codehaus.castor:castor-xml</include> |
|
93 |
<include>org.codehaus.castor:castor-core</include> |
|
94 |
<include>commons-lang:commons-lang</include> |
|
95 |
<include>javax.inject:javax.inject</include> |
|
96 |
<include>stax:stax</include> |
|
97 |
<include>org.springframework:spring-context</include> |
|
98 |
<include>org.springframework:spring-aop</include> |
|
99 |
<!--<include>aopalliance:aopalliance</include>--> |
|
100 |
<include>org.springframework:spring-beans</include> |
|
101 |
<include>org.springframework:spring-core</include> |
|
102 |
<include>org.springframework:spring-expression</include> |
|
103 |
<include>org.springframework:spring-asm</include> |
|
104 |
|
|
105 |
<!-- |
|
106 |
<include>stax:stax-api</include> |
|
107 |
--> |
|
108 |
<include>javax.xml.stream:stax-api</include> |
|
109 |
<include>com.fasterxml.jackson.core:jackson-core</include> |
|
110 |
<include>com.fasterxml.jackson.core:jackson-databind</include> |
|
111 |
<include>com.fasterxml.jackson.core:jackson-annotations</include> |
|
112 |
<include>com.ibm.icu:icu4j</include> |
|
113 |
|
|
114 |
<include>ar.com.fdvs:DynamicJasper</include> |
|
115 |
<!-- |
|
116 |
No se si es correcto incluir estas fuentes de letra. |
|
117 |
--> |
|
118 |
<include>ar.com.fdvs:DynamicJasper-core-fonts</include> |
|
119 |
|
|
120 |
|
|
121 |
|
|
122 |
</includes> |
|
123 |
</dependencySet> |
|
124 |
</dependencySets> |
|
125 |
|
|
126 |
</assembly> |
|
127 |
|
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/java/org/gvsig/report/app/mainplugin/ReportExtension.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 3 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.report.app.mainplugin; |
|
25 |
|
|
26 |
import java.awt.Dimension; |
|
27 |
import java.awt.event.ActionEvent; |
|
28 |
import java.util.ArrayList; |
|
29 |
import java.util.List; |
|
30 |
import javax.swing.AbstractAction; |
|
31 |
import javax.swing.Action; |
|
32 |
import static javax.swing.Action.ACTION_COMMAND_KEY; |
|
33 |
import static javax.swing.Action.NAME; |
|
34 |
import org.apache.commons.io.FileUtils; |
|
35 |
import org.apache.commons.lang3.StringUtils; |
|
36 |
import org.gvsig.andami.IconThemeHelper; |
|
37 |
import org.gvsig.andami.plugins.Extension; |
|
38 |
import org.gvsig.app.ApplicationLocator; |
|
39 |
import org.gvsig.app.ApplicationManager; |
|
40 |
import org.gvsig.app.project.ProjectManager; |
|
41 |
import org.gvsig.app.project.documents.table.TableDocument; |
|
42 |
import org.gvsig.app.project.documents.table.TableManager; |
|
43 |
import org.gvsig.app.project.documents.table.gui.FeatureTableDocumentPanel; |
|
44 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
45 |
import org.gvsig.app.project.documents.view.ViewManager; |
|
46 |
import org.gvsig.configurableactions.ConfigurableActionsMamager; |
|
47 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
48 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
49 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel; |
|
50 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
51 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
52 |
import org.gvsig.propertypage.PropertiesPageManager; |
|
53 |
import org.gvsig.report.app.mainplugin.document.gui.projectpanel.ProjectReportPanelPageFactory; |
|
54 |
import org.gvsig.report.lib.api.Report; |
|
55 |
import org.gvsig.report.lib.api.ReportConfig; |
|
56 |
import org.gvsig.report.lib.api.ReportDataSets; |
|
57 |
import org.gvsig.report.lib.api.ReportLocator; |
|
58 |
import org.gvsig.report.lib.api.ReportManager; |
|
59 |
import org.gvsig.report.lib.api.ReportServerConfig; |
|
60 |
import org.gvsig.report.swing.api.JReport; |
|
61 |
import org.gvsig.report.swing.api.ReportSwingLocator; |
|
62 |
import org.gvsig.report.swing.api.ReportSwingManager; |
|
63 |
import org.gvsig.tools.ToolsLocator; |
|
64 |
import org.gvsig.tools.dynobject.DynObject; |
|
65 |
import org.gvsig.tools.exception.BaseException; |
|
66 |
import org.gvsig.tools.i18n.I18nManager; |
|
67 |
import org.gvsig.tools.observer.Notification; |
|
68 |
import org.gvsig.tools.observer.Observable; |
|
69 |
import org.gvsig.tools.observer.Observer; |
|
70 |
import org.gvsig.tools.resourcesstorage.FilesResourcesStorage; |
|
71 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
72 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
73 |
import org.gvsig.tools.visitor.VisitCanceledException; |
|
74 |
import org.gvsig.tools.visitor.Visitor; |
|
75 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
76 |
|
|
77 |
/** |
|
78 |
* |
|
79 |
* @author jjdelcerro |
|
80 |
*/ |
|
81 |
@SuppressWarnings("UseSpecificCatch") |
|
82 |
public class ReportExtension extends Extension { |
|
83 |
|
|
84 |
/* |
|
85 |
https://community.jaspersoft.com/jaspersoft-studio/issues/8416 |
|
86 |
https://community.jaspersoft.com/wiki/webservice-datasource-documentation |
|
87 |
|
|
88 |
*/ |
|
89 |
private ReportState reportState; |
|
90 |
|
|
91 |
@Override |
|
92 |
public void initialize() { |
|
93 |
IconThemeHelper.registerIcon("report", "report-publish-layer", this); |
|
94 |
IconThemeHelper.registerIcon("report", "report-publish-table", this); |
|
95 |
this.reportState = ReportState.get(); |
|
96 |
} |
|
97 |
|
|
98 |
@Override |
|
99 |
public void postInitialize() { |
|
100 |
new org.gvsig.report.app.mainplugin.document.ReportDocumentsManager().selfRegister(); |
|
101 |
|
|
102 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
103 |
ProjectManager projectManager = application.getProjectManager(); |
|
104 |
ViewManager viewManager = (ViewManager) projectManager.getDocumentManager(ViewManager.TYPENAME); |
|
105 |
viewManager.addTOCContextAction("report-publish-layer"); |
|
106 |
|
|
107 |
PropertiesPageManager propertiesManager = ToolsUtilLocator.getPropertiesPageManager(); |
|
108 |
propertiesManager.registerFactory(new ProjectReportPanelPageFactory()); |
|
109 |
|
|
110 |
StoreReportsAction.ReportsActionFactory.selfRegister(); |
|
111 |
|
|
112 |
registerInCatalog(); |
|
113 |
|
|
114 |
ConfigurableActionsMamager cfgActionsManager = ToolsUtilLocator.getConfigurableActionsMamager(); |
|
115 |
cfgActionsManager.addConfigurableAction(FeatureTypePanel.CONFIGURABLE_PANEL_ID, new ShowReportAction()); |
|
116 |
|
|
117 |
} |
|
118 |
|
|
119 |
private void registerInCatalog() { |
|
120 |
final ApplicationManager application = ApplicationLocator.getApplicationManager(); |
|
121 |
application.addPropertiesObserver(new Observer() { |
|
122 |
@Override |
|
123 |
public void update(Observable observable, Object notification) { |
|
124 |
if (!(notification instanceof Notification)) { |
|
125 |
return; |
|
126 |
} |
|
127 |
String propertyName = (String) ((Notification) notification).getValue(0); |
|
128 |
if (!StringUtils.equalsIgnoreCase(propertyName, "Catalog.Manager")) { |
|
129 |
return; |
|
130 |
} |
|
131 |
DynObject catalogManager = (DynObject) application.getProperty("Catalog.Manager"); |
|
132 |
if (catalogManager == null) { |
|
133 |
return; |
|
134 |
} |
|
135 |
try { |
|
136 |
String[] catalogNodes = new String[]{ |
|
137 |
"STORES_REPOSITORY_TABLE", |
|
138 |
"DATABASE_TABLE", |
|
139 |
"FOLDERS_FILE", |
|
140 |
"BOOKMARKS_BOOKMARK" |
|
141 |
}; |
|
142 |
for (String catalogNode : catalogNodes) { |
|
143 |
Object action = catalogManager.invokeDynMethod( |
|
144 |
"getAction", |
|
145 |
new Object[]{ |
|
146 |
AddDatasetFromCatalogAction.NAME, |
|
147 |
catalogNode |
|
148 |
} |
|
149 |
); |
|
150 |
if (action == null) { |
|
151 |
catalogManager.invokeDynMethod( |
|
152 |
"addAction", |
|
153 |
new Object[]{ |
|
154 |
AddDatasetFromCatalogAction.NAME, |
|
155 |
catalogNode, |
|
156 |
new AddDatasetFromCatalogAction() |
|
157 |
} |
|
158 |
); |
|
159 |
} |
|
160 |
} |
|
161 |
} catch (Exception ex) { |
|
162 |
logger.warn("Can't add action to catalog", ex); |
|
163 |
} |
|
164 |
} |
|
165 |
}); |
|
166 |
} |
|
167 |
|
|
168 |
@Override |
|
169 |
public void execute(String action) { |
|
170 |
final I18nManager i18n = ToolsLocator.getI18nManager(); |
|
171 |
final ApplicationManager application = ApplicationLocator.getManager(); |
|
172 |
final ReportSwingManager reportSwingManager = ReportSwingLocator.getReportSwingManager(); |
|
173 |
|
|
174 |
if (StringUtils.equalsIgnoreCase(action, "report-publish-layer")) { |
|
175 |
ViewDocument view = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
176 |
if (view == null) { |
|
177 |
return; |
|
178 |
} |
|
179 |
final List<FLyrVect> layers = new ArrayList<>(); |
|
180 |
try { |
|
181 |
view.getMapContext().getLayers().accept(new Visitor() { |
|
182 |
@Override |
|
183 |
public void visit(Object o) throws VisitCanceledException, BaseException { |
|
184 |
FLayer layer = (FLayer) o; |
|
185 |
if (layer instanceof FLyrVect && layer.isActive()) { |
|
186 |
layers.add((FLyrVect) layer); |
|
187 |
} |
|
188 |
} |
|
189 |
}); |
|
190 |
} catch (Exception ex) { |
|
191 |
logger.warn("Can't publish layers.", ex); |
|
192 |
} |
|
193 |
if (!layers.isEmpty()) { |
|
194 |
ReportServerConfig config = this.reportState.getConfig(); |
|
195 |
ReportDataSets datasets = config.getDatasets(); |
|
196 |
for (FLyrVect layer : layers) { |
|
197 |
if (datasets.contains(layer.getFeatureStore())) { |
|
198 |
//continue; |
|
199 |
} |
|
200 |
datasets.add( |
|
201 |
layer.getName(), |
|
202 |
layer.getFeatureStore() |
|
203 |
); |
|
204 |
} |
|
205 |
} |
|
206 |
} |
|
207 |
if (StringUtils.equalsIgnoreCase(action, "report-publish-table")) { |
|
208 |
TableDocument doc = (TableDocument) application.getActiveDocument(TableManager.TYPENAME); |
|
209 |
if (doc == null) { |
|
210 |
return; |
|
211 |
} |
|
212 |
FeatureTableDocumentPanel tablePanel = (FeatureTableDocumentPanel) doc.getMainComponent(); |
|
213 |
FeatureStore store = tablePanel.getFeatureStore(); |
|
214 |
ReportServerConfig config = this.reportState.getConfig(); |
|
215 |
ReportDataSets datasets = config.getDatasets(); |
|
216 |
datasets.add(doc.getName(), store); |
|
217 |
} |
|
218 |
} |
|
219 |
|
|
220 |
@Override |
|
221 |
public boolean canQueryByAction() { |
|
222 |
return true; |
|
223 |
} |
|
224 |
|
|
225 |
@Override |
|
226 |
public boolean isEnabled(String action) { |
|
227 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
228 |
if (StringUtils.equalsIgnoreCase(action, "report-publish-layer")) { |
|
229 |
ViewDocument view = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
230 |
if (view == null) { |
|
231 |
return false; |
|
232 |
} |
|
233 |
return view.getMapContext().hasActiveVectorLayers(); |
|
234 |
} |
|
235 |
if (StringUtils.equalsIgnoreCase(action, "report-publish-table")) { |
|
236 |
return true; |
|
237 |
} |
|
238 |
return false; |
|
239 |
} |
|
240 |
|
|
241 |
@Override |
|
242 |
public boolean isVisible(String action) { |
|
243 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
244 |
if (StringUtils.equalsIgnoreCase(action, "report-publish-layer")) { |
|
245 |
ViewDocument view = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
246 |
return view != null; |
|
247 |
} |
|
248 |
if (StringUtils.equalsIgnoreCase(action, "report-publish-table")) { |
|
249 |
TableDocument doc = (TableDocument) application.getActiveDocument(TableManager.TYPENAME); |
|
250 |
return doc != null; |
|
251 |
} |
|
252 |
return false; |
|
253 |
} |
|
254 |
|
|
255 |
@Override |
|
256 |
public boolean isEnabled() { |
|
257 |
return false; |
|
258 |
} |
|
259 |
|
|
260 |
@Override |
|
261 |
public boolean isVisible() { |
|
262 |
return false; |
|
263 |
} |
|
264 |
|
|
265 |
private class ShowReportAction extends AbstractAction { |
|
266 |
|
|
267 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
|
268 |
public ShowReportAction() { |
|
269 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
270 |
|
|
271 |
this.putValue(NAME, i18n.getTranslation("_Show_report")); |
|
272 |
this.putValue(ACTION_COMMAND_KEY, "ShowReport"); |
|
273 |
this.putValue( |
|
274 |
Action.SMALL_ICON, |
|
275 |
ToolsSwingLocator.getIconThemeManager().getCurrent().get("report-select-reports") |
|
276 |
); |
|
277 |
} |
|
278 |
|
|
279 |
@Override |
|
280 |
public void actionPerformed(ActionEvent ae) { |
|
281 |
FeatureTypePanel panel = (FeatureTypePanel) ae.getSource(); |
|
282 |
EditableFeatureType featureType = panel.fetch(null); |
|
283 |
FeatureStore store = featureType.getAsFeatureStore(); |
|
284 |
|
|
285 |
ReportManager reportManager = ReportLocator.getReportManager(); |
|
286 |
FilesResourcesStorage resourceStorage = new FilesResourcesStorage( |
|
287 |
FileUtils.getFile( |
|
288 |
getPlugin().getPluginDirectory(), |
|
289 |
"reports" |
|
290 |
).getAbsolutePath() |
|
291 |
); |
|
292 |
ReportConfig reportConfig = reportManager.createReportConfig(); |
|
293 |
reportConfig.setReportResourcesStorage(resourceStorage); |
|
294 |
reportConfig.setDataSet(reportManager.createDataSet(store)); |
|
295 |
reportConfig.setReportTemplate("featuretype.jasper"); |
|
296 |
Report report = reportManager.createReport(reportConfig); |
|
297 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
298 |
WindowManager winManager = ToolsSwingLocator.getWindowManager(); |
|
299 |
ReportSwingManager reportSwingManager = ReportSwingLocator.getReportSwingManager(); |
|
300 |
JReport reportPanel = reportSwingManager.createJReport(report); |
|
301 |
reportPanel.asJComponent().setPreferredSize(new Dimension(800, 500)); |
|
302 |
winManager.showWindow( |
|
303 |
reportPanel.asJComponent(), |
|
304 |
i18n.getTranslation("_Report") + ": " + report.getName(), |
|
305 |
WindowManager.MODE.WINDOW |
|
306 |
); |
|
307 |
|
|
308 |
} |
|
309 |
} |
|
310 |
|
|
311 |
} |
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/java/org/gvsig/report/app/mainplugin/StoreReportsAction.java | ||
---|---|---|
1 |
package org.gvsig.report.app.mainplugin; |
|
2 |
|
|
3 |
import java.awt.Dimension; |
|
4 |
import java.awt.event.ActionEvent; |
|
5 |
import java.awt.event.ActionListener; |
|
6 |
import java.io.InputStream; |
|
7 |
import java.net.URL; |
|
8 |
import java.util.ArrayList; |
|
9 |
import java.util.List; |
|
10 |
import javax.json.Json; |
|
11 |
import javax.json.JsonObject; |
|
12 |
import javax.swing.AbstractAction; |
|
13 |
import javax.swing.Action; |
|
14 |
import javax.swing.JComponent; |
|
15 |
import javax.swing.JMenuItem; |
|
16 |
import javax.swing.JPopupMenu; |
|
17 |
import org.apache.commons.io.IOUtils; |
|
18 |
import org.gvsig.app.ApplicationLocator; |
|
19 |
import org.gvsig.app.project.DocumentsContainerNotification; |
|
20 |
import org.gvsig.app.project.Project; |
|
21 |
import org.gvsig.expressionevaluator.Expression; |
|
22 |
import org.gvsig.fmap.dal.DataStore; |
|
23 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
|
24 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
25 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
26 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
|
27 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
|
28 |
import org.gvsig.report.lib.api.Report; |
|
29 |
import org.gvsig.report.lib.api.ReportDataSet; |
|
30 |
import org.gvsig.report.lib.api.ReportLocator; |
|
31 |
import org.gvsig.report.swing.api.JReport; |
|
32 |
import org.gvsig.report.swing.api.ReportSwingLocator; |
|
33 |
import org.gvsig.report.swing.api.ReportSwingManager; |
|
34 |
import org.gvsig.tools.ToolsLocator; |
|
35 |
import org.gvsig.tools.i18n.I18nManager; |
|
36 |
import org.gvsig.tools.observer.Observable; |
|
37 |
import org.gvsig.tools.observer.Observer; |
|
38 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
39 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
40 |
import org.gvsig.tools.swing.icontheme.IconTheme; |
|
41 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
|
42 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage.Resource; |
|
43 |
import org.slf4j.Logger; |
|
44 |
import org.slf4j.LoggerFactory; |
|
45 |
import org.gvsig.fmap.dal.swing.DALActionFactory; |
|
46 |
import org.gvsig.fmap.dal.swing.DALActionFactory.DALActionContext; |
|
47 |
import org.gvsig.report.lib.api.ReportBuilder; |
|
48 |
import org.gvsig.report.lib.api.ReportConfig; |
|
49 |
import org.gvsig.report.lib.api.ReportManager; |
|
50 |
import org.gvsig.report.swing.api.JReportBuilder; |
|
51 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
|
52 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
|
53 |
import org.gvsig.tools.swing.impl.windowmanager.DefaultDialog; |
|
54 |
|
|
55 |
/** |
|
56 |
* |
|
57 |
* @author jjdelcerro |
|
58 |
*/ |
|
59 |
@SuppressWarnings("UseSpecificCatch") |
|
60 |
public class StoreReportsAction |
|
61 |
extends AbstractAction { |
|
62 |
|
|
63 |
public static String ACTION_NAME = "Reports"; |
|
64 |
|
|
65 |
public static class ReportsActionFactory implements DALActionFactory { |
|
66 |
|
|
67 |
@Override |
|
68 |
public String getName() { |
|
69 |
return ACTION_NAME; |
|
70 |
} |
|
71 |
|
|
72 |
@Override |
|
73 |
public Action createAction(DALActionContext context) { |
|
74 |
return new StoreReportsAction(context); |
|
75 |
} |
|
76 |
|
|
77 |
@Override |
|
78 |
public boolean isApplicable(DALActionContext context) { |
|
79 |
return true; |
|
80 |
} |
|
81 |
|
|
82 |
public static void selfRegister() { |
|
83 |
DataSwingManager dalSwingManager = DALSwingLocator.getSwingManager(); |
|
84 |
dalSwingManager.registerStoreAction(new ReportsActionFactory()); |
|
85 |
String[][] iconNames = new String[][]{ |
|
86 |
new String[]{"Report", "report-select-reports"} |
|
87 |
}; |
|
88 |
IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent(); |
|
89 |
for (String[] icon : iconNames) { |
|
90 |
URL url = StoreReportsAction.class.getResource("/images/report/" + icon[1] + ".png"); |
|
91 |
theme.registerDefault("Report", icon[0], icon[1], null, url); |
|
92 |
} |
|
93 |
} |
|
94 |
|
|
95 |
} |
|
96 |
|
|
97 |
private static final Logger LOGGER = LoggerFactory.getLogger(StoreReportsAction.class); |
|
98 |
|
|
99 |
private final DALActionContext context; |
|
100 |
|
|
101 |
public StoreReportsAction(DALActionContext context) { |
|
102 |
this.context = context; |
|
103 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
104 |
this.putValue( |
|
105 |
Action.ACTION_COMMAND_KEY, |
|
106 |
ACTION_NAME |
|
107 |
); |
|
108 |
this.putValue( |
|
109 |
Action.SHORT_DESCRIPTION, |
|
110 |
i18n.getTranslation("_Reports") |
|
111 |
); |
|
112 |
this.putValue( |
|
113 |
Action.SMALL_ICON, |
|
114 |
ToolsSwingLocator.getIconThemeManager().getCurrent().get("report-select-reports") |
|
115 |
); |
|
116 |
Project project = ApplicationLocator.getProjectManager().getCurrentProject(); |
|
117 |
project.addObserver(new Observer() { |
|
118 |
@Override |
|
119 |
public void update(Observable observable, Object notification) { |
|
120 |
if (notification instanceof DocumentsContainerNotification) { |
|
121 |
DocumentsContainerNotification n = (DocumentsContainerNotification) notification; |
|
122 |
switch (n.getNotificationType()) { |
|
123 |
case DocumentsContainerNotification.AFTER_ADD_DOCUMENT: |
|
124 |
case DocumentsContainerNotification.AFTER_REMOVE_DOCUMENT: |
|
125 |
updateEnabled(); |
|
126 |
} |
|
127 |
} |
|
128 |
} |
|
129 |
}); |
|
130 |
updateEnabled(); |
|
131 |
} |
|
132 |
|
|
133 |
private List<ReportConfig> getReports(Project project, FeatureStore store, FeatureQuery query) { |
|
134 |
List<ReportConfig> reports = new ArrayList<>(); |
|
135 |
ResourcesStorage resources = store.getResourcesStorage(); |
|
136 |
if (resources != null) { |
|
137 |
List<Resource> reportsResources = resources.getResources("report"); |
|
138 |
if (reportsResources != null && !reportsResources.isEmpty()) { |
|
139 |
org.gvsig.report.lib.api.ReportManager manager = ReportLocator.getReportManager(); |
|
140 |
for (Resource resource : reportsResources) { |
|
141 |
InputStream is = null; |
|
142 |
try { |
|
143 |
is = resource.asInputStream(); |
|
144 |
JsonObject json = Json.createReader(is).readObject(); |
|
145 |
ReportConfig reportConfig = manager.createReportConfig(); |
|
146 |
reportConfig.fromJSON(json); |
|
147 |
if (!reportConfig.hasDataSet()) { |
|
148 |
reportConfig.setDataSet(manager.createDataSet(store, query)); |
|
149 |
} |
|
150 |
reports.add(reportConfig); |
|
151 |
} catch (Exception ex) { |
|
152 |
LOGGER.warn("Can't load report form resource (" + resource.getURL() + ")", ex); |
|
153 |
} finally { |
|
154 |
IOUtils.closeQuietly(is); |
|
155 |
} |
|
156 |
} |
|
157 |
} |
|
158 |
} |
|
159 |
if (reports.isEmpty()) { |
|
160 |
return null; |
|
161 |
} |
|
162 |
return reports; |
|
163 |
} |
|
164 |
|
|
165 |
private void updateEnabled() { |
|
166 |
Project project = ApplicationLocator.getProjectManager().getCurrentProject(); |
|
167 |
DataStore store = this.context.getStore(); |
|
168 |
if (!(store instanceof FeatureStore)) { |
|
169 |
return; |
|
170 |
} |
|
171 |
List<ReportConfig> reports = this.getReports(project, (FeatureStore) store, this.context.getQuery()); |
|
172 |
if (reports == null || reports.isEmpty()) { |
|
173 |
this.setEnabled(false); |
|
174 |
} else { |
|
175 |
this.setEnabled(true); |
|
176 |
} |
|
177 |
} |
|
178 |
|
|
179 |
@Override |
|
180 |
public void actionPerformed(ActionEvent e) { |
|
181 |
try { |
|
182 |
this.setEnabled(false); |
|
183 |
DataStore store = this.context.getStore(); |
|
184 |
if (!(store instanceof FeatureStore)) { |
|
185 |
return; |
|
186 |
} |
|
187 |
JPopupMenu popup = new JPopupMenu(); |
|
188 |
Project project = ApplicationLocator.getProjectManager().getCurrentProject(); |
|
189 |
List<ReportConfig> reports = this.getReports(project, (FeatureStore) store, this.context.getQuery()); |
|
190 |
if (reports != null && !reports.isEmpty()) { |
|
191 |
for (ReportConfig report : reports) { |
|
192 |
popup.add(this.createItem(report)); |
|
193 |
} |
|
194 |
popup.addSeparator(); |
|
195 |
} |
|
196 |
popup.add(this.createReportBuilderItem()); |
|
197 |
JComponent button = this.context.getActionButton(ACTION_NAME); |
|
198 |
popup.show(button, 0, button.getHeight()); |
|
199 |
} catch (Exception ex) { |
|
200 |
LOGGER.warn("Can't show form", ex); |
|
201 |
} finally { |
|
202 |
this.setEnabled(true); |
|
203 |
} |
|
204 |
} |
|
205 |
|
|
206 |
private JMenuItem createItem(final ReportConfig reportConfig) { |
|
207 |
JMenuItem item = new JMenuItem(reportConfig.getName()); |
|
208 |
item.addActionListener(new ActionListener() { |
|
209 |
@Override |
|
210 |
public void actionPerformed(ActionEvent e) { |
|
211 |
Report report = reportConfig.createReport(); |
|
212 |
doShowReport(report); |
|
213 |
} |
|
214 |
}); |
|
215 |
return item; |
|
216 |
} |
|
217 |
|
|
218 |
private JMenuItem createReportBuilderItem() { |
|
219 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
220 |
JMenuItem item = new JMenuItem(i18n.getTranslation("_User_defined")); |
|
221 |
item.addActionListener(new ActionListener() { |
|
222 |
@Override |
|
223 |
public void actionPerformed(ActionEvent e) { |
|
224 |
WindowManager_v2 winmgr = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
225 |
ReportSwingManager reportSwingManager = ReportSwingLocator.getReportSwingManager(); |
|
226 |
final ReportManager reportManager = ReportLocator.getReportManager(); |
|
227 |
|
|
228 |
final FeatureStore store = (FeatureStore) context.getStore(); |
|
229 |
|
|
230 |
FeatureType featureType; |
|
231 |
try { |
|
232 |
featureType = store.getDefaultFeatureType(); |
|
233 |
} catch (Exception ex) { |
|
234 |
// TODO: Deberia hacer algo mas? |
|
235 |
LOGGER.warn("Can't get feature type to make JReportBuilder", ex); |
|
236 |
return; |
|
237 |
} |
|
238 |
|
|
239 |
final ReportBuilder builder = reportManager.createReportBuilder(); |
|
240 |
final JReportBuilder panel = reportSwingManager.createJReportBuilder(); |
|
241 |
panel.setFeatureType(featureType); |
|
242 |
|
|
243 |
builder.title(store.getName()); |
|
244 |
panel.put(builder); |
|
245 |
final Dialog dialog = winmgr.createDialog( |
|
246 |
panel.asJComponent(), |
|
247 |
i18n.getTranslation("_Report_builder"), |
|
248 |
null, |
|
249 |
WindowManager_v2.BUTTONS_APPLY_OK_CANCEL |
|
250 |
); |
|
251 |
dialog.setAutoclose(false); |
|
252 |
|
|
253 |
|
|
254 |
dialog.addActionListener(new ActionListener() { |
|
255 |
@Override |
|
256 |
public void actionPerformed(ActionEvent e) { |
|
257 |
if (dialog.getAction() == WindowManager_v2.BUTTON_CANCEL) { |
|
258 |
((DefaultDialog) dialog).setVisible(false); |
|
259 |
return; |
|
260 |
} |
|
261 |
|
|
262 |
StringBuilder msg = new StringBuilder(); |
|
263 |
FeatureQuery fquery = context.getQuery().getCopy(); |
|
264 |
panel.setFeatureQuery(fquery); |
|
265 |
if (!panel.checkPanel(msg)) { |
|
266 |
return; |
|
267 |
} |
|
268 |
ReportBuilder fetchBuilder = reportManager.createReportBuilder(); |
|
269 |
panel.fetch(fetchBuilder); |
|
270 |
if (dialog.getAction() == WindowManager_v2.BUTTONS_OK) { |
|
271 |
((DefaultDialog) dialog).setVisible(false); |
|
272 |
} |
|
273 |
|
|
274 |
ReportDataSet reportDataSet = reportManager.createDataSet(store, fquery); |
|
275 |
Report report = fetchBuilder.toReport(reportDataSet); |
|
276 |
doShowReport(report); |
|
277 |
|
|
278 |
} |
|
279 |
}); |
|
280 |
dialog.show(WindowManager.MODE.WINDOW); |
|
281 |
} |
|
282 |
}); |
|
283 |
return item; |
|
284 |
} |
|
285 |
|
|
286 |
private void doShowReport(Report report) { |
|
287 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
288 |
WindowManager winManager = ToolsSwingLocator.getWindowManager(); |
|
289 |
|
|
290 |
ReportSwingManager swingManager = ReportSwingLocator.getReportSwingManager(); |
|
291 |
FeatureQuery query = this.context.getQuery().getCopy(); |
|
292 |
Expression filter; |
|
293 |
if (this.context.getSelectedsCount() > 0) { |
|
294 |
filter = this.context.getFilterForSelecteds(); |
|
295 |
} else { |
|
296 |
filter = query.getExpressionFilter(); |
|
297 |
} |
|
298 |
|
|
299 |
query.retrievesAllAttributes(); |
|
300 |
JReport reportPanel = swingManager.createJReport(report, filter); |
|
301 |
reportPanel.asJComponent().setPreferredSize(new Dimension(800, 500)); |
|
302 |
winManager.showWindow( |
|
303 |
reportPanel.asJComponent(), |
|
304 |
i18n.getTranslation("_Report") + ": " + report.getName(), |
|
305 |
WindowManager.MODE.WINDOW |
|
306 |
); |
|
307 |
} |
|
308 |
} |
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/java/org/gvsig/report/app/mainplugin/AddDatasetFromCatalogAction.java | ||
---|---|---|
1 |
package org.gvsig.report.app.mainplugin; |
|
2 |
|
|
3 |
import java.awt.event.ActionEvent; |
|
4 |
import javax.swing.AbstractAction; |
|
5 |
import javax.swing.Action; |
|
6 |
import javax.swing.JOptionPane; |
|
7 |
import org.gvsig.fmap.dal.DALLocator; |
|
8 |
import org.gvsig.fmap.dal.DataManager; |
|
9 |
import org.gvsig.fmap.dal.DataStore; |
|
10 |
import org.gvsig.fmap.dal.OpenDataStoreParameters; |
|
11 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
12 |
import org.gvsig.report.lib.api.ReportDataSets; |
|
13 |
import org.gvsig.report.lib.api.ReportLocator; |
|
14 |
import org.gvsig.report.lib.api.ReportManager; |
|
15 |
import org.gvsig.tools.ToolsLocator; |
|
16 |
import org.gvsig.tools.i18n.I18nManager; |
|
17 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
18 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
|
19 |
import org.slf4j.Logger; |
|
20 |
import org.slf4j.LoggerFactory; |
|
21 |
|
|
22 |
/** |
|
23 |
* |
|
24 |
* @author jjdelcerro |
|
25 |
*/ |
|
26 |
@SuppressWarnings("UseSpecificCatch") |
|
27 |
public class AddDatasetFromCatalogAction extends AbstractAction { |
|
28 |
|
|
29 |
private static final Logger LOGGER = LoggerFactory.getLogger(AddDatasetFromCatalogAction.class); |
|
30 |
|
|
31 |
public static final String NAME = "PublishForReportDesigner"; |
|
32 |
|
|
33 |
public AddDatasetFromCatalogAction() { |
|
34 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
35 |
this.putValue( |
|
36 |
Action.ACTION_COMMAND_KEY, |
|
37 |
NAME |
|
38 |
); |
|
39 |
this.putValue( |
|
40 |
Action.NAME, |
|
41 |
i18n.getTranslation("_Publish_for_report_designer") |
|
42 |
); |
|
43 |
this.putValue( |
|
44 |
Action.SMALL_ICON, |
|
45 |
ToolsSwingLocator.getIconThemeManager().getCurrent().get("report-publish-layer") |
|
46 |
); |
|
47 |
|
|
48 |
} |
|
49 |
|
|
50 |
@Override |
|
51 |
public void actionPerformed(ActionEvent e) { |
|
52 |
try { |
|
53 |
ReportManager reportManager = ReportLocator.getReportManager(); |
|
54 |
ReportDataSets datasets = reportManager.getDefaultServer().getConfig().getDatasets(); |
|
55 |
|
|
56 |
OpenDataStoreParameters storeParams = (OpenDataStoreParameters) e.getSource(); |
|
57 |
DataManager dataManager = DALLocator.getDataManager(); |
|
58 |
DataStore store = dataManager.openStore(storeParams.getProviderName(), storeParams); |
|
59 |
|
|
60 |
datasets.add(store.getName(), (FeatureStore) store); |
|
61 |
} catch (Exception ex) { |
|
62 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
63 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
64 |
dialogs.messageDialog( |
|
65 |
i18n.getTranslation("_The_indicated_data_source_does_not_support_this_operation"), |
|
66 |
null, |
|
67 |
i18n.getTranslation("_Warning"), |
|
68 |
JOptionPane.WARNING_MESSAGE, |
|
69 |
"CantPublishStoreForReportDesigner" |
|
70 |
); |
|
71 |
LOGGER.warn("Can't publish store for report designer.", ex); |
|
72 |
} |
|
73 |
} |
|
74 |
|
|
75 |
} |
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/java/org/gvsig/report/app/mainplugin/ReportState.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.report.app.mainplugin; |
|
3 |
|
|
4 |
import java.beans.PropertyChangeEvent; |
|
5 |
import java.beans.PropertyChangeListener; |
|
6 |
import java.io.File; |
|
7 |
import java.util.EventListener; |
|
8 |
import javax.swing.SwingUtilities; |
|
9 |
import org.apache.commons.collections.buffer.CircularFifoBuffer; |
|
10 |
import org.apache.commons.lang3.tuple.ImmutablePair; |
|
11 |
import org.gvsig.app.ApplicationLocator; |
|
12 |
import org.gvsig.app.ApplicationManager; |
|
13 |
import org.gvsig.app.project.Project; |
|
14 |
import org.gvsig.app.project.ProjectManager; |
|
15 |
import org.gvsig.app.project.ProjectNotification; |
|
16 |
import org.gvsig.report.lib.api.ReportLocator; |
|
17 |
import org.gvsig.report.lib.api.ReportManager; |
|
18 |
import org.gvsig.report.lib.api.ReportServer; |
|
19 |
import org.gvsig.report.lib.api.ReportServerConfig; |
|
20 |
import org.gvsig.report.swing.api.JReportServer; |
|
21 |
import org.gvsig.report.swing.api.ReportSwingLocator; |
|
22 |
import org.gvsig.report.swing.api.ReportSwingManager; |
|
23 |
import org.gvsig.tools.observer.Observable; |
|
24 |
import org.gvsig.tools.observer.Observer; |
|
25 |
import org.gvsig.tools.util.BaseListenerSupport; |
|
26 |
|
|
27 |
/** |
|
28 |
* |
|
29 |
* @author jjdelcerro |
|
30 |
*/ |
|
31 |
public class ReportState { |
|
32 |
|
|
33 |
private static final String REPORTS_CONFIG = "reports.config"; |
|
34 |
|
|
35 |
private static ReportState reportState = null; |
|
36 |
|
|
37 |
public static ReportState get() { |
|
38 |
if( reportState == null ) { |
|
39 |
reportState = new ReportState(); |
|
40 |
} |
|
41 |
return reportState; |
|
42 |
} |
|
43 |
|
|
44 |
private ReportServer server = null; |
|
45 |
private JReportServer serverPanel = null; |
|
46 |
private CircularFifoBuffer serverlog = null; |
|
47 |
private ReportServer.LoggerListener logListener = null; |
|
48 |
private AppReportServices services = null; |
|
49 |
|
|
50 |
private ReportState() { |
|
51 |
this.initServer(null, null); |
|
52 |
ProjectManager projectManager = ProjectManager.getInstance(); |
|
53 |
projectManager.addProjectListener(new BaseListenerSupport.NotificationListener() { |
|
54 |
@Override |
|
55 |
public void notify(EventListener event) { |
|
56 |
if( event instanceof ProjectManager.NewProjectEvent ) { |
|
57 |
initServer(null, null); |
|
58 |
onNewProject(((ProjectManager.NewProjectEvent)event).getProject()); |
|
59 |
|
|
60 |
} |
|
61 |
} |
|
62 |
}); |
|
63 |
Project project = projectManager.getCurrentProject(); |
|
64 |
if( project!=null ) { |
|
65 |
project.setProperty(this, this); |
|
66 |
} |
|
67 |
} |
|
68 |
|
|
69 |
private void onNewProject(Project project) { |
|
70 |
project.addObserver(new Observer() { |
|
71 |
@Override |
|
72 |
public void update(Observable observable, Object param) { |
|
73 |
if( param instanceof ProjectNotification) { |
|
74 |
ProjectNotification notification = (ProjectNotification) param; |
|
75 |
switch( notification.getNotificationType()) { |
|
76 |
case ProjectNotification.BEFORE_SAVE_TO_STREAM: |
|
77 |
putServerConfigInProject( |
|
78 |
notification.getProject(), |
|
79 |
notification.getFile()); |
|
80 |
break; |
|
81 |
case ProjectNotification.AFTER_LOAD_FROM_STREAM: |
|
82 |
fetchServerConfigFromProject( |
|
83 |
notification.getProject(), |
|
84 |
notification.getFile()); |
|
85 |
break; |
|
86 |
} |
|
87 |
} |
|
88 |
|
|
89 |
} |
|
90 |
} ); |
|
91 |
} |
|
92 |
|
|
93 |
public ReportServer getServer() { |
|
94 |
return this.server; |
|
95 |
} |
|
96 |
|
|
97 |
public ReportServerConfig getConfig() { |
|
98 |
return this.server.getConfig(); |
|
99 |
} |
|
100 |
|
|
101 |
private void initServer(String configJSON, File rootFolder) { |
|
102 |
ReportManager manager = ReportLocator.getReportManager(); |
|
103 |
if( this.server != null ) { |
|
104 |
if( this.server.isStarted() ) { |
|
105 |
this.server.stop(); |
|
106 |
} |
|
107 |
this.server = null; |
|
108 |
} |
|
109 |
this.logListener = new ReportServer.LoggerListener() { |
|
110 |
@Override |
|
111 |
public void log(int level, String message) { |
|
112 |
serverlog.add( new ImmutablePair<>(level, message)); |
|
113 |
} |
|
114 |
}; |
|
115 |
|
|
116 |
this.serverlog = new CircularFifoBuffer(200); |
|
117 |
this.services = new AppReportServices(); |
|
118 |
this.services.setRootFolder(rootFolder); |
|
119 |
ReportServerConfig config = manager.createServerConfig(this.services, configJSON); |
|
120 |
this.server = manager.createServer(config); |
|
121 |
manager.setDefaultServer(server); |
|
122 |
this.server.addLogListener(logListener); |
|
123 |
if( this.serverPanel!=null ) { |
|
124 |
this.serverPanel.setServer(this.server); |
|
125 |
} |
|
126 |
config.addPropertyChangeListener(new PropertyChangeListener() { |
|
127 |
@Override |
|
128 |
public void propertyChange(PropertyChangeEvent evt) { |
|
129 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
130 |
Project project = application.getCurrentProject(); |
|
131 |
putServerConfigInProject(project, null); |
|
132 |
} |
|
133 |
}); |
|
134 |
if( this.getConfig().getAutostart() ) { |
|
135 |
if( !this.server.isStarted() ) { |
|
136 |
this.server.start(); |
|
137 |
} |
|
138 |
} |
|
139 |
} |
|
140 |
|
|
141 |
private void putServerConfigInProject(Project project, File rootFolder) { |
|
142 |
if( this.services!=null ) { |
|
143 |
this.services.setRootFolder(rootFolder); |
|
144 |
} |
|
145 |
if( this.server!=null ) { //&& this.server.getConfig().getAutostart() ) { |
|
146 |
project.setProperty(REPORTS_CONFIG, server.getConfig().toJSON()); |
|
147 |
} else { |
|
148 |
project.setProperty(REPORTS_CONFIG, null); |
|
149 |
} |
|
150 |
} |
|
151 |
|
|
152 |
private void fetchServerConfigFromProject(Project project, File rootFolder) { |
|
153 |
String configJSON = (String) project.getProperty(REPORTS_CONFIG); |
|
154 |
initServer(configJSON, rootFolder); |
|
155 |
} |
|
156 |
|
|
157 |
public JReportServer getServerPanel() { |
|
158 |
if( this.serverPanel==null ) { |
|
159 |
ReportSwingManager swingManager = ReportSwingLocator.getReportSwingManager(); |
|
160 |
this.serverPanel = swingManager.createJReportServer(this.server); |
|
161 |
SwingUtilities.invokeLater(new Runnable() { |
|
162 |
@Override |
|
163 |
public void run() { |
|
164 |
for (Object entry : serverlog) { |
|
165 |
ImmutablePair<Integer,String> logEntry = (ImmutablePair) entry; |
|
166 |
serverPanel.log(logEntry.getLeft(), logEntry.getRight()); |
|
167 |
} |
|
168 |
} |
|
169 |
}); |
|
170 |
|
|
171 |
// this.serverPanel.asJComponent().addComponentListener(new ComponentAdapter() { |
|
172 |
// @Override |
|
173 |
// public void componentHidden(ComponentEvent e) { |
|
174 |
// serverPanel = null; |
|
175 |
// } |
|
176 |
// |
|
177 |
// }); |
|
178 |
} |
|
179 |
return this.serverPanel; |
|
180 |
} |
|
181 |
|
|
182 |
|
|
183 |
} |
org.gvsig.report/tags/org.gvsig.report-1.0.43/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/java/org/gvsig/report/app/mainplugin/document/gui/CreateReportPanelView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.report/org.gvsig.report.app/org.gvsig.report.app.mainplugin/src/main/java/org/gvsig/report/app/mainplugin/document/gui/CreateReportPanelView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
|
29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">2</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="border"> |
|
57 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
58 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
59 |
<at name="name">border</at> |
|
60 |
</super> |
|
61 |
<at name="borders"> |
|
62 |
<object classname="java.util.LinkedList"> |
|
63 |
<item > |
|
64 |
<at name="value"> |
|
65 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
66 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
67 |
<at name="name">border</at> |
|
68 |
</super> |
|
69 |
</object> |
|
70 |
</at> |
|
71 |
</item> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</object> |
|
75 |
</at> |
|
76 |
<at name="name">lblReportFile</at> |
|
77 |
<at name="width">58</at> |
|
78 |
<at name="text">Report file</at> |
|
79 |
<at name="fill"> |
|
80 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
81 |
<at name="name">fill</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
<at name="height">14</at> |
|
85 |
</object> |
|
86 |
</at> |
|
87 |
</object> |
|
88 |
</at> |
|
89 |
</object> |
|
90 |
</at> |
|
91 |
</item> |
|
92 |
<item > |
|
93 |
<at name="value"> |
|
94 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
96 |
<at name="cellconstraints"> |
|
97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
98 |
<at name="column">2</at> |
|
99 |
<at name="row">4</at> |
|
100 |
<at name="colspan">1</at> |
|
101 |
<at name="rowspan">1</at> |
|
102 |
<at name="halign">default</at> |
|
103 |
<at name="valign">default</at> |
|
104 |
<at name="insets" object="insets">0,0,0,0</at> |
|
105 |
</object> |
|
106 |
</at> |
|
107 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
108 |
</super> |
|
109 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
110 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
111 |
<at name="beanproperties"> |
|
112 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
113 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
114 |
<at name="properties"> |
|
115 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
116 |
<at name="border"> |
|
117 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
118 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
119 |
<at name="name">border</at> |
|
120 |
</super> |
|
121 |
<at name="borders"> |
|
122 |
<object classname="java.util.LinkedList"> |
|
123 |
<item > |
|
124 |
<at name="value"> |
|
125 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
126 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
127 |
<at name="name">border</at> |
|
128 |
</super> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
</item> |
|
132 |
</object> |
|
133 |
</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="name">lblDataSet</at> |
|
137 |
<at name="width">58</at> |
|
138 |
<at name="text">Data set</at> |
|
139 |
<at name="fill"> |
|
140 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
141 |
<at name="name">fill</at> |
|
142 |
</object> |
|
143 |
</at> |
|
144 |
<at name="height">14</at> |
|
145 |
</object> |
|
146 |
</at> |
|
147 |
</object> |
|
148 |
</at> |
|
149 |
</object> |
|
150 |
</at> |
|
151 |
</item> |
|
152 |
<item > |
|
153 |
<at name="value"> |
|
154 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
155 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
156 |
<at name="cellconstraints"> |
|
157 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
158 |
<at name="column">4</at> |
|
159 |
<at name="row">2</at> |
|
160 |
<at name="colspan">1</at> |
|
161 |
<at name="rowspan">1</at> |
|
162 |
<at name="halign">default</at> |
|
163 |
<at name="valign">default</at> |
|
164 |
<at name="insets" object="insets">0,0,0,0</at> |
|
165 |
</object> |
|
166 |
</at> |
|
167 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
168 |
</super> |
|
169 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
170 |
<at name="beanclass">javax.swing.JTextField</at> |
|
171 |
<at name="beanproperties"> |
|
172 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
173 |
<at name="classname">javax.swing.JTextField</at> |
|
174 |
<at name="properties"> |
|
175 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
176 |
<at name="border"> |
|
177 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
178 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
179 |
<at name="name">border</at> |
|
180 |
</super> |
|
181 |
<at name="borders"> |
|
182 |
<object classname="java.util.LinkedList"> |
|
183 |
<item > |
|
184 |
<at name="value"> |
|
185 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
186 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
187 |
<at name="name">border</at> |
|
188 |
</super> |
|
189 |
</object> |
|
190 |
</at> |
|
191 |
</item> |
|
192 |
</object> |
|
193 |
</at> |
|
194 |
</object> |
|
195 |
</at> |
|
196 |
<at name="name">txtReportFile</at> |
|
197 |
<at name="width">673</at> |
|
198 |
<at name="height">20</at> |
|
199 |
</object> |
|
200 |
</at> |
|
201 |
</object> |
|
202 |
</at> |
|
203 |
</object> |
|
204 |
</at> |
|
205 |
</item> |
|
206 |
<item > |
|
207 |
<at name="value"> |
|
208 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
209 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
210 |
<at name="cellconstraints"> |
|
211 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
212 |
<at name="column">6</at> |
|
213 |
<at name="row">2</at> |
|
214 |
<at name="colspan">1</at> |
|
215 |
<at name="rowspan">1</at> |
|
216 |
<at name="halign">default</at> |
|
217 |
<at name="valign">default</at> |
|
218 |
<at name="insets" object="insets">0,0,0,0</at> |
|
219 |
</object> |
|
220 |
</at> |
|
221 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
222 |
</super> |
|
223 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
224 |
<at name="beanclass">javax.swing.JButton</at> |
|
225 |
<at name="beanproperties"> |
|
226 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
227 |
<at name="classname">javax.swing.JButton</at> |
|
228 |
<at name="properties"> |
|
229 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
230 |
<at name="border"> |
|
231 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
232 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
233 |
<at name="name">border</at> |
|
234 |
</super> |
|
235 |
<at name="borders"> |
|
236 |
<object classname="java.util.LinkedList"> |
|
237 |
<item > |
|
238 |
<at name="value"> |
|
239 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
240 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
241 |
<at name="name">border</at> |
|
242 |
</super> |
|
243 |
<at name="top">2</at> |
|
244 |
<at name="left">2</at> |
|
245 |
<at name="bottom">2</at> |
|
246 |
<at name="right">2</at> |
|
247 |
</object> |
|
248 |
</at> |
|
249 |
</item> |
|
250 |
</object> |
|
251 |
</at> |
|
252 |
</object> |
|
253 |
</at> |
|
254 |
<at name="actionCommand">...</at> |
|
255 |
<at name="name">btnReportFile</at> |
|
256 |
<at name="width">16</at> |
|
257 |
<at name="text">...</at> |
|
258 |
<at name="height">18</at> |
|
259 |
</object> |
|
260 |
</at> |
|
261 |
</object> |
|
262 |
</at> |
|
263 |
</object> |
|
264 |
</at> |
|
265 |
</item> |
|
266 |
<item > |
|
267 |
<at name="value"> |
|
268 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
269 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
270 |
<at name="cellconstraints"> |
|
271 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
272 |
<at name="column">4</at> |
|
273 |
<at name="row">4</at> |
|
274 |
<at name="colspan">3</at> |
|
275 |
<at name="rowspan">1</at> |
|
276 |
<at name="halign">default</at> |
|
277 |
<at name="valign">default</at> |
|
278 |
<at name="insets" object="insets">0,0,0,0</at> |
|
279 |
</object> |
|
280 |
</at> |
|
281 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
282 |
</super> |
|
283 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
284 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
285 |
<at name="beanproperties"> |
|
286 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
287 |
<at name="classname">javax.swing.JComboBox</at> |
|
288 |
<at name="properties"> |
|
289 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
290 |
<at name="border"> |
|
291 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
292 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
293 |
<at name="name">border</at> |
|
294 |
</super> |
|
295 |
<at name="borders"> |
|
296 |
<object classname="java.util.LinkedList"> |
|
297 |
<item > |
|
298 |
<at name="value"> |
|
299 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
300 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
301 |
<at name="name">border</at> |
|
302 |
</super> |
|
303 |
</object> |
|
304 |
</at> |
|
305 |
</item> |
|
306 |
</object> |
|
307 |
</at> |
|
308 |
</object> |
|
309 |
</at> |
|
310 |
<at name="name">cboDataSet</at> |
|
311 |
<at name="width">709</at> |
|
312 |
<at name="items"> |
|
313 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
314 |
<at name="name">items</at> |
|
315 |
</object> |
|
316 |
</at> |
|
317 |
<at name="height">20</at> |
|
318 |
</object> |
|
319 |
</at> |
|
320 |
</object> |
|
321 |
</at> |
|
322 |
</object> |
|
323 |
</at> |
|
324 |
</item> |
|
325 |
<item > |
|
326 |
<at name="value"> |
|
327 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
328 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
329 |
<at name="cellconstraints"> |
|
330 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
331 |
<at name="column">4</at> |
|
332 |
<at name="row">6</at> |
|
333 |
<at name="colspan">3</at> |
|
334 |
<at name="rowspan">1</at> |
|
335 |
<at name="halign">default</at> |
|
336 |
<at name="valign">default</at> |
|
337 |
<at name="insets" object="insets">0,0,0,0</at> |
|
338 |
</object> |
|
339 |
</at> |
|
340 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
341 |
</super> |
|
342 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
343 |
<at name="beanclass">javax.swing.JCheckBox</at> |
|
344 |
<at name="beanproperties"> |
|
345 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
346 |
<at name="classname">javax.swing.JCheckBox</at> |
|
347 |
<at name="properties"> |
|
348 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
349 |
<at name="border"> |
|
350 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
351 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
352 |
<at name="name">border</at> |
|
353 |
</super> |
|
354 |
<at name="borders"> |
|
355 |
<object classname="java.util.LinkedList"> |
|
356 |
<item > |
|
357 |
<at name="value"> |
|
358 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
359 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
360 |
<at name="name">border</at> |
|
361 |
</super> |
|
362 |
</object> |
|
363 |
</at> |
|
364 |
</item> |
|
365 |
</object> |
|
366 |
</at> |
|
367 |
</object> |
|
368 |
</at> |
|
369 |
<at name="actionCommand">Open report document</at> |
|
370 |
<at name="horizontalAlignment">4</at> |
|
371 |
<at name="name">chkOpenDocument</at> |
|
372 |
<at name="width">709</at> |
|
373 |
<at name="horizontalTextPosition">2</at> |
|
374 |
<at name="text">Open report document</at> |
|
375 |
<at name="selected">true</at> |
|
376 |
<at name="height">16</at> |
|
377 |
</object> |
|
378 |
</at> |
|
379 |
</object> |
|
380 |
</at> |
|
381 |
</object> |
|
382 |
</at> |
|
383 |
</item> |
|
384 |
</object> |
|
385 |
</at> |
|
386 |
<at name="properties"> |
|
387 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
388 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
389 |
<at name="properties"> |
|
390 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
391 |
<at name="border"> |
|
392 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
393 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
394 |
<at name="name">border</at> |
|
395 |
</super> |
|
396 |
<at name="borders"> |
|
397 |
<object classname="java.util.LinkedList"/> |
|
398 |
</at> |
|
399 |
</object> |
|
400 |
</at> |
|
401 |
<at name="name"></at> |
|
402 |
<at name="fill"> |
|
403 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
404 |
<at name="name">fill</at> |
|
405 |
</object> |
|
406 |
</at> |
|
407 |
<at name="scollBars"> |
|
408 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
409 |
<at name="name">scollBars</at> |
|
410 |
<at name="verticalpolicy">21</at> |
|
411 |
<at name="horizontalpolicy">31</at> |
|
412 |
<at name="border"> |
|
413 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
414 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
415 |
<at name="name">border</at> |
|
416 |
</super> |
|
417 |
<at name="borders"> |
|
418 |
<object classname="java.util.LinkedList"> |
|
419 |
<item > |
|
420 |
<at name="value"> |
|
421 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
422 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
423 |
<at name="name">border</at> |
|
424 |
</super> |
|
425 |
</object> |
|
426 |
</at> |
|
427 |
</item> |
|
428 |
</object> |
|
429 |
</at> |
|
430 |
</object> |
|
431 |
</at> |
|
432 |
</object> |
|
433 |
</at> |
|
434 |
</object> |
|
435 |
</at> |
|
436 |
</object> |
|
437 |
</at> |
|
438 |
<at name="cellpainters"> |
|
439 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
440 |
<at name="rows"> |
|
441 |
<object classname="[Ljava.lang.Object;" size="7"> |
|
442 |
<at name="item" index="0"> |
|
443 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
444 |
</at> |
|
445 |
<at name="item" index="1"> |
|
446 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
447 |
</at> |
|
448 |
<at name="item" index="2"> |
|
449 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
450 |
</at> |
|
451 |
<at name="item" index="3"> |
|
452 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
453 |
</at> |
|
454 |
<at name="item" index="4"> |
|
455 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
456 |
</at> |
|
457 |
<at name="item" index="5"> |
|
458 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
459 |
</at> |
|
460 |
<at name="item" index="6"> |
Also available in: Unified diff