/****************************************************************************** * Product: iDempiere ERP & CRM Smart Business Solution * * Copyright (C) 2012 Trek Global * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * * by the Free Software Foundation. This program is distributed in the hope * * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ package org.adempiere.webui.panel; import java.util.ArrayList; import org.adempiere.webui.component.Borderlayout; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.Column; import org.adempiere.webui.component.Columns; import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.Label; import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Window; import org.adempiere.webui.util.ZKUpdateUtil; import org.compiere.print.MPrintFormatItem; import org.compiere.util.Env; import org.compiere.util.Language; import org.compiere.util.Msg; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Center; import org.zkoss.zul.Div; import org.zkoss.zul.Row; /** * Panel to edit summary related properties of print format items (IsSummary, IsCounted, IsAveraged, etc) */ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener { /** * generated serial id */ private static final long serialVersionUID = 4660623126634851224L; private static final int RENDER_IN_COLUMNS=10; protected Checkbox m_chkSum[]=null; protected Checkbox m_chkCount[]=null; protected Checkbox m_chkMin[]=null; protected Checkbox m_chkMax[]=null; protected Checkbox m_chkMean[]=null; protected Checkbox m_chkVariance[]=null; protected Checkbox m_chkDeviation[]=null; /** printed print format items */ private ArrayList displayItems=new ArrayList(); protected Grid grid = new Grid(); /** * default constructor */ public WRC5SummaryFieldsPanel() { super(); } /** * Layout panel */ public void init(){ Window wind=new Window(); ZKUpdateUtil.setWidth(wind, "90%"); ZKUpdateUtil.setHeight(wind, "100%"); ZKUpdateUtil.setHflex(wind, "1"); ZKUpdateUtil.setHflex(grid, "1"); ZKUpdateUtil.setHeight(grid, "90%"); ZKUpdateUtil.setVflex(grid, true); grid.setStyle("margin:0; padding:0; position: absolute"); grid.makeNoStrip(); Borderlayout borderlayout = new Borderlayout(); wind.appendChild(borderlayout); ZKUpdateUtil.setHflex(borderlayout, "1"); Center center = new Center(); center.setAutoscroll(true); borderlayout.appendChild(center); Div div = new Div(); div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none"); div.appendChild(grid); center.appendChild(div); this.appendChild(wind); Columns columns = new Columns(); grid.appendChild(columns); Column cols[] = new Column[RENDER_IN_COLUMNS]; int width = 100/RENDER_IN_COLUMNS; for(int i=0;i(); for(int i=0 ; i