public class HTMLTableConverter extends StringConverter implements java.io.Serializable
HTMLTableConverter objects generate the following events:
The following example creates an HTMLTableConverter object and does the conversion.
// Create an HTMLTableConverter object. HTMLTableConverter converter = new HTMLTableConverter(); // Setup the table tag with a maximum of 25 rows/table. HTMLTable table = new HTMLTable(); converter.setMaximumTableSize(25); converter.setTable(table); // Convert the row data. // Assume the RowData object was created and initialized in a previous step. String[] html = converter.convert(rowdata);
Constructor and Description |
---|
HTMLTableConverter()
Constructs a default HTMLTableConverter object.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionCompletedListener(ActionCompletedListener listener)
Adds an ActionCompletedListener.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener.
|
void |
addSectionCompletedListener(SectionCompletedListener listener)
Adds a SectionCompletedListener.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener.
|
HTMLTable |
convertToTable(RowData rowdata,
int page)
Converts the row data specified by rowdata at the specified page into an HTMLTable object
when using the maximum table size.
|
HTMLTable[] |
convertToTables(RowData rowdata)
Converts the row data specified by rowdata into an array of HTMLTable objects.
|
HTMLHyperlink[] |
getHeaderHyperlinks()
Returns the table header's hyperlinks.
|
int |
getMaximumTableSize()
Returns the maximum number of rows in a table.
|
HTMLHyperlink |
getObjectHyperlink(RowData rowdata,
int column)
Returns the object hyperlink for the current row's specified column.
|
HTMLHyperlink |
getObjectHyperlink(RowData rowdata,
int row,
int column)
Returns the object's hyperlink at the specified row and column.
|
HTMLTable |
getTable()
Returns the default HTML table.
|
boolean |
isUseMetaData()
Indicates whether the table header is created using the
metadata.
|
void |
removeActionCompletedListener(ActionCompletedListener listener)
Removes this ActionCompletedListener from the internal list.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list.
|
void |
removeSectionCompletedListener(SectionCompletedListener listener)
Removes this SectionCompletedListener from the internal list.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list.
|
void |
setHeaderHyperlinks(HTMLHyperlink[] links)
Sets the table header's hyperlinks.
|
void |
setMaximumTableSize(int size)
Sets the maximum number of rows in a table.
|
void |
setObjectHyperlink(RowData rowdata,
HTMLHyperlink link,
int column)
Sets the object's hyperlink at the specified column within the current row.
|
void |
setObjectHyperlink(RowData rowdata,
HTMLHyperlink link,
int row,
int column)
Sets the row object's hyperlink specified by row and column.
|
void |
setTable(HTMLTable table)
Sets the default HTML table to be used during conversion.
|
void |
setUseMetaData(boolean useMetaData)
Sets whether the table header is created using the
metadata.
|
convert
public HTMLTableConverter()
public void addActionCompletedListener(ActionCompletedListener listener)
listener
- The ActionCompletedListener.removeActionCompletedListener(com.ibm.as400.access.ActionCompletedListener)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void addSectionCompletedListener(SectionCompletedListener listener)
listener
- The SectionCompletedListener.removeSectionCompletedListener(com.ibm.as400.util.servlet.SectionCompletedListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public HTMLTable[] convertToTables(RowData rowdata) throws java.beans.PropertyVetoException, RowDataException
rowdata
- The RowData object that contains the row data.java.beans.PropertyVetoException
- If a change is vetoed.RowDataException
- If a row data error occurs.public HTMLTable convertToTable(RowData rowdata, int page) throws java.beans.PropertyVetoException, RowDataException
rowdata
- The RowData object that contains the row data.page
- The specific page of the row data.java.beans.PropertyVetoException
- If a change is vetoed.RowDataException
- If a row data error occurs.public HTMLHyperlink[] getHeaderHyperlinks()
public int getMaximumTableSize()
public HTMLHyperlink getObjectHyperlink(RowData rowdata, int column)
rowdata
- The RowData object that contains the data.column
- The column number (0-based).public HTMLHyperlink getObjectHyperlink(RowData rowdata, int row, int column)
rowdata
- The RowData object that contains the data.row
- The row number (0-based).column
- The column number (0-based).public HTMLTable getTable()
public boolean isUseMetaData()
public void removeActionCompletedListener(ActionCompletedListener listener)
listener
- The ActionCompletedListener.addActionCompletedListener(com.ibm.as400.access.ActionCompletedListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removeSectionCompletedListener(SectionCompletedListener listener)
listener
- The SectionCompletedListener.addSectionCompletedListener(com.ibm.as400.util.servlet.SectionCompletedListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void setHeaderHyperlinks(HTMLHyperlink[] links) throws java.beans.PropertyVetoException
links
- The hyperlinks.java.beans.PropertyVetoException
- If a change is vetoed.public void setMaximumTableSize(int size) throws java.beans.PropertyVetoException
size
- The maximum size.java.beans.PropertyVetoException
- If a change is vetoed.public void setObjectHyperlink(RowData rowdata, HTMLHyperlink link, int column) throws RowDataException
rowdata
- The RowData object that contains the rowdata.link
- The hyperlink tag.column
- The column number (0-based).RowDataException
- If a row data exception occurs.public void setObjectHyperlink(RowData rowdata, HTMLHyperlink link, int row, int column) throws RowDataException
rowdata
- The RowData object that contains the row data.link
- The hyperlink tag.row
- The row number (0-based).column
- The column number (0-based).RowDataException
- If a row data exception occurs.public void setTable(HTMLTable table) throws java.beans.PropertyVetoException
table
- The HTML table.java.beans.PropertyVetoException
- If the change is vetoed.setUseMetaData(boolean)
public void setUseMetaData(boolean useMetaData)
useMetaData
- true if the metadata is used; false otherwise.