public class Cell extends Object implements com.aspose.ms.System.ICloneable, ITextContainer
Represents a cell in a Aspose.Pdf.Table
.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Generator.Table table1 = new Aspose.Pdf.Generator.Table(); sec1.Paragraphs.Add(table1); table1.ColumnWidths = "70 2cm"; Row row1 = table1.Rows.Add(); Cell cell1Row1 = row1.Cells.Add("ColumnsSpan = 2"); cell1Row1.ColumnsSpan = 2; cell1Row1.Border = new BorderInfo((int)BorderSide.All,0.5F); Row row2 = table1.Rows.Add(); Cell cell1Row2 = row2.Cells.Add("cell1"); cell1Row2.Border = new BorderInfo((int)BorderSide.All,0.5F); Cell cell2Row2 = row2.Cells.Add("cell2"); cell2Row2.Border = new BorderInfo((int)BorderSide.All,0.5F,new Aspose.Pdf.Generator.Color("Red")); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim table1 As Aspose.Pdf.Generator.Table = New Aspose.Pdf.Generator.Table() sec1.Paragraphs.Add(table1) table1.ColumnWidths = "70 2cm" Dim row1 As Row = table1.Rows.Add() Dim cell1Row1 As Cell = row1.Cells.Add("ColumnsSpan = 2") cell1Row1.ColumnsSpan = 2 cell1Row1.Border = New BorderInfo(CType(BorderSide.All, Integer), 0.5) Dim row2 As Row = table1.Rows.Add() Dim cell1Row2 As Cell = row2.Cells.Add("cell1") cell1Row2.Border = New BorderInfo(CType(BorderSide.All, Integer), 0.5) Dim cell2Row2 As Cell = row2.Cells.Add("cell2") cell2Row2.Border = New BorderInfo(CType(BorderSide.All, Integer), 0.5, New Aspose.Pdf.Generator.Color("Red")) pdf1.Save(...) [XML] <Pdf xmlns="Aspose.Pdf"> <Section> <Table ColumnWidths="70 2cm"> <Row> <Cell ColumnsSpan="2"> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>ColumnsSpan = 2</Segment> </Text> </Cell> </Row> <Row> <Cell> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>cell1</Segment> </Text> </Cell> <Cell> <Border> <All LineWidth="0.5" Color="Red"></All> </Border> <Text> <Segment>cell2</Segment> </Text> </Cell> </Row> </Table> </Section> </Pdf>
Modifier and Type | Field and Description |
---|---|
int |
ColIndex
����Table.GetCell������Ϊ�˱�������еĴ������Ӱ�죬���¶�����һ�����ԡ�������ColumnIndexͬ��
|
boolean |
isBorderSetbyUser |
boolean |
isPartOfTableHeader |
boolean |
isPositionGot |
boolean |
isPositionProcessed |
boolean |
IsRotateProcessed |
boolean |
isVerticalAlignmentSet |
boolean |
IsVerticalTextsInCell |
float |
MinWidth
�������ݻ�ȡ��cell����С���
|
Constructor and Description |
---|
Cell()
Initializes a new instance of the
Cell class. |
Cell(Row row)
Initializes a new instance of the
Cell class in a table. |
Cell(Table table)
Initializes a new instance of the
Cell class in a table. |
Modifier and Type | Method and Description |
---|---|
Object |
completeClone()
Clones a new
Cell object. |
Object |
deepClone()
Clones a new
Cell object. |
float |
getAddidionalVerticalContentShiftForBaselignAlignment() |
int |
getAlignment()
Gets or sets a
AlignmentType object that indicates the
alignment type of the cell. |
int |
getBackgroundAlignment()
Gets or sets a
CellBackgroundAlignment enum that indicates
the alignment of the background image. |
Color |
getBackgroundColor()
Gets or sets a
Aspose.Pdf.Color object that indicates the
background color of the cell. |
String |
getBackgroundImageFile()
Gets or sets a string that indicates the background image file name.
|
int |
getBackgroundImageType()
Gets or sets a
ImageFileType enum that indicates the type of
the background image. |
BorderInfo |
getBorder()
Gets or sets a
BorderInfo object that indicates the cell's
border info. |
int |
getColumnIndex() |
int |
getColumnNumber()
Gets or sets an int value that indicates the number of the column.
|
int |
getColumnsSpan()
Gets or sets an int value that indicates how many columns the cell
spans.
|
TextInfo |
getDefaultCellTextInfo()
Gets or sets a
TextInfo object that indicates the default
cell text format info. |
MarginInfo |
getDefaultPadding()
The place for border.
|
float |
getFitWidth()
Obsolete.Please use Table.ColumnWidths instead.
|
float |
getFontHeightFromBaselineForFirstSuitableCaption(GeneratorBase usedGenerator) |
float |
getHeight()
Gets or sets a float value that indicates the height of the cell.
|
String |
getID()
Gets or sets a string that indicates the ID of the cell.
|
boolean |
getisNeedAjustByBaseLineForVertAlygnTypeTop()
Gets or sets a whether cell needs ajust vert align by baseline of
content's paragraphs if selected vert align TOP
|
MarginInfo |
getPadding()
Gets or sets a
MarginInfo object that indicates the cell's
padding. |
Paragraphs |
getParagraphs()
Gets or sets a
Paragraphs collection that indicates all
paragraphs in the cell. |
float |
getPosX()
Gets or sets a float value that indicates the x-coordinate of
beginning position of the cell.
|
float |
getPosY()
Gets or sets a float value that indicates the y-coordinate of
beginning position of the cell.
|
Row |
getRow()
Gets or sets a
Table object that contains the cell. |
int |
getRowSpan()
Gets or sets a int value that indicates how many rows the cell spans.
|
Table |
getTable()
Gets or sets a
Table object that contains the cell. |
String |
getText() |
int |
getVerticalAlignment()
Gets or sets a
VerticalAlignmentType object that indicates
the vertical alignment type. |
int |
getVerticalTextRotationAngle()
Gets or sets a
VerticalTextRotationType object that indicates
the text rotation angle in floating box or cells. |
float |
getWidth()
Gets or sets a float value that indicates the width of the cell.
|
boolean |
isNoBorder()
Gets or sets a bool value that indicates whether the cell have
borders.
|
void |
isNoBorder(boolean value) |
boolean |
isTemp() |
void |
isTemp(boolean value) |
boolean |
isWordWrapped()
Gets or sets a boolean value that indicates the alignment type of the
cell.
|
void |
isWordWrapped(boolean value) |
void |
setAddidionalVerticalContentShiftForBaselignAlignment(float value) |
void |
setAlignment(int value) |
void |
setBackgroundAlignment(int value) |
void |
setBackgroundColor(Color value) |
void |
setBackgroundImageFile(String value) |
void |
setBackgroundImageType(int value) |
void |
setBorder(BorderInfo value) |
void |
setColumnIndex(int value) |
void |
setColumnsSpan(int value) |
void |
setDefaultCellTextInfo(TextInfo value) |
void |
setFitWidth(float value) |
void |
setFontSizeForTextualChildren(float newFontSize) |
void |
setHeight(float value) |
void |
setID(String value) |
void |
setisNeedAjustByBaseLineForVertAlygnTypeTop(boolean value) |
void |
setPadding(MarginInfo value) |
void |
setParagraphs(Paragraphs value) |
void |
setPosX(float value) |
void |
setPosY(float value) |
void |
setRow(Row value) |
void |
setRowSpan(int value) |
void |
setTable(Table value) |
void |
setTextNameForTextualChildren(String newFontName) |
void |
setVerticalAlignment(int value) |
void |
setVerticalTextRotationAngle(int value) |
void |
setWidth(float value) |
public boolean isBorderSetbyUser
public boolean isPartOfTableHeader
public boolean isPositionProcessed
public int ColIndex
����Table.GetCell������Ϊ�˱�������еĴ������Ӱ�죬���¶�����һ�����ԡ�������ColumnIndexͬ��
public boolean IsRotateProcessed
public boolean IsVerticalTextsInCell
public boolean isVerticalAlignmentSet
public float MinWidth
�������ݻ�ȡ��cell����С���
public boolean isPositionGot
public Cell()
Initializes a new instance of the Cell
class.
public Cell(Table table)
Initializes a new instance of the Cell
class in a table.
table
- The Table
object where the cell is in. public Cell(Row row)
Initializes a new instance of the Cell
class in a table.
row
- The Row
object where the cell is in.public BorderInfo getBorder()
Gets or sets a BorderInfo
object that indicates the cell's
border info.
public void setBorder(BorderInfo value)
public boolean isNoBorder()
Gets or sets a bool value that indicates whether the cell have borders.
public void isNoBorder(boolean value)
public Color getBackgroundColor()
Gets or sets a Aspose.Pdf.Color
object that indicates the
background color of the cell.
public void setBackgroundColor(Color value)
public String getBackgroundImageFile()
Gets or sets a string that indicates the background image file name.
public void setBackgroundImageFile(String value)
public int getBackgroundImageType()
Gets or sets a ImageFileType
enum that indicates the type of
the background image.
public void setBackgroundImageType(int value)
public int getBackgroundAlignment()
Gets or sets a CellBackgroundAlignment
enum that indicates
the alignment of the background image.
public void setBackgroundAlignment(int value)
public MarginInfo getPadding()
Gets or sets a MarginInfo
object that indicates the cell's
padding.
public void setPadding(MarginInfo value)
public MarginInfo getDefaultPadding()
The place for border.
public float getPosX()
Gets or sets a float value that indicates the x-coordinate of beginning position of the cell.
public void setPosX(float value)
public float getPosY()
Gets or sets a float value that indicates the y-coordinate of beginning position of the cell.
public void setPosY(float value)
public int getColumnNumber()
Gets or sets an int value that indicates the number of the column.
public int getColumnIndex()
public void setColumnIndex(int value)
public float getFitWidth()
Obsolete.Please use Table.ColumnWidths instead. Gets or sets a float value that indicates the fit width of the cell. The unit is point. In XML,the default unit is point,but cm and inch are also supported. For example,FitWidth="2cm" or FitWidth="2inch".
public void setFitWidth(float value)
public float getWidth()
Gets or sets a float value that indicates the width of the cell.
public void setWidth(float value)
public float getHeight()
Gets or sets a float value that indicates the height of the cell.
public void setHeight(float value)
public float getAddidionalVerticalContentShiftForBaselignAlignment()
public void setAddidionalVerticalContentShiftForBaselignAlignment(float value)
public Paragraphs getParagraphs()
Gets or sets a Paragraphs
collection that indicates all
paragraphs in the cell.
public void setParagraphs(Paragraphs value)
public String getID()
Gets or sets a string that indicates the ID of the cell.
public void setID(String value)
public Table getTable()
Gets or sets a Table
object that contains the cell.
public void setTable(Table value)
public Row getRow()
Gets or sets a Table
object that contains the cell.
public void setRow(Row value)
public int getColumnsSpan()
Gets or sets an int value that indicates how many columns the cell spans.
public void setColumnsSpan(int value)
public TextInfo getDefaultCellTextInfo()
Gets or sets a TextInfo
object that indicates the default
cell text format info.
public void setDefaultCellTextInfo(TextInfo value)
public int getVerticalTextRotationAngle()
Gets or sets a VerticalTextRotationType
object that indicates
the text rotation angle in floating box or cells.
public void setVerticalTextRotationAngle(int value)
public int getVerticalAlignment()
Gets or sets a VerticalAlignmentType
object that indicates
the vertical alignment type.
public void setVerticalAlignment(int value)
public boolean getisNeedAjustByBaseLineForVertAlygnTypeTop()
Gets or sets a whether cell needs ajust vert align by baseline of content's paragraphs if selected vert align TOP
public void setisNeedAjustByBaseLineForVertAlygnTypeTop(boolean value)
public boolean isTemp()
public void isTemp(boolean value)
public int getRowSpan()
Gets or sets a int value that indicates how many rows the cell spans.
public void setRowSpan(int value)
public Object deepClone()
Clones a new Cell
object. This method clones only the format
but not contents of the cell.
deepClone
in interface com.aspose.ms.System.ICloneable
Cell
object.public Object completeClone()
Clones a new Cell
object. This method clones both format and
contents of the cell.
Cell
object.public int getAlignment()
Gets or sets a AlignmentType
object that indicates the
alignment type of the cell.
public void setAlignment(int value)
public boolean isWordWrapped()
Gets or sets a boolean value that indicates the alignment type of the cell.
public void isWordWrapped(boolean value)
public String getText()
public void setTextNameForTextualChildren(String newFontName)
setTextNameForTextualChildren
in interface ITextContainer
public void setFontSizeForTextualChildren(float newFontSize)
setFontSizeForTextualChildren
in interface ITextContainer
public float getFontHeightFromBaselineForFirstSuitableCaption(GeneratorBase usedGenerator)
Copyright © 2016 Aspose. All Rights Reserved.