Example #1
0
        internal PdfTable(PdfDocument PdfDocument, ContentAlignment DefaultContentAlignment, Font Font, Color DefaultForegroundColor, int Rows
                          , int Columns, double CellPadding)
        {
            cells            = new Hashtable();
            pdfRows          = new ArrayList();
            this.owner       = this;
            this.PdfDocument = PdfDocument;
            this.borderWidth = 0;
            this.pdfColumns  = new ArrayList();
            this.rows        = Rows;
            this.startRow    = 0;
            this.startColumn = 0;
            this.endColumn   = Columns - 1;
            this.endRow      = Rows - 1;
            this.columns     = Columns;

            for (int c = 0; c < columns; c++)
            {
                for (int r = 0; r < rows; r++)
                {
                    this.cells[r + "," + c] = new PdfCell(this, r, c, DefaultContentAlignment, DefaultForegroundColor
                                                          , Font, CellPadding);
                }
            }
            for (int r = 0; r < rows; r++)
            {
                this.pdfRows.Add(new PdfRow(this, r));
            }
            for (int c = 0; c < columns; c++)
            {
                PdfColumn pc = new PdfColumn(this, c);
                pc.Width = 100 / this.columns;
                this.pdfColumns.Add(pc);
            }
        }
Example #2
0
		internal PdfTable(PdfDocument PdfDocument,ContentAlignment DefaultContentAlignment,Font Font,Color DefaultForegroundColor,int Rows
			,int Columns,double CellPadding)
		{
			cells=new Hashtable();
			pdfRows=new ArrayList();
			this.owner=this;
			this.PdfDocument=PdfDocument;
			this.borderWidth=0;
			this.pdfColumns=new ArrayList();
			this.rows=Rows;
			this.startRow=0;
			this.startColumn=0;
			this.endColumn=Columns-1;
			this.endRow=Rows-1;
			this.columns=Columns;
			
			for (int c=0;c<columns;c++)
				for (int r=0;r<rows;r++)
				{
					this.cells[r+","+c]=new PdfCell(this,r,c,DefaultContentAlignment,DefaultForegroundColor
						,Font,CellPadding);
				}
			for (int r=0;r<rows;r++)
			{
				this.pdfRows.Add(new PdfRow(this,r));
			}
			for (int c=0;c<columns;c++)
			{
				PdfColumn pc=new PdfColumn(this,c);
				pc.Width=100/this.columns;
				this.pdfColumns.Add(pc);
			}
		}