|
NetCharts Pro | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--netcharts.pro.util.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 |
ACCESSIBLE_PAGE
|
static java.lang.String |
DEFAULT_ALT_TEMPLATE
|
static java.lang.String |
DEFAULT_MIME_TYPE
|
static java.lang.String |
DEFAULT_URL
|
static java.lang.String |
DRILLDOWN_PAGE
|
static java.lang.String |
IMAGE_PARAMETER
|
static java.lang.String |
MIME_TYPE_BMP
|
static java.lang.String |
MIME_TYPE_JPG
|
static java.lang.String |
MIME_TYPE_PICT
|
static java.lang.String |
MIME_TYPE_PNG
|
static java.lang.String |
MIME_TYPE_TGA
|
static java.lang.String |
MIME_TYPE_TIFF
|
static java.lang.String |
MIME_TYPE_WBMP
|
static java.lang.String |
MIME_TYPE_XBM
|
static java.lang.String |
MIME_TYPE_XPM
|
static java.lang.String |
MIN_DRILLDOWN_PAGE
|
| Constructor Summary | |
NFServletUtil()
|
|
| Method Summary | |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName,
boolean accessible,
java.lang.String altTemplate,
java.lang.String chartDescription)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.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)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
boolean fullPage,
java.lang.String servletName,
java.lang.String defaultHref)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getDrillDownPage(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
java.lang.String defaultHref)
Generates an image from the given chart and returns an HTML image map that provides a reference to the page as well as javascript code to manage rollover and drilldown behavior. |
static java.lang.String |
getImageSrcTag(NFGraph chart,
netcharts.pro.util.HttpServletRequest request)
Generates an image from the given chart and returns an HTML image src tag that provides a reference to the page. |
static java.lang.String |
getImageSrcTag(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType)
Generates an image from the given chart and returns an HTML image src tag that provides a reference to the page. |
static java.lang.String |
getImageSrcTag(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
boolean accessible,
java.lang.String chartDescription)
Generates an image from the given chart and returns an HTML image src tag that provides a reference to the page. |
static java.lang.String |
getImageSrcTag(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
java.lang.String servletName)
Generates an image from the given chart and returns an HTML image src tag that provides a reference to the servlet specified. |
static java.lang.String |
getImageSrcTag(NFGraph chart,
netcharts.pro.util.HttpServletRequest request,
java.lang.String mimeType,
java.lang.String servletName,
boolean accessible,
java.lang.String chartDescription)
Generates an image from the given chart and returns an HTML image src tag that provides a reference to the servlet specified. |
static java.lang.String |
getRolloverJavaScript()
Return the JavaScript and <div> tag used for chart interactivity. |
static boolean |
isSecondPass(netcharts.pro.util.HttpServletRequest request)
Determines if this is the second pass, or image retrieval call, to this servlet. |
static boolean |
writeImage(netcharts.pro.util.HttpServletRequest request,
netcharts.pro.util.HttpServletResponse response)
Retrieves the image from the session and writes it to the response output stream. |
| 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 DRILLDOWN_PAGE
public static final java.lang.String MIN_DRILLDOWN_PAGE
public static final java.lang.String ACCESSIBLE_PAGE
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
| Constructor Detail |
public NFServletUtil()
| Method Detail |
public static java.lang.String getRolloverJavaScript()
public static boolean isSecondPass(netcharts.pro.util.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(netcharts.pro.util.HttpServletRequest request,
netcharts.pro.util.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,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getDrillDownPage(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getImageSrcTag(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getImageSrcTag(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getImageSrcTag(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getImageSrcTag(NFGraph chart,
netcharts.pro.util.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.
public static java.lang.String getImageSrcTag(NFGraph chart,
netcharts.pro.util.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.
|
NetCharts Pro | |||||||||
| 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: Apr 1, 2004 |