|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.web.tag.ForeachTag
org.ujac.web.tag.PrintTableTag
public class PrintTableTag
Name: PrintTableTag
Description: A custom tag class for convinient output of tables.
| Nested Class Summary | |
|---|---|
class |
PrintTableTag.DummyColumn
Name: DummyColumn Description: A class for dummy columns which are added through the insert-column tag. |
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_TABLE_CELLS
Constant for the _TABLE_CELLS attribute. |
static String |
ATTRIBUTE_TABLE_ROW_HEIGHT
Constant for the _TABLE_ROW_HEIGHT attribute. |
static String |
ATTRIBUTE_TABLE_ROW_STYLE
Constant for the _TABLE_ROW_STYLE attribute. |
static String |
ATTRIBUTE_TABLE_ROW_TYPE
Constant for the _TABLE_ROW_TYPE attribute. |
static String |
ATTRIBUTE_TABLE_WIDTH
Constant for the _TABLE_WIDTH attribute. |
static int |
DIRECTION_AFTER
Constant for the insert direction 'after'. |
static int |
DIRECTION_BEFORE
Constant for the insert direction 'before'. |
| Fields inherited from class org.ujac.web.tag.ForeachTag |
|---|
customFormat, dateFormat, doubleFormat, integerFormat, timeFormat, timestampFormat |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
|---|---|
PrintTableTag()
|
|
| Method Summary | |
|---|---|
void |
alterColumn(String name,
float width,
int hAlign,
String title)
Alters a column at the table. |
void |
defineColumn(String name,
float width,
int hAlign,
String title,
String defaultContents)
Defines a column for the table. |
int |
doEndTag()
|
int |
doStartTag()
|
protected Object |
evalSequenceHolder()
Evaluates the sequence holder. |
int |
getBorder()
Getter method for the the property border. |
int |
getCellpadding()
Getter method for the the property cellpadding. |
int |
getCellspacing()
Getter method for the the property cellspacing. |
protected int |
getColumnIndex(String columnName)
Gets the index of the given column. |
protected Row |
getCurrentRow()
Gets the current row. |
protected String |
getDefaultContent(int idx)
Gets the default contents for the given column. |
String |
getHeight()
Getter method for the the property height. |
String |
getId()
Getter method for the the property id. |
int |
getLevelFilter()
Getter method for the the property levelFilter. |
protected int |
getNumColumns()
Gets the number of columns by row to print. |
Table |
getTable()
Getter method for the the property table. |
String |
getTemplate()
Getter method for the the property template. |
Column[] |
getVisibleColumns()
Gets all visible columns. |
String |
getWidth()
Getter method for the the property width. |
float[] |
getWidths()
Getter method for the the property widths. |
void |
insertColumn(String name,
float width,
int hAlign,
String title,
String reference,
int direction,
String defaultContents)
Inserts a column into the table. |
protected boolean |
isColumnStylesDefined()
Tells whether or not the column styles had been defined so far. |
boolean |
isFooterPrinted()
Getter method for the the property footerPrinted. |
boolean |
isHeaderPrinted()
Getter method for the the property headerPrinted. |
boolean |
isOutputStarted()
Checks whether the table output has been started or not. |
void |
release()
|
void |
removeColumn(String name)
Removes a column from the table. |
void |
setBorder(int border)
Setter method for the the property border. |
void |
setCellpadding(int cellpadding)
Setter method for the the property cellpadding. |
void |
setCellspacing(int cellspacing)
Setter method for the the property cellspacing. |
protected void |
setColumnAttributes(Column column,
List columnAttributes)
Sets the column styles. |
void |
setFooterPrinted(boolean footerPrinted)
Setter method for the the property footerPrinted. |
void |
setHeaderPrinted(boolean headerPrinted)
Setter method for the the property headerPrinted. |
void |
setHeight(String height)
Setter method for the the property height. |
void |
setId(String id)
Setter method for the the property id. |
void |
setLevelFilter(int levelFilter)
Setter method for the the property levelFilter. |
void |
setTemplate(String template)
Setter method for the the property template. |
void |
setWidth(String width)
Setter method for the the property width. |
| Methods inherited from class org.ujac.web.tag.ForeachTag |
|---|
doAfterBody, evalTemplate, getAttribute, getCurrentValue, getEvenStyle, getIterationIdx, getLoopVariable, getOddStyle, getPageContext, getParent, getSequence, getSequenceHolder, getSequenceIterator, getTemplateContext, getTemplateInterpreter, isEvenIteration, setAttribute, setDateFormat, setDoubleFormat, setEvenStyle, setIntegerFormat, setLoopVariable, setOddStyle, setPageContext, setParent, setSequence, setTimeFormat, setTimestampFormat |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DIRECTION_BEFORE
public static final int DIRECTION_AFTER
public static final String ATTRIBUTE_TABLE_ROW_STYLE
public static final String ATTRIBUTE_TABLE_ROW_TYPE
public static final String ATTRIBUTE_TABLE_ROW_HEIGHT
public static final String ATTRIBUTE_TABLE_CELLS
public static final String ATTRIBUTE_TABLE_WIDTH
| Constructor Detail |
|---|
public PrintTableTag()
| Method Detail |
|---|
public int getBorder()
public void setBorder(int border)
border - The value to set for the property border.public String getId()
public void setId(String id)
id - The value to set for the property id.public String getWidth()
public void setWidth(String width)
width - The value to set for the property width.public String getHeight()
public void setHeight(String height)
height - The value to set for the property height.public int getCellpadding()
public void setCellpadding(int cellpadding)
cellpadding - The value to set for the property cellpadding.public int getCellspacing()
public void setCellspacing(int cellspacing)
cellspacing - The value to set for the property cellspacing.public int getLevelFilter()
public void setLevelFilter(int levelFilter)
levelFilter - The value to set for the property levelFilter.public String getTemplate()
public void setTemplate(String template)
template - The value to set for the property template.public boolean isHeaderPrinted()
public void setHeaderPrinted(boolean headerPrinted)
headerPrinted - The value to set for the property headerPrinted.public boolean isFooterPrinted()
public void setFooterPrinted(boolean footerPrinted)
footerPrinted - The value to set for the property footerPrinted.public Column[] getVisibleColumns()
protected int getNumColumns()
protected int getColumnIndex(String columnName)
columnName - The name of the column to get the index for.
protected String getDefaultContent(int idx)
idx - The index of the column to get the default contents for.
public boolean isOutputStarted()
public Table getTable()
public float[] getWidths()
protected Row getCurrentRow()
protected Object evalSequenceHolder()
throws UjacException
evalSequenceHolder in class ForeachTagUjacException - In case the evaluation failed.
public int doStartTag()
throws JspException
doStartTag in interface TagdoStartTag in class ForeachTagJspExceptionTag.doStartTag()
public int doEndTag()
throws JspException
doEndTag in interface TagdoEndTag in class ForeachTagJspExceptionTag.doEndTag()public void release()
release in interface Tagrelease in class ForeachTagTag.release()
public void defineColumn(String name,
float width,
int hAlign,
String title,
String defaultContents)
throws JspException
name - The name of the column.width - The width of the column.hAlign - The horizontal alignment of the column.title - The title of the column.defaultContents - The default contents to use for this column.
JspException - In case the given reference column does not exist.
public void insertColumn(String name,
float width,
int hAlign,
String title,
String reference,
int direction,
String defaultContents)
throws JspException
name - The name of the new column.width - The width of the new column.hAlign - The horizontal alignment of the new column.title - The title of the column.reference - The column at which to insert the new column.direction - The insert direction. In case null was given
as reference, DIRECTION_BEFORE inserts before the
first colummn, DIRECTION_AFTER appends behind the
last column.defaultContents - The default contents to use for this column.
JspException - In case the given reference column does not exist.DIRECTION_BEFORE,
DIRECTION_AFTER
public void alterColumn(String name,
float width,
int hAlign,
String title)
throws JspException
name - The name of the new column.width - The width of the new column.hAlign - The horizontal alignment of the new column.title - The title of the column.
JspException - In case the given reference column does not exist.
public void removeColumn(String name)
throws JspException
name - The name of the new column.
JspException - In case the given column does not exist.protected boolean isColumnStylesDefined()
protected void setColumnAttributes(Column column,
List columnAttributes)
column - The column.columnAttributes - The column attribute list.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||