OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 106 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.openconcerto.modules.humanresources.travel.expense;

import org.openconcerto.ui.group.Group;
import org.openconcerto.ui.group.Item;
import org.openconcerto.ui.group.LayoutHints;

public class ExpenseGroup extends Group {

        public ExpenseGroup() {
                super(ExpenseSQLElement.ELEMENT_CODE + ".default", LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
                final Group g = new Group(ExpenseSQLElement.ELEMENT_CODE + ".identifier");
                g.addItem("DATE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                g.addItem("ID_USER_COMMON", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);

                this.add(g);

                final Group gDescription = new Group(ExpenseSQLElement.ELEMENT_CODE + ".description");
                gDescription.addItem("DESCRIPTION", new LayoutHints(true, true, true, true, true, true, true, true));
                gDescription.addItem("ID_EXPENSE_STATE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                this.add(gDescription);

                final Group gTravel = new Group(ExpenseSQLElement.ELEMENT_CODE + ".travel",
                                LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
                gTravel.addItem("TRAVEL_DISTANCE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                gTravel.addItem("TRAVEL_RATE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                gTravel.addItem("TRAVEL_AMOUNT", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                this.add(gTravel);

                final Group gAddress = new Group(ExpenseSQLElement.ELEMENT_CODE + ".misc",
                                LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
                gAddress.addItem("MISC_AMOUNT", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                // gAddress.addItem("ID_EXPENSE_STATE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
                this.add(gAddress);

        }

}