Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 6:e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
flys-client/trunk@1314 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 11 Feb 2011 09:51:32 +0000 |
parents | |
children | a65793e08245 |
line wrap: on
line source
package de.intevation.flys.client.client.ui; import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.DateTimeFormat; import com.smartgwt.client.widgets.Window; import de.intevation.flys.client.shared.model.Collection; import de.intevation.flys.client.client.FLYSMessages; /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class CollectionView extends Window { /** The message class that provides i18n strings.*/ FLYSMessages messages = GWT.create(FLYSMessages.class); /** The collection to be displayed.*/ protected Collection collection; /** * This constructor creates a new CollectionView that is used to display the * <i>collection</i>. * * @param collection The collection to be displayed. */ public CollectionView(Collection collection) { this.collection = collection; init(); } /** * This method handles the initial layout stuff. */ protected void init() { setWidth(600); setHeight(400); setCanDragResize(true); DateTimeFormat dtf = DateTimeFormat.getFormat(messages.date_format()); String lastAccess = dtf.format(collection.getLastAccess()); setTitle(lastAccess + " - " + collection.getName()); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :