|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.BaseLayout
public abstract class BaseLayout
BaseLayout, the data structure to manage base table layout, include regions and span.
| Nested Class Summary | |
|---|---|
class |
BaseLayout.Region
Defines a region of rows. |
| Field Summary | |
|---|---|
protected int |
ncol
|
protected BaseLayout.Region[] |
regions
|
protected Dimension[][] |
spans
|
| Constructor Summary | |
|---|---|
BaseLayout()
|
|
| Method Summary | |
|---|---|
void |
addRegion(TableDataPath path,
BaseLayout.Region region)
Add a region to the layout, the region will be added to last position. |
void |
addRegion(TableDataPath path,
int idx,
BaseLayout.Region reg)
Add a region to specified index. |
void |
clear()
Clear all settings in the layout. |
Object |
clone()
Make a copy of the layout. |
int |
convertToGlobalRow(BaseLayout.Region region,
int subRow)
Convert a row in region to layout row. |
int |
convertToRegionRow(int row)
Convert a row in global row index in table layout to a special region's sub row index. |
int |
convertToRegionRow(int row,
boolean all)
|
protected CellBinding |
createCellBinding()
Create cell binding. |
void |
debug()
|
boolean |
equals(Object obj)
Check if equals another object. |
boolean |
equals(Object obj,
boolean all)
Check if equals another object. |
boolean |
equalsContent(Object obj)
Check the obj is eqauls with this object or not. |
Rectangle |
findSpan(int row,
int col)
Find the span cells that covers this cell. |
abstract TableDataPath |
fixPathForRegion(TableDataPath path)
Fix the table data path for region data path. |
CellBinding |
getCellBinding(int r,
int c)
Get cell binding. |
int |
getColCount()
Get the number of columns in the table layout. |
boolean[] |
getMergedGroup()
Check the merge group cell option. |
BaseLayout.Region |
getRegion(int index)
Get the region in the specified index. |
BaseLayout.Region |
getRegion(TableDataPath path)
Get the region defined for the data path. |
int |
getRegionCount()
Get region count. |
List |
getRegionDataPaths()
Get all the data path that have region defined. |
TableDataPath |
getRegionPath(BaseLayout.Region region)
Get the specified region's path. |
BaseLayout.Region[] |
getRegions()
Get all regions defined in this layout. |
int |
getRowCount()
Get row count. |
int |
getRowCount(boolean all)
Get row count. |
int |
getRowHeight(int r)
Get row height. |
Dimension |
getSpan(int r,
int c)
Get the span setting for the specified row and column. |
int |
getVisibleRowCount()
Get row count, ignore the invisble region's row count. |
boolean |
hasCrossRegionSpan(int r,
int c)
Get the span setting for the specified row and column. |
void |
insertColumn(int col)
Insert a column before the specified column. |
void |
insertRow(BaseLayout.Region region,
int subRow)
Insert a row to the specified region. |
void |
insertRow(int row)
Insert a row above the specified row. |
BaseLayout.Region |
locateRegion(int row)
Locate a region by the global row index. |
BaseLayout.Region |
locateRegion(TableDataPath path)
Locate region by table data path. |
int |
locateRegionIndex(int row)
Locate region index by the global row index. |
int |
locateRow(TableDataPath path)
Locate row by table data path. |
protected void |
parseRegions(Element tag)
Parse regions. |
protected void |
parseSpan(Element tag)
Parse span. |
void |
removeColumn(int col)
Remove a column. |
void |
removeEmptyRegions()
Remove all empty regions (regions with zero row). |
void |
removeRegion(BaseLayout.Region region)
Remove region. |
void |
removeRegion(TableDataPath path)
Remove a region for a row path. |
void |
removeRow(BaseLayout.Region region,
int subRow)
Remove a row from a region. |
void |
removeRow(int row)
Remove a row. |
void |
setCellBinding(int r,
int c,
CellBinding binding)
Set cell binding. |
void |
setColCount(int ncol)
Set the number of columns in the table layout. |
void |
setMergedGroup(boolean[] merge)
Set merging group cell option. |
void |
setRowHeight(int r,
int h)
Set row height. |
void |
setSpan(int r,
int c,
Dimension span)
Set the cell span setting for the cell. |
String |
toString()
To string, print its data structure. |
protected void |
writeRegions(PrintWriter writer)
Write regions. |
protected void |
writeSpan(PrintWriter writer)
Write span. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface inetsoft.util.XMLSerializable |
|---|
parseXML, writeXML |
| Field Detail |
|---|
protected int ncol
protected BaseLayout.Region[] regions
protected Dimension[][] spans
| Constructor Detail |
|---|
public BaseLayout()
| Method Detail |
|---|
public void removeEmptyRegions()
public int getVisibleRowCount()
public int getRowCount()
public int getRowCount(boolean all)
all - include hidden regions or not.public int getColCount()
public void setColCount(int ncol)
public void insertColumn(int col)
col - column index in the layout.public void removeColumn(int col)
col - column index in the layout.public void insertRow(int row)
row - row index in the layout.
public void insertRow(BaseLayout.Region region,
int subRow)
public void removeRow(int row)
row - row index in the layout.
public void removeRow(BaseLayout.Region region,
int subRow)
public List getRegionDataPaths()
public TableDataPath getRegionPath(BaseLayout.Region region)
public BaseLayout.Region[] getRegions()
public void addRegion(TableDataPath path,
BaseLayout.Region region)
path - a row data path.region - a cell region to display the row.
public void addRegion(TableDataPath path,
int idx,
BaseLayout.Region reg)
public void removeRegion(BaseLayout.Region region)
public void removeRegion(TableDataPath path)
path - row data path.public int getRegionCount()
public BaseLayout.Region getRegion(int index)
public BaseLayout.Region getRegion(TableDataPath path)
path - row data path.public int locateRow(TableDataPath path)
public BaseLayout.Region locateRegion(TableDataPath path)
public BaseLayout.Region locateRegion(int row)
row - the global row index in table layout.public int locateRegionIndex(int row)
public int convertToRegionRow(int row)
row - the global row index in table layout.
public int convertToRegionRow(int row,
boolean all)
public int convertToGlobalRow(BaseLayout.Region region,
int subRow)
public int getRowHeight(int r)
r - the global row index in the table layout.
public void setRowHeight(int r,
int h)
public void setCellBinding(int r,
int c,
CellBinding binding)
public CellBinding getCellBinding(int r,
int c)
public Dimension getSpan(int r,
int c)
r - the global row index in table layout.c - the global column index in table layout.
public boolean hasCrossRegionSpan(int r,
int c)
r - the global row index in table layout.c - the global column index in table layout.
public void setSpan(int r,
int c,
Dimension span)
r - global row index.c - global column index.span - span.width is the number of columns, and span.height is
the number of rows.
public Rectangle findSpan(int row,
int col)
row - the global row index in the table layout.col - the global column index in the table layout.
x - negative distance to the left of the span cell.
y - negative distance to the top of the span cell.
width - number of columns to the right of the span cell, including
the current column.
height - number of rows to the bottom of the span cell, including
the current row.
public void setMergedGroup(boolean[] merge)
public boolean[] getMergedGroup()
public void clear()
public Object clone()
clone in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic boolean equalsContent(Object obj)
public boolean equals(Object obj,
boolean all)
public String toString()
toString in class Objectprotected void writeRegions(PrintWriter writer)
protected void parseRegions(Element tag)
throws Exception
Exceptionprotected void writeSpan(PrintWriter writer)
protected void parseSpan(Element tag)
public abstract TableDataPath fixPathForRegion(TableDataPath path)
protected CellBinding createCellBinding()
public void debug()
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||