view flys-client/src/main/java/de/intevation/flys/client/client/ui/range/RangeTable.java @ 886:2161d3acc83f

Changed field size from fixed to percental value in helper tables. flys-client/trunk@2720 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 13 Sep 2011 12:47:54 +0000
parents dbaef661d0e5
children dd702348b878
line wrap: on
line source
package de.intevation.flys.client.client.ui.range;

import com.google.gwt.core.client.GWT;

import com.smartgwt.client.types.ListGridFieldType;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;

import de.intevation.flys.client.client.FLYSConstants;
import de.intevation.flys.client.client.FLYSImages;


/**
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class RangeTable extends ListGrid {

    /** The message class that provides i18n strings.*/
    protected FLYSConstants MESSAGES = GWT.create(FLYSConstants.class);

    /** The interface that provides the image resources. */
    private FLYSImages IMAGES = GWT.create(FLYSImages.class);


    public RangeTable() {
        setWidth100();
        setHeight100();
        setSelectionType(SelectionStyle.SINGLE);
        setSelectionType(SelectionStyle.SINGLE);
        setShowHeaderContextMenu(false);
        setShowRecordComponents(true);
        setShowRecordComponentsByCell(true);
        setEmptyMessage(MESSAGES.empty_filter());
        setCanReorderFields(false);

        ListGridField addDistance = new ListGridField ("", "");
        addDistance.setType (ListGridFieldType.ICON);
        addDistance.setWidth (20);
        addDistance.setCellIcon (IMAGES.markerGreen ().getURL ());

        ListGridField ddescr = new ListGridField(
            "description", MESSAGES.description());
        ddescr.setType(ListGridFieldType.TEXT);
        ddescr.setWidth("*");
        ListGridField from = new ListGridField("from", MESSAGES.from());
        from.setType(ListGridFieldType.TEXT);
        from.setWidth("12%");

        ListGridField to = new ListGridField("to", MESSAGES.to());
        to.setType(ListGridFieldType.TEXT);
        to.setWidth("12%");

        ListGridField dside = new ListGridField(
            "riverside", MESSAGES.riverside());
        dside.setType(ListGridFieldType.TEXT);
        dside.setWidth("12%");

        ListGridField bottom = new ListGridField(
            "bottom", MESSAGES.bottom_edge());
        bottom.setType(ListGridFieldType.TEXT);
        bottom.setWidth("10%");

        ListGridField top = new ListGridField("top", MESSAGES.top_edge());
        top.setType(ListGridFieldType.TEXT);
        top.setWidth("10%");

        setFields(addDistance, ddescr, from, to, dside, bottom, top);
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org