public abstract class ParameterPage
extends java.lang.Object
ParameterPage paramPage = ...; //QbReport.getParameterPage() or QbChart.getParameterPage()
Writer writer = new PrintWriter(out);
HtmlParameterPageWriter paramPageWriter =
new HtmlParameterPageWriter(paramPage, writer);
paramPageWriter.writePage();
writer.flush();
writer.close();
ParameterPageWriter| Modifier and Type | Field | Description |
|---|---|---|
static int |
ALIGNMENT_CENTER |
|
static int |
ALIGNMENT_LEFT |
|
static int |
ALIGNMENT_RIGHT |
|
protected Parameters |
params |
|
static int |
TABLE_LAYOUT_HORIZONTAL |
|
static int |
TABLE_LAYOUT_VERTICAL |
| Constructor | Description |
|---|---|
ParameterPage(Parameters params,
quadbase.common.util.IQueryFileInfo dbInfo,
java.lang.String servletName,
java.lang.String[] paramPageExportFormats,
java.lang.String targetLoc,
int format,
boolean paramPageResetEnabled,
int paramPageLayout,
java.lang.String extraFormContent) |
Allocates a new ParameterPage that represents a parameter page object.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getAlignment() |
Gets the horizontal alignment of the parameter page
|
java.awt.Color |
getBackgroundColor() |
Gets the background color of the parameter page
|
java.lang.String |
getBackgroundColorHex() |
Gets the background color of the parameter page
|
java.lang.String |
getBackgroundImage() |
Gets the background image of the parameter page
|
boolean |
getDateParameterCalendar() |
Gets the state to use a pop-up calendar to choose a date for date parameters
|
java.lang.String |
getDateParameterCalendarDatepicker() |
Gets the path to the javascript and images of the pop-up calendar
|
boolean |
getDateParameterSelection() |
Gets the state to use a select drop down list to choose a date for date parameters
|
boolean |
getDateVariable() |
Gets the state to use a pop-up date calculater to choose a date for date parameters
|
java.lang.String |
getDateVariableDatepicker() |
Gets the path to the javascript and images of the pop-up date calculater
|
quadbase.common.util.IQueryFileInfo |
getDbInfo() |
internal use only.
|
java.lang.String |
getDocumentTitle() |
Gets the title of the HTML document
|
java.lang.String |
getExtraFormContent() |
internal use only.
|
java.lang.String |
getFooter() |
Gets the text that appears at the end of the Parameter page
|
int |
getFormat() |
Gets the only exporting report or chart format
|
java.lang.String |
getHeader() |
Gets the text that appears at the beginning of the Parameter page
|
java.lang.String |
getOnSubmit() |
Gets custom JavaScript action that should be done before submitting parameter form
|
Parameters |
getParameters() |
Gets all parameters information
|
java.lang.String |
getParamFormName() |
function to obtain the form name where the parameter dialog table will be put into
|
java.lang.String[] |
getParamPageExportFormats() |
internal use only.
|
java.lang.String |
getResetDisplayName() |
Gets the display name of the Reset button.
|
boolean |
getResetEnabled() |
Gets the visibility of the HTML Reset form button
|
java.lang.String |
getServletName() |
Gets the name of the servlet
|
java.lang.String |
getSubmitDisplayName() |
Gets the display name of the Submit button.
|
java.awt.Color |
getTableBackgroundColor() |
Gets the background color of the parameter table
|
java.lang.String |
getTableBackgroundColorHex() |
Gets the background color of the parameter table
|
java.awt.Color |
getTableBorderColor() |
Gets the color of the parameter table border
|
java.lang.String |
getTableBorderColorHex() |
Gets the color of the parameter table border
|
int |
getTableBorderThickness() |
Gets the thickness of the parameter table border
|
int |
getTableLayout() |
Gets the parameter table Layout (VERTICAL or HORIZONTAL)
|
boolean |
getTableOuterBorderOnly() |
Gets whether only the outer border of the parameter table will be displayed.
|
java.lang.String |
getTargetLoc() |
Gets the location of the report or chart
|
java.awt.Color |
getTextColor() |
Gets the text color of the header, footer and parameter names
|
java.lang.String |
getTextColorHex() |
Gets the text color of the header, footer and parameter names
|
java.lang.String |
getTextFont() |
Gets the text font of the header, footer and parameter names
|
int |
getTextSize() |
Gets the text size of the header, footer and parameter names
|
int |
getTextStyle() |
Gets the text style of the header, footer and parameter names
|
java.lang.String |
getTitleText() |
Gets the text of the parameter table title
|
java.awt.Color |
getTitleTextColor() |
Gets the text color of the parameter table title
|
java.lang.String |
getTitleTextColorHex() |
Gets the text color of the parameter table title
|
java.lang.String |
getTitleTextFont() |
Gets the font of the parameter table title
|
int |
getTitleTextSize() |
Gets the text size of the parameter table title
|
int |
getTitleTextStyle() |
Gets the text style of the parameter table title
|
void |
setAlignment(int alignment) |
Sets the horizontal alignment of the parameter page
|
void |
setBackgroundColor(java.awt.Color color) |
Sets the background color of the parameter page
|
void |
setBackgroundColor(java.lang.String htmlHex) |
Sets the background color of the parameter page
|
void |
setBackgroundImage(java.lang.String imagePath) |
Sets the background image of the parameter page
|
void |
setDateParameterCalendar(boolean state,
java.lang.String datepicker) |
Sets the state to use a pop-up calendar to choose a date for date parameters.
|
void |
setDateParameterSelection(boolean state) |
Sets the state to use a select drop down list to choose a date for date parameters
|
void |
setDateVariable(boolean state,
java.lang.String datepicker) |
Sets the state to use a pop-up date calculater to choose a date for date parameters.
|
void |
setDocumentTitle(java.lang.String docTitle) |
Sets the title of the HTML document
|
void |
setFooter(java.lang.String footer) |
Sets the text that appears at the end of the Parameter page
|
void |
setHeader(java.lang.String header) |
Sets the text that appears at the beginning of the Parameter page
|
void |
setJavaScriptLibPath(java.lang.String javaScriptLibPath) |
Sets path to the lib/javascript folder that contains common javascript files such as
DataTypeValidator.js, etc.
|
void |
setOnSubmit(java.lang.String onSubmit) |
Sets custom JavaScript action that should be done before submitting parameter form.
|
void |
setParamFormName(java.lang.String paramFormName) |
Function to set the form name where the parameter dialog table will be put into.
|
void |
setResetDisplayName(java.lang.String name) |
Sets the display name of the Reset button.
|
void |
setResetEnabled(boolean state) |
Sets the visibility of the HTML Reset form button
|
void |
setSubmitDisplayName(java.lang.String name) |
Sets the display name of the Submit button.
|
void |
setTableBackgroundColor(java.awt.Color color) |
Sets the background color of the parameter table
|
void |
setTableBackgroundColor(java.lang.String htmlHex) |
Sets the background color of the parameter table
|
void |
setTableBorderColor(java.awt.Color color) |
Sets the color of the parameter table border
|
void |
setTableBorderColor(java.lang.String htmlHex) |
Sets the color of the parameter table border
|
void |
setTableBorderThickness(int thickness) |
Sets the thickness of the parameter table border
|
void |
setTableLayout(int layout) |
Sets the parameter table Layout (VERTICAL or HORIZONTAL)
|
void |
setTableOuterBorderOnly(boolean state) |
Sets whether only the outer border of the parameter table will be displayed.
|
void |
setTextColor(java.awt.Color color) |
Sets the text color of the header, footer and parameter names
|
void |
setTextColor(java.lang.String htmlHex) |
Sets the text color of the header, footer and parameter names
|
void |
setTextFont(java.lang.String fontName) |
Sets the text font of the header, footer and parameter names
|
void |
setTextSize(int size) |
Sets the text size of the header, footer and parameter names
|
void |
setTextStyle(int style) |
Sets the text style of the header, footer and parameter names
|
void |
setTitleText(java.lang.String title) |
Sets the text of the parameter table title
|
void |
setTitleTextColor(java.awt.Color color) |
Sets the text color of the parameter table title
|
void |
setTitleTextColor(java.lang.String htmlHex) |
Sets the text color of the parameter table title
|
void |
setTitleTextFont(java.lang.String fontName) |
Sets the font of the parameter table title
|
void |
setTitleTextSize(int size) |
Sets the text size of the parameter table title
|
void |
setTitleTextStyle(int style) |
Sets the text style of the parameter table title
|
java.lang.String |
toCssHtmlString(java.lang.String cssFile) |
Returns an HTML with embedded CSS classes representation of the parameter page as a String.
|
java.lang.String |
toHtmlString() |
Returns an HTML representation of the parameter page as a String.
|
public static final int TABLE_LAYOUT_HORIZONTAL
public static final int TABLE_LAYOUT_VERTICAL
public static final int ALIGNMENT_CENTER
public static final int ALIGNMENT_LEFT
public static final int ALIGNMENT_RIGHT
protected Parameters params
public ParameterPage(Parameters params, quadbase.common.util.IQueryFileInfo dbInfo, java.lang.String servletName, java.lang.String[] paramPageExportFormats, java.lang.String targetLoc, int format, boolean paramPageResetEnabled, int paramPageLayout, java.lang.String extraFormContent)
public Parameters getParameters()
public quadbase.common.util.IQueryFileInfo getDbInfo()
public java.lang.String getServletName()
public java.lang.String[] getParamPageExportFormats()
public java.lang.String getTargetLoc()
public int getFormat()
public java.lang.String getExtraFormContent()
public java.lang.String toHtmlString()
throws java.io.IOException
StringWriter str = new StringWriter();
HtmlParameterPageWriter html = new HtmlParameterPageWriter(this, str);
html.writePage();
return str.toString();
java.io.IOExceptionpublic java.lang.String toCssHtmlString(java.lang.String cssFile)
throws java.io.IOException
StringWriter str = new StringWriter();
CssHtmlParameterPageWriter css = new CssHtmlParameterPageWriter(this, str);
css.setCssFile(cssFile);
css.writePage();
return str.toString();
java.io.IOExceptionpublic int getAlignment()
public void setAlignment(int alignment)
alignment - ParameterPage.ALIGNMENT_LEFT, ParameterPage.ALIGNMENT_CENTER or
ParameterPage.ALIGNMENT_.RIGHTpublic java.lang.String getHeader()
public void setHeader(java.lang.String header)
public java.lang.String getFooter()
public void setFooter(java.lang.String footer)
public java.awt.Color getTableBackgroundColor()
public void setTableBackgroundColor(java.awt.Color color)
color - the color as a java.awt.Color objectpublic java.lang.String getTableBackgroundColorHex()
public void setTableBackgroundColor(java.lang.String htmlHex)
htmlHex - the color in HTML hexadecimal RGB format (RRGGBB = red, green blue). Example:
#ffffff = WHITEpublic java.awt.Color getTableBorderColor()
public void setTableBorderColor(java.awt.Color color)
color - the color as a java.awt.Color objectpublic java.lang.String getTableBorderColorHex()
public void setTableBorderColor(java.lang.String htmlHex)
htmlHex - the color in HTML hexadecimal RGB format (RRGGBB = red, green blue). Example:
#ffffff = WHITEpublic int getTableBorderThickness()
public void setTableBorderThickness(int thickness)
thickness - thickness in pixelpublic int getTableLayout()
public void setTableLayout(int layout)
layout - [ParameterPage.TABLE_LAYOUT_HORIZONTAL | ParameterPage.TABLE_LAYOUT.VERTICAL]public boolean getTableOuterBorderOnly()
public void setTableOuterBorderOnly(boolean state)
state - the statepublic boolean getResetEnabled()
public void setResetEnabled(boolean state)
state - the statepublic java.lang.String getTextColorHex()
public void setTextColor(java.lang.String htmlHex)
htmlHex - the color in HTML hexadecimal RGB format (RRGGBB = red, green blue). Example:
#ffffff = WHITEpublic java.awt.Color getTextColor()
public void setTextColor(java.awt.Color color)
color - the color as a java.awt.Color objectpublic java.lang.String getTextFont()
public void setTextFont(java.lang.String fontName)
fontName - the name of the fontpublic int getTextSize()
public void setTextSize(int size)
size - size of the textpublic int getTextStyle()
public void setTextStyle(int style)
style - [java.awt.Font.BOLD | java.awt.Font.ITALIC]public java.lang.String getTitleText()
public void setTitleText(java.lang.String title)
title - title textpublic java.awt.Color getTitleTextColor()
public void setTitleTextColor(java.awt.Color color)
color - the color as a java.awt.Color objectpublic java.lang.String getTitleTextColorHex()
public void setTitleTextColor(java.lang.String htmlHex)
htmlHex - the color in HTML hexadecimal RGB format (RRGGBB = red, green blue). Example:
#ffffff = WHITEpublic java.lang.String getTitleTextFont()
public void setTitleTextFont(java.lang.String fontName)
fontName - the name of the fontpublic int getTitleTextSize()
public void setTitleTextSize(int size)
size - the text sizepublic int getTitleTextStyle()
public void setTitleTextStyle(int style)
style - [java.awt.Font.BOLD | java.awt.Font.ITALIC]public java.lang.String getBackgroundImage()
public void setBackgroundImage(java.lang.String imagePath)
imagePath - the image sourcepublic java.lang.String getBackgroundColorHex()
public void setBackgroundColor(java.lang.String htmlHex)
htmlHex - the color in HTML hexadecimal RGB format (RRGGBB = red, green blue). Example:
#ffffff = WHITEpublic java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color color)
color - the color as a java.awt.Color objectpublic java.lang.String getDocumentTitle()
public void setDocumentTitle(java.lang.String docTitle)
docTitle - the titlepublic void setDateParameterSelection(boolean state)
state - the statepublic boolean getDateParameterSelection()
public void setJavaScriptLibPath(java.lang.String javaScriptLibPath)
javaScriptLibPath - public void setDateParameterCalendar(boolean state,
java.lang.String datepicker)
parameterPage.setDateParameterCalendar(true, "../datepicker"); ,assuming your
web root URL is one directory down from your servlet that generates the parameter page.state - the statedatepicker - the path to the datepicker folder that contains the javascript and images for the
data picker javascript pop-up calendarpublic boolean getDateParameterCalendar()
public java.lang.String getDateParameterCalendarDatepicker()
datepicker - the path to the datepicker folder that contains the javascript and imagespublic void setDateVariable(boolean state,
java.lang.String datepicker)
state - the statedatepicker - the path to the datepicker folder that contains the javascript and images for the
data picker javascript pop-up date calculaterpublic boolean getDateVariable()
public java.lang.String getDateVariableDatepicker()
datepicker - the path to the datepicker folder that contains the javascript and imagespublic void setSubmitDisplayName(java.lang.String name)
name - the resulting display name of the buttonpublic java.lang.String getSubmitDisplayName()
public void setResetDisplayName(java.lang.String name)
name - the resulting display name of the buttonpublic java.lang.String getResetDisplayName()
public void setParamFormName(java.lang.String paramFormName)
paramFormName - public java.lang.String getParamFormName()
public java.lang.String getOnSubmit()
setOnSubmit(String)public void setOnSubmit(java.lang.String onSubmit)
onSubmit - custom JavaScript action