|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
netcharts.server.util.DefaultPageCreator
Utility class for adding basic drill down and popup label capability to
simple servlets. Servlets that use this class get called twice in order
to completely render a page containing a chart image. The first pass
creates the chart image and image map and returns an HTML page. The second
pass returns the actual image data. Servlets which use this class should
have a doGet() method of the following form:
// If the browser is asking for the image data after loading
// the HMTL we sent it, then send the image data
if(DefaultPageCreator.isSecondPass(request))
{
DefaultPageCreator.writeImage(request, response);
}
else
{
// Create the chart
ServerGeneratedPage sgp = ServerGeneratedChartProxy.getServerGeneratedPage("/charts/Examples/Templates/BarChart0.cdx?type=PNG");
// Get a HTML page that implements drill down and write it
// out to the browser
String page = DefaultPageCreator.getDrillDownPage(sgp, request);
response.getWriter().write(page);
}
| Field Summary | |
static java.lang.String |
DEFAULT_SERVLET_NAME
|
| Method Summary | |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
boolean useImageWriter)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription,
java.lang.String encoding)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request,
boolean useImageWriter)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request,
boolean useImageWriter,
java.lang.String defaultImageMapURL)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription,
java.lang.String encoding)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL,
java.lang.String encoding)
Get the HTML which allows drill down and popup labels on the given chart. |
static java.lang.String |
getImagePage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request,
boolean accessible,
java.lang.String chartDescription,
java.lang.String encoding)
Get the HTML which only shows the image of the given chart. |
static java.lang.String |
getImagePage(ServerGeneratedImage chart,
java.lang.String servletName,
javax.servlet.http.HttpServletRequest request,
boolean accessible,
java.lang.String chartDescription,
java.lang.String encoding)
Get the HTML which only shows the image of the given chart. |
static boolean |
isSecondPass(javax.servlet.http.HttpServletRequest request)
Check to see if the given request is actually the browser asking for the image data (2nd pass). |
void |
process(ServerGeneratedImage chart,
java.lang.String imgSRC,
boolean fullPage,
java.lang.String defaultImageMapURL,
java.lang.Object arg)
|
static boolean |
writeImage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Write the image data to the browser. |
| Field Detail |
public static java.lang.String DEFAULT_SERVLET_NAME
| Method Detail |
public static boolean isSecondPass(javax.servlet.http.HttpServletRequest request)
request - The current request handed to the servlet.
public static boolean writeImage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - The current request handed to the servlet.response - The current response handed to the servlet.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request)
chart - The chart to convert to an image.request - The current request handed to the servlet.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request)
chart - The chart to convert to an image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL)
chart - The chart to convert to an image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.defaultImageMapURL - The URL to use when creating imagemap HREF attributes.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription,
java.lang.String encoding)
chart - The chart to convert to an image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.defaultImageMapURL - The URL to use when creating imagemap HREF attributes.accessible - Whether accessibility features (like alt tags)
should be used in the drill down page instead of javascript based
popup labelsaltTemplate - The text template used to construct alt tags on
the active regions of a drill down image (map area tags).chartDescription - The description to be used in the alt tag on
chart images.encoding - The encoding used by the server to convert Strings to bytes.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request,
boolean useImageWriter)
chart - The chart to convert to an image.request - The current request handed to the servlet.useImageWriter - Whether or not to use the ImageWriter servlet contained within this NetCharts Server context.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request,
boolean useImageWriter,
java.lang.String defaultImageMapURL)
chart - The chart to convert to an image.request - The current request handed to the servlet.useImageWriter - Whether or not to use the ImageWriter servlet contained within this NetCharts Server context.defaultImageMapURL - The URL to use when creating imagemap HREF attributes.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
boolean useImageWriter)
chart - The chart to convert to an image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.useImageWriter - Whether or not to use the ImageWriter servlet contained within this NetCharts Server context.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request)
chart - The chart to convert to an image.servletName - The servlet the browser should ask for the image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL)
chart - The chart to convert to an image.servletName - The servlet the browser should ask for the image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.defaultImageMapURL - The URL to use when creating imagemap HREF attributes.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL,
java.lang.String encoding)
chart - The chart to convert to an image.servletName - The servlet the browser should ask for the image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.defaultImageMapURL - The URL to use when creating imagemap HREF attributes.encoding - The encoding used by the server to convert Strings to bytes.
public static java.lang.String getDrillDownPage(ServerGeneratedImage chart,
java.lang.String servletName,
boolean fullPage,
javax.servlet.http.HttpServletRequest request,
java.lang.String defaultImageMapURL,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription,
java.lang.String encoding)
chart - The chart to convert to an image.servletName - The servlet the browser should ask for the image.fullPage - Specifies whether or not to return the full HTML code or just
the image related elements only.request - The current request handed to the servlet.defaultImageMapURL - The URL to use when creating imagemap HREF attributes.accessible - Whether accessibility features (like alt tags)
should be used in the drill down page instead of javascript based
popup labelsaltTemplate - The text template used to construct alt tags on
the active regions of a drill down image (map area tags).chartDescription - The description to be used in the alt tag on
chart images.encoding - The encoding used by the server to convert Strings to bytes.
public static java.lang.String getImagePage(ServerGeneratedImage chart,
javax.servlet.http.HttpServletRequest request,
boolean accessible,
java.lang.String chartDescription,
java.lang.String encoding)
chart - The chart to convert to an image.request - The current request handed to the servlet.accessible - Whether accessibility features (like alt tags)
should be used in the page.chartDescription - The description to be used in the alt tag on
chart images.encoding - The encoding used by the server to convert Strings to bytes.
public static java.lang.String getImagePage(ServerGeneratedImage chart,
java.lang.String servletName,
javax.servlet.http.HttpServletRequest request,
boolean accessible,
java.lang.String chartDescription,
java.lang.String encoding)
chart - The chart to convert to an image.servletName - The servlet the browser should ask for the image.request - The current request handed to the servlet.accessible - Whether accessibility features (like alt tags)
should be used in the page.chartDescription - The description to be used in the alt tag on
chart images.encoding - The encoding used by the server to convert Strings to bytes.
public void process(ServerGeneratedImage chart,
java.lang.String imgSRC,
boolean fullPage,
java.lang.String defaultImageMapURL,
java.lang.Object arg)
|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2004 |
Last Modified: Aug 3, 2004 |