Style Intelligence v12.0

inetsoft.report
Class BaseLayout.Region

java.lang.Object
  extended by inetsoft.report.BaseLayout.Region
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable
Direct Known Subclasses:
TableLayout.VRegion
Enclosing class:
BaseLayout

public class BaseLayout.Region
extends Object
implements Serializable, Cloneable, inetsoft.util.XMLSerializable

Defines a region of rows. Each region is used to display one row in the data table lens.

See Also:
Serialized Form

Constructor Summary
BaseLayout.Region()
           
 
Method Summary
 Object clone()
          Make a copy of the region.
 Object clone(BaseLayout layout)
          Make a copy of the region.
 void debug()
           
 void debug(int[] cmax)
           
 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 r, int c)
          Find the span cells that covers this cell.
 CellBinding getCellBinding(int r, int c)
          Get the cell binding for the cell.
 TableDataPath getCellDataPath(int row, int col)
           
 int getColCount()
          Get col count.
 int getRowBinding(int r)
          Get the row in the table to map this region row to.
 int getRowCount()
          Get number of rows in the region.
 TableDataPath getRowDataPath(int row)
           
 int getRowHeight(int r)
          Get the row height.
 Dimension getSpan(int r, int c)
          Get the cell span setting for the cell.
 boolean hasCrossRegionSpan(int r, int c)
           
 void insertColumn(int col)
          Insert a column before the specified column.
 void insertRow(int row)
          Insert a row above the specified row.
 boolean isVirtual()
          Check if the cell region is virtual.
protected  void parseAttributes(Element tag)
          Parse attributes.
protected  void parseContent(Element tag)
          Parse content.
 void parseXML(Element tag)
          Parse xml data into object.
 void removeColumn(int col)
          Remove a column.
 void removeRow(int row)
          Remove a row.
 void setCellBinding(int r, int c, CellBinding binding)
          Set the cell binding for the cell.
 void setRowBinding(int r, int map)
          Set the row in the base table to map this row to.
 void setRowCount(int nrow)
          Set the number of rows in the region.
 void setRowHeight(int r, int height)
          Set the row height.
 void setSpan(int r, int c, Dimension span)
          Set the cell span setting for the cell.
 String toString()
          To string.
protected  void writeAttributes(PrintWriter writer)
          Write attributes.
protected  void writeContent(PrintWriter writer)
          Write content.
 void writeXML(PrintWriter writer)
          Write to XML format.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseLayout.Region

public BaseLayout.Region()
Method Detail

isVirtual

public boolean isVirtual()
Check if the cell region is virtual.


getCellDataPath

public TableDataPath getCellDataPath(int row,
                                     int col)

getRowDataPath

public TableDataPath getRowDataPath(int row)

getRowHeight

public int getRowHeight(int r)
Get the row height.

Parameters:
r - row index.
Returns:
-1 if the height is not set, or row heights in points.

setRowHeight

public void setRowHeight(int r,
                         int height)
Set the row height.

Parameters:
r - row index.
height - -1 if the height is not set, or row heights in points.

getRowBinding

public int getRowBinding(int r)
Get the row in the table to map this region row to.


setRowBinding

public void setRowBinding(int r,
                          int map)
Set the row in the base table to map this row to. This is used in crosstab header to allow a row to map to a header without individual cell binding.


getCellBinding

public CellBinding getCellBinding(int r,
                                  int c)
Get the cell binding for the cell.

Parameters:
r - row index within the region.
c - column index within the region.

setCellBinding

public void setCellBinding(int r,
                           int c,
                           CellBinding binding)
Set the cell binding for the cell.

Parameters:
r - row index within the region.
c - column index within the region.
binding - cell binding.

insertColumn

public void insertColumn(int col)
Insert a column before the specified column.

Parameters:
col - column index.

removeColumn

public void removeColumn(int col)
Remove a column.

Parameters:
col - column index.

getRowCount

public int getRowCount()
Get number of rows in the region.


setRowCount

public void setRowCount(int nrow)
Set the number of rows in the region.


insertRow

public void insertRow(int row)
Insert a row above the specified row.

Parameters:
row - row index.

removeRow

public void removeRow(int row)
Remove a row.

Parameters:
row - row index.

hasCrossRegionSpan

public boolean hasCrossRegionSpan(int r,
                                  int c)

getSpan

public Dimension getSpan(int r,
                         int c)
Get the cell span setting for the cell.

Parameters:
r - row index within the region.
c - column index within the region.

setSpan

public void setSpan(int r,
                    int c,
                    Dimension span)
Set the cell span setting for the cell.

Parameters:
r - row index within the region.
c - column index within the region.
span - span.width is the number of columns, and span.height is the number of rows.

findSpan

public Rectangle findSpan(int r,
                          int c)
Find the span cells that covers this cell.

Returns:
if a span cell covers this cell, return the following:

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.


writeXML

public void writeXML(PrintWriter writer)
Write to XML format.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable

writeAttributes

protected void writeAttributes(PrintWriter writer)
Write attributes.


writeContent

protected void writeContent(PrintWriter writer)
Write content.


parseXML

public void parseXML(Element tag)
              throws Exception
Parse xml data into object.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Throws:
Exception

parseAttributes

protected void parseAttributes(Element tag)
                        throws Exception
Parse attributes.

Throws:
Exception

parseContent

protected void parseContent(Element tag)
                     throws Exception
Parse content.

Throws:
Exception

clone

public Object clone()
Make a copy of the region.

Overrides:
clone in class Object

clone

public Object clone(BaseLayout layout)
Make a copy of the region.


equalsContent

public boolean equalsContent(Object obj)
Check the obj is eqauls with this object or not.


equals

public boolean equals(Object obj)
Check if equals another object.

Overrides:
equals in class Object
Returns:
ture if equals, false otherwise

equals

public boolean equals(Object obj,
                      boolean all)
Check if equals another object.


getColCount

public int getColCount()
Get col count.


toString

public String toString()
To string.

Overrides:
toString in class Object

debug

public void debug()

debug

public void debug(int[] cmax)

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.