ingo@74: package de.intevation.flys.client.client.ui; ingo@74: ingo@74: import com.smartgwt.client.widgets.Label; ingo@74: import com.smartgwt.client.widgets.tab.Tab; ingo@74: ingo@1364: import de.intevation.flys.client.shared.model.Artifact; ingo@74: import de.intevation.flys.client.shared.model.Collection; ingo@74: import de.intevation.flys.client.shared.model.OutputMode; ingo@74: ingo@74: ingo@74: public class OutputTab extends Tab { ingo@74: ingo@74: /** The OutputMode that should be displayed in this tab.*/ ingo@74: protected OutputMode mode; ingo@74: ingo@74: /** The Collection that should be displayed in this tab.*/ ingo@74: protected Collection collection; ingo@74: ingo@3549: /** The CollectionView containing this tab. */ ingo@1364: protected CollectionView collectionView; ingo@1364: ingo@74: ingo@74: /** ingo@74: * The default constructor that creates a new Tab for displaying a specific ingo@74: * OutputMode of a Collection. ingo@74: * ingo@74: * @param title The title of the tab. ingo@74: * @param collection The collection that need to be displayed. ingo@74: * @param outputmode The OutputMode that need to be displayed. ingo@74: */ ingo@1364: public OutputTab( ingo@1364: String title, ingo@1364: Collection collection, ingo@1364: CollectionView collectionView, ingo@1364: OutputMode mode ingo@1364: ) { ingo@74: super(title); ingo@74: ingo@1364: this.collection = collection; ingo@1364: this.mode = mode; ingo@1364: this.collectionView = collectionView; ingo@74: ingo@74: setPane(new Label("Implement concrete subclasses to vary the output.")); ingo@74: } ingo@883: ingo@883: ingo@1364: public CollectionView getCollectionView() { ingo@1364: return collectionView; ingo@1364: } ingo@1364: ingo@1364: ingo@883: public String getOutputName() { ingo@883: return mode.getName(); ingo@883: } ingo@1364: ingo@1364: ingo@1364: public Artifact getArtifact() { ingo@1364: return getCollectionView().getArtifact(); ingo@1364: } ingo@1400: ingo@1400: ingo@1400: public Collection getCollection() { ingo@1400: return collection; ingo@1400: } felix@1568: felix@1568: felix@1568: public OutputMode getMode() { felix@1568: return mode; felix@1568: } ingo@74: } ingo@74: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :