Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 270:d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
flys-client/trunk@1895 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 11 May 2011 09:11:40 +0000 |
parents | dd1dad2ff94e |
children | 8264b02091ef |
comparison
equal
deleted
inserted
replaced
269:eb3c16df59db | 270:d01b0d81b92a |
---|---|
16 import com.smartgwt.client.widgets.tab.TabSet; | 16 import com.smartgwt.client.widgets.tab.TabSet; |
17 | 17 |
18 import de.intevation.flys.client.shared.model.Artifact; | 18 import de.intevation.flys.client.shared.model.Artifact; |
19 import de.intevation.flys.client.shared.model.ArtifactDescription; | 19 import de.intevation.flys.client.shared.model.ArtifactDescription; |
20 import de.intevation.flys.client.shared.model.Collection; | 20 import de.intevation.flys.client.shared.model.Collection; |
21 import de.intevation.flys.client.shared.model.ExportMode; | |
21 import de.intevation.flys.client.shared.model.OutputMode; | 22 import de.intevation.flys.client.shared.model.OutputMode; |
22 import de.intevation.flys.client.shared.model.User; | 23 import de.intevation.flys.client.shared.model.User; |
23 | 24 |
24 import de.intevation.flys.client.client.Config; | 25 import de.intevation.flys.client.client.Config; |
25 import de.intevation.flys.client.client.FLYS; | 26 import de.intevation.flys.client.client.FLYS; |
351 * Adds a new tab for the OutputMode <i>out</i>. | 352 * Adds a new tab for the OutputMode <i>out</i>. |
352 * | 353 * |
353 * @param name The name and title of the output. | 354 * @param name The name and title of the output. |
354 */ | 355 */ |
355 protected void addOutputTab(String name, OutputMode out) { | 356 protected void addOutputTab(String name, OutputMode out) { |
356 // XXX Maybe we should change this determination of visual outputs. I am | 357 if (out instanceof ExportMode) { |
357 // not sure if the mimetype is the correct value for this! | 358 ExportMode export = (ExportMode) out; |
358 | 359 |
359 if (out.getMimeType().equals("text/plain")) { | 360 if (export.getFacet("csv") != null) { |
360 TableDataPanel p = new TableDataPanel(); | 361 TableDataPanel p = new TableDataPanel(); |
361 p.setUuid(collection.identifier()); | 362 p.setUuid(collection.identifier()); |
362 p.setName(out.getName()); | 363 p.setName(out.getName()); |
363 parameterList.setPanel (p); | 364 parameterList.setPanel (p); |
365 } | |
366 | |
364 return; | 367 return; |
365 } | 368 } |
366 | 369 |
367 GWT.log("Add new output tab for '" + name + "'"); | 370 GWT.log("Add new output tab for '" + name + "'"); |
368 | 371 |