|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.util.NFServletUtil
public class NFServletUtil
NFServletUtil provides methods to make server side generation of chart images and images maps easier. In order to explain the process, first we will explain the terminology:
An image, as we use it here, is essentially a picture of a chart in time. The picture is encoding into bytes using a particular mime type. (by default "image/png").
An image map is what gives the image dynamic behavior. It identifies regions of the chart image that support rollover popup messages or "drilldown" hyperlink behavior. In addition to these "regions", the image map contains a URL for the image itself.
Image and image map generation occurs in two stages. In the first stage, the image is generated along with the image map. The servlet then returns just the image map. The browser then parses the image map and requests the image using the URL in the image map.
Finally, please note that the methods in this class are intended to simplify the image/image map features that NetCharts Pro provides. A great deal of flexibility is available by explicitly managing the process using the methods in the NFImageGeneration class.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_ALT_TEMPLATE
The default template to use in the alt attribute for accessibility enhanced pages. |
static java.lang.String |
DEFAULT_MIME_TYPE
The default MIME type used when generating image. |
static java.lang.String |
DEFAULT_URL
The default URL for active labels. |
static java.lang.String |
FILE_PARAMETER
The parameter appended to file elements identifying the HTTP session variable used to hold the binary image data. |
static java.lang.String |
IMAGE_PARAMETER
The parameter appended to img elements identifying the HTTP session variable used to hold the binary image data. |
static java.lang.String |
MIME_TYPE_BMP
image/bmp |
static java.lang.String |
MIME_TYPE_JPG
image/jpg |
static java.lang.String |
MIME_TYPE_PICT
image/pict |
static java.lang.String |
MIME_TYPE_PNG
image/png |
static java.lang.String |
MIME_TYPE_SVG
image/svg+xml |
static java.lang.String |
MIME_TYPE_TGA
image/tga |
static java.lang.String |
MIME_TYPE_TIFF
image/tiff |
static java.lang.String |
MIME_TYPE_WBMP
image/wbmp |
static java.lang.String |
MIME_TYPE_XBM
image/xbm |
static java.lang.String |
MIME_TYPE_XPM
image/xpm |
Constructor Summary | |
---|---|
NFServletUtil()
|
Method Summary | |
---|---|
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription,
java.lang.String defaultHref)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName,
java.lang.String defaultHref)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getDrillDownPage(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
java.lang.String defaultHref)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getImageSrcTag(NFGraph chart,
HttpServletRequest request)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getImageSrcTag(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getImageSrcTag(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
boolean accessible,
java.lang.String chartDescription)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getImageSrcTag(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
java.lang.String servletName)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getImageSrcTag(NFGraph chart,
HttpServletRequest request,
java.lang.String mimeType,
java.lang.String servletName,
boolean accessible,
java.lang.String chartDescription)
Deprecated. Use getPage(HttpServletRequest, NFGraph, NFPageParams) |
static java.lang.String |
getPage(HttpServletRequest request,
NFGraph chart,
NFPageParams pageParams)
Generates an image from the given chart and returns an HTML page capable of displaying the generated image. |
static java.lang.String |
getRolloverJavaScript()
Deprecated. Use getScript(NFPageParams) |
static java.lang.String |
getScript(NFPageParams params)
Return the JavaScript and associated HTML used for chart presentation and interactivity. |
static boolean |
isSecondPass(HttpServletRequest request)
Deprecated. Use NFResourceServlet in your web application to handle returning image data |
static boolean |
writeImage(HttpServletRequest request,
HttpServletResponse response)
Deprecated. Use NFResourceServlet in your web application to handle returning image data |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IMAGE_PARAMETER
public static final java.lang.String FILE_PARAMETER
public static final java.lang.String DEFAULT_ALT_TEMPLATE
public static final java.lang.String DEFAULT_URL
public static final java.lang.String MIME_TYPE_PNG
public static final java.lang.String MIME_TYPE_TIFF
public static final java.lang.String MIME_TYPE_JPG
public static final java.lang.String MIME_TYPE_BMP
public static final java.lang.String MIME_TYPE_TGA
public static final java.lang.String MIME_TYPE_XPM
public static final java.lang.String MIME_TYPE_XBM
public static final java.lang.String MIME_TYPE_PICT
public static final java.lang.String MIME_TYPE_WBMP
public static final java.lang.String DEFAULT_MIME_TYPE
public static final java.lang.String MIME_TYPE_SVG
Constructor Detail |
---|
public NFServletUtil()
Method Detail |
---|
public static java.lang.String getRolloverJavaScript()
public static java.lang.String getScript(NFPageParams params)
params
- The page generation parameters
public static boolean isSecondPass(HttpServletRequest request)
request
- The servlet request. If this is the second pass,
the servlet request will have a image ID set as a session variable.
public static boolean writeImage(HttpServletRequest request, HttpServletResponse response)
request
- The servlet request. This is expected to contain
the unique image ID generated during the call to "getDrillDownPage()"response
- The output
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, java.lang.String defaultHref) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.defaultHref
- Href to use if one isn't defined for the area tag.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, boolean fullPage) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.fullPage
- Whether the full script should be included within the return.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, boolean fullPage, java.lang.String servletName) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.fullPage
- Whether the full script should be included within the return.servletName
- The name of the servlet to put into the image map to
retrieve the image.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, boolean fullPage, java.lang.String servletName, java.lang.String defaultHref) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.fullPage
- Whether the full script should be included within the return.servletName
- The name of the servlet to put into the image map to
retrieve the image.defaultHref
- Href to use if one isn't defined for the area tag.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, boolean fullPage, java.lang.String servletName, boolean accessible, java.lang.String altTemplate, java.lang.String chartDescription) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.fullPage
- Whether the full script should be included within the return.servletName
- The name of the servlet to put into the image map to
retrieve the image.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.
java.lang.Exception
public static java.lang.String getDrillDownPage(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, boolean fullPage, java.lang.String servletName, boolean accessible, java.lang.String altTemplate, java.lang.String chartDescription, java.lang.String defaultHref) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.fullPage
- Whether the full script should be included within the return.servletName
- The name of the servlet to put into the image map to
retrieve the image.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.defaultHref
- Href to use if one isn't defined for the area tag.
java.lang.Exception
public static java.lang.String getImageSrcTag(NFGraph chart, HttpServletRequest request) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.
java.lang.Exception
public static java.lang.String getImageSrcTag(NFGraph chart, HttpServletRequest request, java.lang.String mimeType) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.
java.lang.Exception
public static java.lang.String getImageSrcTag(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, java.lang.String servletName) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.servletName
- The name of the servlet to put into the image map to
retrieve the image.
java.lang.Exception
public static java.lang.String getImageSrcTag(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, boolean accessible, java.lang.String chartDescription) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.accessible
- Whether accessibility features (like alt tags)
should be used in the drill down page instead of javascript based
popup labelschartDescription
- The description to be used in the alt tag on
chart images.
java.lang.Exception
public static java.lang.String getImageSrcTag(NFGraph chart, HttpServletRequest request, java.lang.String mimeType, java.lang.String servletName, boolean accessible, java.lang.String chartDescription) throws java.lang.Exception
chart
- The chart object to create the image and image map for.request
- The servlet request. Session information about the image
will be written here.mimeType
- The image MIME type of the image to produce.servletName
- The name of the servlet to put into the image map to
retrieve the image.accessible
- Whether accessibility features (like alt tags)
should be used in the drill down page instead of javascript based
popup labelschartDescription
- The description to be used in the alt tag on
chart images.
java.lang.Exception
public static java.lang.String getPage(HttpServletRequest request, NFGraph chart, NFPageParams pageParams) throws java.lang.Exception
request
- The servlet request. Session information about the image
will be written here.chart
- The chart object to create the image and image map for.pageParams
- The page generation parameters.
java.lang.Exception
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |