Compiere 3.1

org.compiere.print
Class PrintDataElement

java.lang.Object
  extended by org.compiere.print.PrintDataElement

public class PrintDataElement
extends Object

Print Data Element

Version:
$Id: PrintDataElement.java,v 1.2 2006/07/30 00:53:02 jjanke Exp $
Author:
Jorg Janke

Field Summary
static String XML_ATTRIBUTE_KEY
          XML Attribute Key
static String XML_ATTRIBUTE_NAME
          XML Attribute Name
static String XML_TAG
          XML Element Name
 
Constructor Summary
PrintDataElement(String columnName, Object value, int displayType)
          Print Data Element Constructor
PrintDataElement(String columnName, Object value, int displayType, boolean isPKey, boolean isPageBreak)
          Print Data Element Constructor
 
Method Summary
 boolean equals(Object compare)
          Equals
 String getColumnName()
          Get Name
 int getDisplayType()
          Get Display Type
 BigDecimal getFunctionValue()
          Get Function Value
 Object getValue()
          Get Node Value
 String getValueAsString()
          Get Node Data Value as String
 String getValueDisplay(Language language, int minFractionDigits)
          Get Node Value Display
 String getValueKey()
          Get Node Value Key
 int hashCode()
          HashCode
 boolean hasKey()
          Value Has Key
 boolean isDate()
          Is Value a date
 boolean isID()
          Is Value an ID
 boolean isNull()
          Is Value Null
 boolean isNumeric()
          Is Value numeric
 boolean isPageBreak()
          Column value forces page break
 boolean isPKey()
          Is Value the primary key of row
 boolean isYesNo()
          Is Value boolean
 String toString()
          String representation
 String toStringX()
          String representation with key info
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_TAG

public static final String XML_TAG
XML Element Name

See Also:
Constant Field Values

XML_ATTRIBUTE_NAME

public static final String XML_ATTRIBUTE_NAME
XML Attribute Name

See Also:
Constant Field Values

XML_ATTRIBUTE_KEY

public static final String XML_ATTRIBUTE_KEY
XML Attribute Key

See Also:
Constant Field Values
Constructor Detail

PrintDataElement

public PrintDataElement(String columnName,
                        Object value,
                        int displayType,
                        boolean isPKey,
                        boolean isPageBreak)
Print Data Element Constructor

Parameters:
columnName - name
value - display value
displayType - optional displayType
isPKey - is primary key
isPageBreak - if true force page break

PrintDataElement

public PrintDataElement(String columnName,
                        Object value,
                        int displayType)
Print Data Element Constructor

Parameters:
columnName - name
value - display value
displayType - optional displayType
Method Detail

getColumnName

public String getColumnName()
Get Name

Returns:
name

getValue

public Object getValue()
Get Node Value

Returns:
value

getFunctionValue

public BigDecimal getFunctionValue()
Get Function Value

Returns:
length or numeric value

getValueDisplay

public String getValueDisplay(Language language,
                              int minFractionDigits)
Get Node Value Display

Parameters:
language - optional language - if null nubers/dates are not formatted
minFractionDigits - minimum number of decimal digits to be used for formatting
Returns:
display value optionally formatted

getValueAsString

public String getValueAsString()
Get Node Data Value as String

Returns:
data value

getValueKey

public String getValueKey()
Get Node Value Key

Returns:
key

isNull

public boolean isNull()
Is Value Null

Returns:
true if value is null

getDisplayType

public int getDisplayType()
Get Display Type

Returns:
Display Type

isNumeric

public boolean isNumeric()
Is Value numeric

Returns:
true if value is a numeric

isDate

public boolean isDate()
Is Value a date

Returns:
true if value is a date

isID

public boolean isID()
Is Value an ID

Returns:
true if value is an ID

isYesNo

public boolean isYesNo()
Is Value boolean

Returns:
true if value is a boolean

isPKey

public boolean isPKey()
Is Value the primary key of row

Returns:
true if value is the PK

isPageBreak

public boolean isPageBreak()
Column value forces page break

Returns:
true if page break

hashCode

public int hashCode()
HashCode

Overrides:
hashCode in class Object
Returns:
hash code

equals

public boolean equals(Object compare)
Equals

Overrides:
equals in class Object
Parameters:
compare - compare object
Returns:
true if equals

toString

public String toString()
String representation

Overrides:
toString in class Object
Returns:
info

hasKey

public boolean hasKey()
Value Has Key

Returns:
true if value has a key

toStringX

public String toStringX()
String representation with key info

Returns:
info

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.