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.

用于在web页面上显示chart对象的工具类.

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
          缺省的图片的高度.
static ImageType DEFAULT_IMAGE_TYPE
          图片的类型.
static int DEFAULT_IMAGE_WIDTH
          缺省的图片的宽度.
static java.lang.String PARAM_CHART_ID
          chart id 的前缀.
static java.lang.String PARAM_CHART_IMAGE_HEIGHT
          图片的高度参数.
static java.lang.String PARAM_CHART_IMAGE_TYPE
          图片的类型参数.
static java.lang.String PARAM_CHART_IMAGE_WIDTH
          图片的宽度参数.
 
Constructor Summary
WebChart(javax.servlet.http.HttpServletRequest request, IJChart chart)
          构造器.
WebChart(javax.servlet.http.HttpServletRequest request, IJChart chart, int imageWidth, int imageHeight)
          构造器.
 
Method Summary
 void addHotspotShapeType(ChartShapeDrawType drawType)
          增加一个显示热点的图形类型.
 void clearHotspotShapeType()
          清除所有的显示热点的图形类型.
 IAreaFragment getAreaFragment()
          返回IAreaFragment对象.
 IJChart getChart()
          返回IJChart对象.
 long getCurrentChartId()
          返回当前的chart id.
 java.lang.String getDisplayServletPath()
          返回DisplayChartServlet的路径.
 java.util.Collection getHotspotShapeType()
          返回显示热点的图形类型.
 java.lang.String getImageAreas()
          返回图形的热点Area.
 int getImageHeight()
          返回图片的高度.
 ImageType getImageType()
          返回图片的类型.
 int getImageWidth()
          返回图片的宽度.
 java.lang.String getImgTagSrcValue()
          返回标签上显示的src值表示的路径.
 javax.servlet.http.HttpServletRequest getRequest()
          返回HttpServletRequest对象.
 void setAreaFragment(IAreaFragment areaFragment)
          设置IAreaFragment对象.
 void setChart(IJChart chart)
          设置IJChart对象.
 void setDisplayServletPath(java.lang.String servletPath)
          设置DisplayChartServlet的路径.
 void setImageHeight(int imageHeight)
          设置图片的高度.
 void setImageType(ImageType imageType)
          设置图片的类型.
 void setImageWidth(int imageWidth)
          设置图片的宽度.
 
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
chart id 的前缀.

See Also:
Constant Field Values

PARAM_CHART_IMAGE_WIDTH

public static final java.lang.String PARAM_CHART_IMAGE_WIDTH
图片的宽度参数.

See Also:
Constant Field Values

PARAM_CHART_IMAGE_HEIGHT

public static final java.lang.String PARAM_CHART_IMAGE_HEIGHT
图片的高度参数.

See Also:
Constant Field Values

PARAM_CHART_IMAGE_TYPE

public static final java.lang.String PARAM_CHART_IMAGE_TYPE
图片的类型参数.

See Also:
Constant Field Values

DEFAULT_IMAGE_WIDTH

public static final int DEFAULT_IMAGE_WIDTH
缺省的图片的宽度.

See Also:
Constant Field Values

DEFAULT_IMAGE_HEIGHT

public static final int DEFAULT_IMAGE_HEIGHT
缺省的图片的高度.

See Also:
Constant Field Values

DEFAULT_IMAGE_TYPE

public static final ImageType DEFAULT_IMAGE_TYPE
图片的类型.

Constructor Detail

WebChart

public WebChart(javax.servlet.http.HttpServletRequest request,
                IJChart chart)
构造器.

Parameters:
request - HttpServletRequest HttpServletRequest对象 (不可为null).
chart - IJChart IJChart对象 (不可为null).

WebChart

public WebChart(javax.servlet.http.HttpServletRequest request,
                IJChart chart,
                int imageWidth,
                int imageHeight)
构造器.

Parameters:
request - HttpServletRequest HttpServletRequest对象 (不可为null).
chart - IJChart IJChart对象 (不可为null).
imageWidth - int 图片的宽度.
imageHeight - int 图片的高度.
Method Detail

getChart

public IJChart getChart()
返回IJChart对象.

Returns:
IJChart IJChart对象 (不为null).

setChart

public void setChart(IJChart chart)
设置IJChart对象.

Parameters:
chart - IJChart IJChart对象 (不可为null).

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
返回HttpServletRequest对象.

Returns:
HttpServletRequest HttpServletRequest对象 (不为null).

getImageWidth

public int getImageWidth()
返回图片的宽度.

Returns:
int 图片的宽度.

setImageWidth

public void setImageWidth(int imageWidth)
设置图片的宽度.

Parameters:
imageWidth - int 图片的宽度.

getImageHeight

public int getImageHeight()
返回图片的高度.

Returns:
int 图片的高度.

setImageHeight

public void setImageHeight(int imageHeight)
设置图片的高度.

Parameters:
imageHeight - int 图片的高度.

getImageType

public ImageType getImageType()
返回图片的类型.

Returns:
ImageType 图片的类型.

setImageType

public void setImageType(ImageType imageType)
设置图片的类型.

Parameters:
imageType - ImageType 图片的类型 (不可为null).

getDisplayServletPath

public java.lang.String getDisplayServletPath()
返回DisplayChartServlet的路径.

Returns:
String DisplayChartServlet的路径.

getCurrentChartId

public long getCurrentChartId()
返回当前的chart id.

Returns:
long 当前的chart id.

setDisplayServletPath

public void setDisplayServletPath(java.lang.String servletPath)
设置DisplayChartServlet的路径.

Parameters:
servletPath - String DisplayChartServlet的路径 (可为null).

getAreaFragment

public IAreaFragment getAreaFragment()
返回IAreaFragment对象.

Returns:
IAreaFragment IAreaFragment对象 (不可为null).

setAreaFragment

public void setAreaFragment(IAreaFragment areaFragment)
设置IAreaFragment对象.

Parameters:
areaFragment - IAreaFragment IAreaFragment对象 (不可为null).

getImgTagSrcValue

public java.lang.String getImgTagSrcValue()
返回标签上显示的src值表示的路径.

Returns:
String

addHotspotShapeType

public void addHotspotShapeType(ChartShapeDrawType drawType)
增加一个显示热点的图形类型.

Parameters:
drawType - ChartShapeDrawType ChartShapeDrawType对象 (不可为null).

clearHotspotShapeType

public void clearHotspotShapeType()
清除所有的显示热点的图形类型.


getHotspotShapeType

public java.util.Collection getHotspotShapeType()
返回显示热点的图形类型.

Returns:
Collection list集合 (不为null).

getImageAreas

public java.lang.String getImageAreas()
返回图形的热点Area.

Returns:
String 图形的热点Area (可能为null).