Style Intelligence v12.0

inetsoft.report
Class CellBinding

java.lang.Object
  extended by inetsoft.report.CellBinding
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable
Direct Known Subclasses:
FreehandLayout.CellBinding, GroupableCellBinding

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

Defines the per cell binding. A cell can be bound to a static text, a column, a formula.

See Also:
Serialized Form

Field Summary
static int BIND_COLUMN
          Cell binding: Bind to a column in the data table lens.
static int BIND_FORMULA
          Cell binding: Bind to a formula.
static int BIND_TEXT
          Cell binding: Static text in a cell.
static int DETAIL
          Cell binding: normal binding in a cell.
static int GROUP
          Cell binding: group binding in a cell.
static int SUMMARY
          Cell binding: summary binding in a cell.
static int UNKNOWN
          Cell binding: unknow type in a cell.
 
Constructor Summary
CellBinding()
          Default constructor.
CellBinding(int type, String value)
          Create a binding with specified type.
 
Method Summary
 Object clone()
          Make a copy of the object.
 boolean equals(Object obj)
          Check the obj is eqauls with this object or not.
 boolean equalsContent(Object obj)
          Check the obj is eqauls with this object or not.
 int getBType()
          Get cell binding structure type.
 int getType()
          Get cell binding type.
 String getValue()
          Get the binding value.
 int hashCode()
           
 boolean isAsGroup()
          Check value is as group.
 boolean isEmpty()
          Check if current binding is empty, which means no value.
protected  void parseAttributes(Element tag)
           
protected  void parseContents(Element tag)
           
 void parseXML(Element tag)
          Parse xml data into object.
 void setAsGroup(boolean asGroup)
          Set value as group.
 void setBType(int btype)
          Set cell binding structure type.
 void setFormula(String formula)
          Set the formula field when the formula is generated by the column binding.
 void setType(int type)
          Set cell binding type.
 void setValue(String value)
          Set the value of the binding.
 String toString()
           
protected  void writeAttributes(PrintWriter writer)
           
protected  void writeContents(PrintWriter writer)
           
 void writeXML(PrintWriter writer)
          Write data into xml format.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BIND_TEXT

public static final int BIND_TEXT
Cell binding: Static text in a cell.

See Also:
Constant Field Values

BIND_COLUMN

public static final int BIND_COLUMN
Cell binding: Bind to a column in the data table lens.

See Also:
Constant Field Values

BIND_FORMULA

public static final int BIND_FORMULA
Cell binding: Bind to a formula.

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
Cell binding: unknow type in a cell.

See Also:
Constant Field Values

GROUP

public static final int GROUP
Cell binding: group binding in a cell.

See Also:
Constant Field Values

DETAIL

public static final int DETAIL
Cell binding: normal binding in a cell.

See Also:
Constant Field Values

SUMMARY

public static final int SUMMARY
Cell binding: summary binding in a cell.

See Also:
Constant Field Values
Constructor Detail

CellBinding

public CellBinding()
Default constructor.


CellBinding

public CellBinding(int type,
                   String value)
Create a binding with specified type.

Parameters:
type - one of the binding types, e.g. BIND_COLUMN.
value - the binding value. See getValue().
Method Detail

getType

public int getType()
Get cell binding type.


setType

public void setType(int type)
Set cell binding type.

Parameters:
type - one of the binding types, e.g. BIND_COLUMN.

getBType

public int getBType()
Get cell binding structure type.


setBType

public void setBType(int btype)
Set cell binding structure type.

Parameters:
type - GROUP, DETAIL, or SUMMARY.

isAsGroup

public boolean isAsGroup()
Check value is as group.


setAsGroup

public void setAsGroup(boolean asGroup)
Set value as group.


getValue

public String getValue()
Get the binding value. The meaning of the value depends on the type of the binding. For text binding, the value is the static text. For column binding, the value is the column name. For formula binding, the value is formula string.


setValue

public void setValue(String value)
Set the value of the binding.


writeXML

public void writeXML(PrintWriter writer)
Write data into xml format.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable

writeAttributes

protected void writeAttributes(PrintWriter writer)

writeContents

protected void writeContents(PrintWriter writer)

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
Throws:
Exception

parseContents

protected void parseContents(Element tag)
                      throws Exception
Throws:
Exception

isEmpty

public boolean isEmpty()
Check if current binding is empty, which means no value.


clone

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

Overrides:
clone in class Object

equalsContent

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


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

setFormula

public void setFormula(String formula)
Set the formula field when the formula is generated by the column binding.


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