|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.util.table.BaseRow
public abstract class BaseRow
Name: BaseRow
Description: A base class for row implementations.
| Field Summary | |
|---|---|
protected List |
rowData
The list which holds the row data. |
protected Table |
table
The table, which contains this row. |
| Constructor Summary | |
|---|---|
BaseRow(Table table)
Constructs a BaseRow instance with specific attributes. |
|
BaseRow(Table table,
Row srcRow)
Constructs a BaseRow instance with specific attributes. |
|
| Method Summary | |
|---|---|
List |
asList()
Gets the list of elements from this row. |
protected void |
expandRow()
Expands the length of the row to the number of columns of the table. |
String |
formatValue(int columnIdx)
Formats the given column's value for output. |
String |
formatValue(String columnName)
Formats the given column's value for output. |
int |
getAlign(int columnIdx)
Gets the alignment of the given field. |
int |
getAlign(String columnName)
Gets the alignment of the given field. |
protected int |
getFieldAlignment(LayoutHints lh)
Gets the field alignment. |
Format |
getFormat(int columnIdx)
Gets the format of the given field. |
Format |
getFormat(String columnName)
Gets the format of the given field. |
Table |
getTable()
Gets the table the row is member of. |
boolean |
isEndsBlock()
Tells whether or not this row ends the current row block. |
boolean |
isStartNewPage()
Tells whether or not to start a new page before printing this row. |
boolean |
isStartsBlock()
Tells whether or not this row starts a new row block. |
boolean |
isVisible(int columnIdx)
Checks whether the given field is visible or not. |
boolean |
isVisible(String columnName)
Checks whether the given field is visible or not. |
protected void |
readData(ObjectInputStream s)
Reads the object's data from the given stream. |
void |
setAlign(int columnIdx,
int alignment)
Sets the row specific alignment for the given field. |
void |
setAlign(String columnName,
int alignment)
Sets the row specific alignment for the given field. |
void |
setEndsBlock(boolean endsBlock)
Sets the endsBlock flag. |
void |
setFormat(int columnIdx,
Format format)
Sets the row specific format for the given field. |
void |
setFormat(String columnName,
Format format)
Sets the row specific format for the given field. |
void |
setStartNewPage(boolean startNewPage)
Sets the startNewPage flag. |
void |
setStartsBlock(boolean startsBlock)
Sets the startsBlock flag. |
void |
setVisible(int columnIdx,
boolean visible)
Sets the row specific visibility flag for the given field. |
void |
setVisible(String columnName,
boolean visible)
Sets the row specific visibility flag for the given field. |
String |
toString()
|
protected void |
writeData(ObjectOutputStream s)
Writes the object's data to the given stream. |
| 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 |
|---|
getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getIndex, getInt, getInt, getLong, getLong, getObject, getObject, getString, getString, getTime, getTime, getTimestamp, getTimestamp, getType, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setObject, setObject, setString, setString, setTime, setTime, setTimestamp, setTimestamp |
| Field Detail |
|---|
protected Table table
protected List rowData
| Constructor Detail |
|---|
public BaseRow(Table table)
table - The row's table.
public BaseRow(Table table,
Row srcRow)
table - The row's table.srcRow - the row to copy.| Method Detail |
|---|
public Table getTable()
getTable in interface Rowpublic List asList()
asList in interface Row
public String formatValue(String columnName)
throws ColumnNotDefinedException,
TypeMismatchException
formatValue in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public String formatValue(int columnIdx)
throws ColumnNotDefinedException,
TypeMismatchException
formatValue in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.
public boolean isVisible(String columnName)
throws ColumnNotDefinedException
isVisible in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public boolean isVisible(int columnIdx)
throws ColumnNotDefinedException
isVisible in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public void setVisible(String columnName,
boolean visible)
throws ColumnNotDefinedException
setVisible in interface RowcolumnName - The name of the desired column.visible - The visibility flag.
ColumnNotDefinedException - In case the requested column does not exist.
public void setVisible(int columnIdx,
boolean visible)
throws ColumnNotDefinedException
setVisible in interface RowcolumnIdx - The index of the desired column.visible - The visibility flag.
ColumnNotDefinedException - In case the requested column does not exist.
public Format getFormat(String columnName)
throws ColumnNotDefinedException
getFormat in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public Format getFormat(int columnIdx)
throws ColumnNotDefinedException
getFormat in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public void setFormat(String columnName,
Format format)
throws ColumnNotDefinedException
setFormat in interface RowcolumnName - The name of the desired column.format - The format to set.
ColumnNotDefinedException - In case the requested column does not exist.
public void setFormat(int columnIdx,
Format format)
throws ColumnNotDefinedException
setFormat in interface RowcolumnIdx - The index of the desired column.format - The format to set.
ColumnNotDefinedException - In case the requested column does not exist.
public int getAlign(String columnName)
throws ColumnNotDefinedException
getAlign in interface RowcolumnName - The name of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.
public int getAlign(int columnIdx)
throws ColumnNotDefinedException
getAlign in interface RowcolumnIdx - The index of the desired column.
ColumnNotDefinedException - In case the requested column does not exist.protected int getFieldAlignment(LayoutHints lh)
lh - The layout hints.
public void setAlign(String columnName,
int alignment)
throws ColumnNotDefinedException
setAlign in interface RowcolumnName - The name of the desired column.alignment - The format to set.
ColumnNotDefinedException - In case the requested column does not exist.
public void setAlign(int columnIdx,
int alignment)
throws ColumnNotDefinedException
setAlign in interface RowcolumnIdx - The index of the desired column.alignment - The format to set.
ColumnNotDefinedException - In case the requested column does not exist.public boolean isStartNewPage()
isStartNewPage in interface Rowpublic void setStartNewPage(boolean startNewPage)
setStartNewPage in interface RowstartNewPage - The new value for the startNewPage attribute.public boolean isStartsBlock()
isStartsBlock in interface Rowpublic void setStartsBlock(boolean startsBlock)
setStartsBlock in interface RowstartsBlock - The new value for the startsBlock attribute.public boolean isEndsBlock()
isEndsBlock in interface Rowpublic void setEndsBlock(boolean endsBlock)
setEndsBlock in interface RowendsBlock - The new value for the endsBlock attribute.protected void expandRow()
public String toString()
toString in class ObjectObject.toString()
protected void writeData(ObjectOutputStream s)
throws IOException
s - The stream to write to
IOException - In case the data output failed.
protected void readData(ObjectInputStream s)
throws IOException,
ClassNotFoundException
s - The stream to read from.
IOException - In case the data reading failed.
ClassNotFoundException - In case the class to deserialize could not be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||