com.ijchart.xychart.web
Class WebChart

java.lang.Object
  extended by com.ijchart.xychart.web.WebChart

public class WebChart
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

A util class for display chart in web page.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Field Summary
static int DEFAULT_IMAGE_HEIGHT
           The default image height.
static ImageType DEFAULT_IMAGE_TYPE
           The image type.
static int DEFAULT_IMAGE_WIDTH
           The default image width.
static java.lang.String PARAM_CHART_ID
           The prefix of chart id.
static java.lang.String PARAM_CHART_IMAGE_HEIGHT
           The height parameter of image.
static java.lang.String PARAM_CHART_IMAGE_TYPE
           The type parameter of image.
static java.lang.String PARAM_CHART_IMAGE_WIDTH
           The width parameter of image.
 
Constructor Summary
WebChart(javax.servlet.http.HttpServletRequest request, IJChart chart)
           The constructor.
WebChart(javax.servlet.http.HttpServletRequest request, IJChart chart, int imageWidth, int imageHeight)
           The constructor.
 
Method Summary
 void addHotspotShapeType(ChartShapeDrawType drawType)
           Add a type of hotspot shape.
 void clearHotspotShapeType()
           Clear the types of hotspot shape.
 IAreaFragment getAreaFragment()
           Returns the IAreaFragment object.
 IJChart getChart()
           Returns the IJChart object.
 long getCurrentChartId()
           Returns the current chart id.
 java.lang.String getDisplayServletPath()
           Returns the path of DisplayChartServlet.
 java.util.Collection getHotspotShapeType()
           Returns the types of hotspot shape.
 java.lang.String getImageAreas()
           Returns the hotspot areas.
 int getImageHeight()
           Returns the image height.
 ImageType getImageType()
           Returns the image type.
 int getImageWidth()
           Returns the image width.
 java.lang.String getImgTagSrcValue()
           Returns the src value of the tag.
 javax.servlet.http.HttpServletRequest getRequest()
           Returns the HttpServletRequest object.
 void setAreaFragment(IAreaFragment areaFragment)
           Sets the IAreaFragment object.
 void setChart(IJChart chart)
           Sets the IJChart object.
 void setDisplayServletPath(java.lang.String servletPath)
           Sets the path of DisplayChartServlet.
 void setImageHeight(int imageHeight)
           Sets the image height.
 void setImageType(ImageType imageType)
           Sets the image type.
 void setImageWidth(int imageWidth)
           Sets the image width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_CHART_ID

public static final java.lang.String PARAM_CHART_ID
The prefix of chart id.

See Also:
Constant Field Values

PARAM_CHART_IMAGE_WIDTH

public static final java.lang.String PARAM_CHART_IMAGE_WIDTH
The width parameter of image.

See Also:
Constant Field Values

PARAM_CHART_IMAGE_HEIGHT

public static final java.lang.String PARAM_CHART_IMAGE_HEIGHT
The height parameter of image.

See Also:
Constant Field Values

PARAM_CHART_IMAGE_TYPE

public static final java.lang.String PARAM_CHART_IMAGE_TYPE
The type parameter of image.

See Also:
Constant Field Values

DEFAULT_IMAGE_WIDTH

public static final int DEFAULT_IMAGE_WIDTH
The default image width.

See Also:
Constant Field Values

DEFAULT_IMAGE_HEIGHT

public static final int DEFAULT_IMAGE_HEIGHT
The default image height.

See Also:
Constant Field Values

DEFAULT_IMAGE_TYPE

public static final ImageType DEFAULT_IMAGE_TYPE
The image type.

Constructor Detail

WebChart

public WebChart(javax.servlet.http.HttpServletRequest request,
                IJChart chart)
The constructor.

Parameters:
request - HttpServletRequest The HttpServletRequest object (null not permitted).
chart - IJChart The IJChart object (null not permitted).

WebChart

public WebChart(javax.servlet.http.HttpServletRequest request,
                IJChart chart,
                int imageWidth,
                int imageHeight)
The constructor.

Parameters:
request - HttpServletRequest The HttpServletRequest object (null not permitted).
chart - IJChart The IJChart object (null not permitted).
imageWidth - int The image width.
imageHeight - int The image height.
Method Detail

getChart

public IJChart getChart()
Returns the IJChart object.

Returns:
IJChart The IJChart object (never null).

setChart

public void setChart(IJChart chart)
Sets the IJChart object.

Parameters:
chart - IJChart The IJChart object (null not permitted).

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns the HttpServletRequest object.

Returns:
HttpServletRequest The HttpServletRequest object (never null).

getImageWidth

public int getImageWidth()
Returns the image width.

Returns:
int The image width.

setImageWidth

public void setImageWidth(int imageWidth)
Sets the image width.

Parameters:
imageWidth - int The image width.

getImageHeight

public int getImageHeight()
Returns the image height.

Returns:
int The image height.

setImageHeight

public void setImageHeight(int imageHeight)
Sets the image height.

Parameters:
imageHeight - int The image height.

getImageType

public ImageType getImageType()
Returns the image type.

Returns:
ImageType The image type.

setImageType

public void setImageType(ImageType imageType)
Sets the image type.

Parameters:
imageType - ImageType The image type (null not permitted).

getDisplayServletPath

public java.lang.String getDisplayServletPath()
Returns the path of DisplayChartServlet.

Returns:
String The path of DisplayChartServlet.

getCurrentChartId

public long getCurrentChartId()
Returns the current chart id.

Returns:
long The chart id.

setDisplayServletPath

public void setDisplayServletPath(java.lang.String servletPath)
Sets the path of DisplayChartServlet.

Parameters:
servletPath - String The path of DisplayChartServlet (null permitted).

getAreaFragment

public IAreaFragment getAreaFragment()
Returns the IAreaFragment object.

Returns:
IAreaFragment The IAreaFragment object (never null).

setAreaFragment

public void setAreaFragment(IAreaFragment areaFragment)
Sets the IAreaFragment object.

Parameters:
areaFragment - IAreaFragment The IAreaFragment object (null not permitted).

getImgTagSrcValue

public java.lang.String getImgTagSrcValue()
Returns the src value of the tag.

Returns:
String

addHotspotShapeType

public void addHotspotShapeType(ChartShapeDrawType drawType)
Add a type of hotspot shape.

Parameters:
drawType - ChartShapeDrawType The ChartShapeDrawType object (null not permitted).

clearHotspotShapeType

public void clearHotspotShapeType()
Clear the types of hotspot shape.


getHotspotShapeType

public java.util.Collection getHotspotShapeType()
Returns the types of hotspot shape.

Returns:
Collection The collection (never null).

getImageAreas

public java.lang.String getImageAreas()
Returns the hotspot areas.

Returns:
String The hotspot areas (maybe null).