org.ujac.util.table
Class HeaderRow

java.lang.Object
  extended by org.ujac.util.table.BaseRow
      extended by org.ujac.util.table.HeaderRow
All Implemented Interfaces:
Serializable, Row

public class HeaderRow
extends BaseRow
implements Row

Name: HeaderRow
Description: A class holding title row data.

Author:
lauerc
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.ujac.util.table.BaseRow
rowData, table
 
Constructor Summary
protected HeaderRow(Table table)
          Constructs a HeaderRow instance with specific attributes.
 
Method Summary
 boolean getBoolean(int columnIdx)
          Gets the boolean value from the given row.
 boolean getBoolean(String columnName)
          Gets the boolean value from the given row.
 Date getDate(int columnIdx)
          Gets the Date value from the given row.
 Date getDate(String columnName)
          Gets the Date value from the given row.
 double getDouble(int columnIdx)
          Gets the double value from the given row.
 double getDouble(String columnName)
          Gets the double value from the given row.
protected  int getFieldAlignment(LayoutHints lh)
          Gets the field alignment.
 float getFloat(int columnIdx)
          Gets the float value from the given row.
 float getFloat(String columnName)
          Gets the float value from the given row.
 int getIndex()
          Gets the colum index.
 int getInt(int columnIdx)
          Gets the integer value from the given row.
 int getInt(String columnName)
          Gets the int value from the given row.
 long getLong(int columnIdx)
          Gets the long value from the given row.
 long getLong(String columnName)
          Gets the long value from the given row.
 Object getObject(int columnIdx)
          Gets the Object value from the given row.
 Object getObject(String columnName)
          Gets the Object value from the given row.
 String getString(int columnIdx)
          Gets the String value from the given row.
 String getString(String columnName)
          Gets the String value from the given row.
 Date getTime(int columnIdx)
          Gets the Time value from the given row.
 Date getTime(String columnName)
          Gets the Time value from the given row.
 Date getTimestamp(int columnIdx)
          Gets the Timestamp value from the given row.
 Date getTimestamp(String columnName)
          Gets the Timestamp value from the given row.
 String getType()
          Gets the row type.
 void setBoolean(int columnIdx, boolean value)
          Sets the boolean value at the given row.
 void setBoolean(String columnName, boolean value)
          Sets the boolean value at the given row.
 void setDate(int columnIdx, Date value)
          Sets the Date value at the given row.
 void setDate(String columnName, Date value)
          Sets the Date value at the given row.
 void setDouble(int columnIdx, double value)
          Sets the double value at the given row.
 void setDouble(String columnName, double value)
          Sets the double value at the given row.
 void setFloat(int columnIdx, float value)
          Sets the float value at the given row.
 void setFloat(String columnName, float value)
          Sets the float value at the given row.
 void setInt(int columnIdx, int value)
          Sets the integer value at the given row.
 void setInt(String columnName, int value)
          Sets the int value at the given row.
 void setLong(int columnIdx, long value)
          Sets the long value at the given row.
 void setLong(String columnName, long value)
          Sets the long value at the given row.
 void setObject(int columnIdx, Object value)
          Sets the Object value at the given row.
 void setObject(String columnName, Object value)
          Sets the Object value at the given row.
 void setString(int columnIdx, String value)
          Sets the String value at the given row.
 void setString(String columnName, String value)
          Sets the String value at the given row.
 void setTime(int columnIdx, Date value)
          Sets the Time value at the given row.
 void setTime(String columnName, Date value)
          Sets the Time value at the given row.
 void setTimestamp(int columnIdx, Date value)
          Sets the Timestamp value at the given row.
 void setTimestamp(String columnName, Date value)
          Sets the Timestamp value at the given row.
 
Methods inherited from class org.ujac.util.table.BaseRow
asList, expandRow, formatValue, formatValue, getAlign, getAlign, getFormat, getFormat, getTable, isEndsBlock, isStartNewPage, isStartsBlock, isVisible, isVisible, readData, setAlign, setAlign, setEndsBlock, setFormat, setFormat, setStartNewPage, setStartsBlock, setVisible, setVisible, toString, writeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ujac.util.table.Row
asList, formatValue, formatValue, getAlign, getAlign, getFormat, getFormat, getTable, isEndsBlock, isStartNewPage, isStartsBlock, isVisible, isVisible, setAlign, setAlign, setEndsBlock, setFormat, setFormat, setStartNewPage, setStartsBlock, setVisible, setVisible
 

Constructor Detail

HeaderRow

protected HeaderRow(Table table)
Constructs a HeaderRow instance with specific attributes.

Parameters:
table - The table which contains this row.
Method Detail

getType

public String getType()
Description copied from interface: Row
Gets the row type.

Specified by:
getType in interface Row
Returns:
The row type.
See Also:
Row.getType()

getIndex

public int getIndex()
Description copied from interface: Row
Gets the colum index.

Specified by:
getIndex in interface Row
Returns:
The column index.
See Also:
Row.getIndex()

getString

public String getString(String columnName)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Row
Gets the String value from the given row.

Specified by:
getString in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getString(java.lang.String)

getString

public String getString(int columnIdx)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Row
Gets the String value from the given row.

Specified by:
getString in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getString(int)

setString

public void setString(String columnName,
                      String value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Sets the String value at the given row.

Specified by:
setString in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.
See Also:
Row.setString(java.lang.String, java.lang.String)

setString

public void setString(int columnIdx,
                      String value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Sets the String value at the given row.

Specified by:
setString in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setString(int, java.lang.String)

getInt

public int getInt(String columnName)
           throws ColumnNotDefinedException,
                  TypeMismatchException
Description copied from interface: Row
Gets the int value from the given row.

Specified by:
getInt in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getInt(java.lang.String)

getInt

public int getInt(int columnIdx)
           throws ColumnNotDefinedException,
                  TypeMismatchException
Description copied from interface: Row
Gets the integer value from the given row.

Specified by:
getInt in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getInt(int)

setInt

public void setInt(String columnName,
                   int value)
            throws ColumnNotDefinedException,
                   TypeMismatchException
Description copied from interface: Row
Sets the int value at the given row.

Specified by:
setInt in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setInt(java.lang.String, int)

setInt

public void setInt(int columnIdx,
                   int value)
            throws ColumnNotDefinedException,
                   TypeMismatchException
Description copied from interface: Row
Sets the integer value at the given row.

Specified by:
setInt in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setInt(int, int)

getLong

public long getLong(String columnName)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Gets the long value from the given row.

Specified by:
getLong in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getLong(java.lang.String)

getLong

public long getLong(int columnIdx)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Gets the long value from the given row.

Specified by:
getLong in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getLong(int)

setLong

public void setLong(String columnName,
                    long value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Sets the long value at the given row.

Specified by:
setLong in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setLong(java.lang.String, long)

setLong

public void setLong(int columnIdx,
                    long value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Sets the long value at the given row.

Specified by:
setLong in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setLong(int, long)

getFloat

public float getFloat(String columnName)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Gets the float value from the given row.

Specified by:
getFloat in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.
See Also:
Row.getFloat(java.lang.String)

getFloat

public float getFloat(int columnIdx)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Gets the float value from the given row.

Specified by:
getFloat in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.
See Also:
Row.getFloat(int)

setFloat

public void setFloat(String columnName,
                     float value)
              throws ColumnNotDefinedException,
                     TypeMismatchException
Description copied from interface: Row
Sets the float value at the given row.

Specified by:
setFloat in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.
See Also:
Row.setFloat(java.lang.String, float)

setFloat

public void setFloat(int columnIdx,
                     float value)
              throws ColumnNotDefinedException,
                     TypeMismatchException
Description copied from interface: Row
Sets the float value at the given row.

Specified by:
setFloat in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.
See Also:
Row.setFloat(int, float)

getDouble

public double getDouble(String columnName)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Row
Gets the double value from the given row.

Specified by:
getDouble in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getDouble(java.lang.String)

getDouble

public double getDouble(int columnIdx)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Row
Gets the double value from the given row.

Specified by:
getDouble in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getDouble(int)

setDouble

public void setDouble(String columnName,
                      double value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Sets the double value at the given row.

Specified by:
setDouble in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setDouble(java.lang.String, double)

setDouble

public void setDouble(int columnIdx,
                      double value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Sets the double value at the given row.

Specified by:
setDouble in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setDouble(int, double)

getBoolean

public boolean getBoolean(String columnName)
                   throws ColumnNotDefinedException,
                          TypeMismatchException
Description copied from interface: Row
Gets the boolean value from the given row.

Specified by:
getBoolean in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getBoolean(java.lang.String)

getBoolean

public boolean getBoolean(int columnIdx)
                   throws ColumnNotDefinedException,
                          TypeMismatchException
Description copied from interface: Row
Gets the boolean value from the given row.

Specified by:
getBoolean in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getBoolean(int)

setBoolean

public void setBoolean(String columnName,
                       boolean value)
                throws ColumnNotDefinedException,
                       TypeMismatchException
Description copied from interface: Row
Sets the boolean value at the given row.

Specified by:
setBoolean in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setBoolean(java.lang.String, boolean)

setBoolean

public void setBoolean(int columnIdx,
                       boolean value)
                throws ColumnNotDefinedException,
                       TypeMismatchException
Description copied from interface: Row
Sets the boolean value at the given row.

Specified by:
setBoolean in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setBoolean(int, boolean)

getDate

public Date getDate(String columnName)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Gets the Date value from the given row.

Specified by:
getDate in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getDate(java.lang.String)

getDate

public Date getDate(int columnIdx)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Gets the Date value from the given row.

Specified by:
getDate in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getDate(int)

setDate

public void setDate(String columnName,
                    Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Sets the Date value at the given row.

Specified by:
setDate in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setDate(java.lang.String, java.util.Date)

setDate

public void setDate(int columnIdx,
                    Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Sets the Date value at the given row.

Specified by:
setDate in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setDate(int, java.util.Date)

getTime

public Date getTime(String columnName)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Gets the Time value from the given row.

Specified by:
getTime in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getTime(java.lang.String)

getTime

public Date getTime(int columnIdx)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Gets the Time value from the given row.

Specified by:
getTime in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getTime(int)

setTime

public void setTime(String columnName,
                    Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Sets the Time value at the given row.

Specified by:
setTime in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setTime(java.lang.String, java.util.Date)

setTime

public void setTime(int columnIdx,
                    Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Row
Sets the Time value at the given row.

Specified by:
setTime in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setTime(int, java.util.Date)

getTimestamp

public Date getTimestamp(String columnName)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Row
Gets the Timestamp value from the given row.

Specified by:
getTimestamp in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getTimestamp(java.lang.String)

getTimestamp

public Date getTimestamp(int columnIdx)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Row
Gets the Timestamp value from the given row.

Specified by:
getTimestamp in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.getTimestamp(int)

setTimestamp

public void setTimestamp(String columnName,
                         Date value)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Row
Sets the Timestamp value at the given row.

Specified by:
setTimestamp in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setTimestamp(java.lang.String, java.util.Date)

setTimestamp

public void setTimestamp(int columnIdx,
                         Date value)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Row
Sets the Timestamp value at the given row.

Specified by:
setTimestamp in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setTimestamp(int, java.util.Date)

getObject

public Object getObject(String columnName)
                 throws ColumnNotDefinedException
Description copied from interface: Row
Gets the Object value from the given row.

Specified by:
getObject in interface Row
Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
See Also:
Row.getObject(java.lang.String)

getObject

public Object getObject(int columnIdx)
                 throws ColumnNotDefinedException
Description copied from interface: Row
Gets the Object value from the given row.

Specified by:
getObject in interface Row
Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
See Also:
Row.getObject(int)

setObject

public void setObject(String columnName,
                      Object value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Sets the Object value at the given row.

Specified by:
setObject in interface Row
Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setObject(java.lang.String, java.lang.Object)

setObject

public void setObject(int columnIdx,
                      Object value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Row
Sets the Object value at the given row.

Specified by:
setObject in interface Row
Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
See Also:
Row.setObject(int, java.lang.Object)

getFieldAlignment

protected int getFieldAlignment(LayoutHints lh)
Gets the field alignment.

Overrides:
getFieldAlignment in class BaseRow
Parameters:
lh - The layout hints.
Returns:
The field alignment from the given layout hints.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.