|
From: Rashmi B. <ra...@us...> - 2005-04-29 15:05:23
|
Update of /cvsroot/pocolap/pocolap/src/com/pocolap/xtab/format In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27930 Modified Files: FormatPDF.java Log Message: PDF related changes Index: FormatPDF.java =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/com/pocolap/xtab/format/FormatPDF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FormatPDF.java 26 Apr 2005 17:33:39 -0000 1.3 --- FormatPDF.java 29 Apr 2005 15:05:14 -0000 1.4 *************** *** 46,50 **** import java.lang.Math; import com.pocolap.schema.SupplementalItem ; ! import com.pocolap.schema.FormatTypeItem; public class FormatPDF { --- 46,50 ---- import java.lang.Math; import com.pocolap.schema.SupplementalItem ; ! import com.pocolap.servlets.pocOLAPConstants ; public class FormatPDF { *************** *** 69,73 **** Selector across, FilterList[] filterlist , ! SpreadSheet spsheet ){ String errclass = getClass().getName()+".createPDF(CrossTabDef,Selector,Selector,FilterList[],SpreadSheet): "; --- 69,74 ---- Selector across, FilterList[] filterlist , ! SpreadSheet spsheet , ! String format ){ String errclass = getClass().getName()+".createPDF(CrossTabDef,Selector,Selector,FilterList[],SpreadSheet): "; *************** *** 90,94 **** TOP_MARGIN = TOP_MARGIN + (flist.length * 14); ! TableFormat tableformat = getTableFormat(); Rectangle psize = tableformat.getPageSize(); Document document = new Document(psize, LEFT_MARGIN, RIGHT_MARGIN, TOP_MARGIN, BOTTOM_MARGIN); //(PageSize,left,right,top,margin) --- 91,95 ---- TOP_MARGIN = TOP_MARGIN + (flist.length * 14); ! TableFormat tableformat = getTableFormat(format); Rectangle psize = tableformat.getPageSize(); Document document = new Document(psize, LEFT_MARGIN, RIGHT_MARGIN, TOP_MARGIN, BOTTOM_MARGIN); //(PageSize,left,right,top,margin) *************** *** 319,349 **** } ! private TableFormat getTableFormat(){ ! TableFormat t = null ; ! SupplementalItem sitem = currdefinition.getCrossTabDef().getRept().getSupplementalItem() ; ! if ((sitem!=null) && ! (sitem.getPdfConfigItem()!=null) && ! (sitem.getPdfConfigItem().getPdfFormatItem()!=null) ! ){ ! switch (sitem.getPdfConfigItem().getPdfFormatItem().getFormatTypeItem().intValue()){ ! case FormatTypeItem.INT_HTML: ! t = new HtmlFormat(); ! break; ! case FormatTypeItem.INT_CONTEMPORARY: ! t = new ContemporaryFormat(); ! break; ! case FormatTypeItem.INT_SIMPLE_GRID: ! t = new SimpleGridFormat(); ! break; ! case FormatTypeItem.INT_PLAIN: ! t = new PlainFormat(); ! break; ! default: ! t = new ContemporaryFormat(); ! break; ! } ! } else ! t = new ContemporaryFormat(); return t ; } --- 320,336 ---- } ! private TableFormat getTableFormat(String format){ ! TableFormat t = null ; ! if (format.equalsIgnoreCase(pocOLAPConstants.ACTION_PDF_HTML)) ! t = new HtmlFormat(); ! else if (format.equalsIgnoreCase(pocOLAPConstants.ACTION_PDF_CONTEMPORARY)) ! t = new ContemporaryFormat(); ! else if (format.equalsIgnoreCase(pocOLAPConstants.ACTION_PDF_SIMPLEGRID)) ! t = new SimpleGridFormat(); ! else if (format.equalsIgnoreCase(pocOLAPConstants.ACTION_PDF_PLAIN)) ! t = new PlainFormat(); else ! t = new ContemporaryFormat(); ! return t ; } *************** *** 351,355 **** } ! /*c Here's some documentation to understand this class: (X denotes empty cell) --- 338,342 ---- } ! /* Here's some documentation to understand this class: (X denotes empty cell) |