Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tonbeller.jpivot.chart
Class ChartComponent

    java.lang.Object
      com.tonbeller.wcf.component.ComponentSupport
          com.tonbeller.jpivot.chart.ChartComponent

All Implemented Interfaces:
  ModelChangeListener, com.tonbeller.wcf.bookmarks.Bookmarkable, com.tonbeller.wcf.component.Component, com.tonbeller.wcf.component.Form, com.tonbeller.wcf.component.FormListener, com.tonbeller.wcf.component.LifeCycle, com.tonbeller.wcf.component.Renderable, com.tonbeller.wcf.component.RoleExprHolder, com.tonbeller.wcf.component.Visible, com.tonbeller.wcf.controller.RequestListener, java.util.EventListener, javax.servlet.http.HttpSessionBindingListener

    public class ChartComponent

extends com.tonbeller.wcf.component.ComponentSupport
implements ModelChangeListener

Contains a reference to an OlapModel. Produces a chart image.

Nested Class Summary
`class` | `ChartComponent.jpivotCategoryURLGenerator` A URLGenerator class to generate chart urls that work with jpivot
`class` | `ChartComponent.jpivotPieURLGenerator` A URLGenerator class to generate pie urls that work with jpivot

Field Summary

Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
`EXTENSIONAL, INTENSIONAL`

Constructor Summary
`ChartComponent(java.lang.String id, com.tonbeller.wcf.component.Component parent, java.lang.String ref, com.tonbeller.wcf.controller.RequestContext context)`
`ChartComponent(java.lang.String id, com.tonbeller.wcf.component.Component parent, java.lang.String ref, java.lang.String baseDisplayURL, java.lang.String controllerURL, com.tonbeller.wcf.controller.RequestContext context)` Constructor

Method Summary
`protected boolean` | `canDrillThrough(Cell cell)`
`protected com.tonbeller.wcf.table.TableModel` | `drillThrough(Cell cell)` returns a DrillThroughTableModel for the drill through
`java.lang.String` | `getAxisFontName()`
`int` | `getAxisFontSize()`
`int` | `getAxisFontStyle()`
`java.lang.String` | `getAxisTickFontName()`
`int` | `getAxisTickFontSize()`
`int` | `getAxisTickFontStyle()`
`int` | `getBgColorB()`
`int` | `getBgColorG()`
`int` | `getBgColorR()`
`int` | `getChartHeight()`
`java.lang.String` | `getChartTitle()`
`int` | `getChartType()`
`int` | `getChartWidth()`
`int` | `getColCount()`
`java.lang.String` | `getFilename()`
`java.lang.String` | `getFontName()`
`int` | `getFontSize()`
`int` | `getFontStyle()`
`java.lang.String` | `getGraphURL(com.tonbeller.wcf.controller.RequestContext context)`
`java.lang.String` | `getHorizAxisLabel()`
`java.lang.String` | `getLegendFontName()`
`int` | `getLegendFontSize()`
`int` | `getLegendFontStyle()`
`int` | `getLegendPosition()`
`boolean` | `getShowLegend()`
`int` | `getSlicerAlignment()`
`java.lang.String` | `getSlicerFontName()`
`int` | `getSlicerFontSize()`
`int` | `getSlicerFontStyle()`
`int` | `getSlicerPosition()`
`int` | `getTickLabelRotate()`
`java.lang.String` | `getVertAxisLabel()`
`void` | `initialize(com.tonbeller.wcf.controller.RequestContext context)` called once by the creating tag
`boolean` | `isDirty()` true means that render() will create a new chart
`boolean` | `isDrillThroughEnabled()`
`boolean` | `isShowSlicer()`
`void` | `modelChanged(ModelChangeEvent e)` model data have changed, e.g. user has navigated
`org.w3c.dom.Document` | `render(com.tonbeller.wcf.controller.RequestContext context)` Entry point for producing charts, called by wcf render tag.
`void` | `setAxisFontName(java.lang.String axisFontName)`
`void` | `setAxisFontSize(int axisFontSize)`
`void` | `setAxisFontStyle(int axisFontStyle)`
`void` | `setAxisTickFontName(java.lang.String axisTickFontName)`
`void` | `setAxisTickFontSize(int axisTickFontSize)`
`void` | `setAxisTickFontStyle(int axisTickFontStyle)`
`void` | `setBgColorB(int bgColorB)`
`void` | `setBgColorG(int bgColorG)`
`void` | `setBgColorR(int bgColorR)`
`void` | `setChartHeight(int chartHeight)`
`void` | `setChartTitle(java.lang.String chartTitle)`
`void` | `setChartType(int chartType)`
`void` | `setChartWidth(int chartWidth)`
`void` | `setDirty(boolean dirty)`
`void` | `setDrillThroughEnabled(boolean drillThroughEnabled)`
`void` | `setFontName(java.lang.String fontname)`
`void` | `setFontSize(int fontSize)`
`void` | `setFontStyle(int fontStyle)`
`void` | `setHorizAxisLabel(java.lang.String axisLabel)`
`void` | `setLegendFontName(java.lang.String legendFontName)`
`void` | `setLegendFontSize(int legendFontSize)`
`void` | `setLegendFontStyle(int legendFontStyle)`
`void` | `setLegendPosition(int legendPosition)`
`void` | `setShowLegend(boolean showLegend)`
`void` | `setShowSlicer(boolean showSlicer)`
`void` | `setSlicerAlignment(int slicerAlignment)`
`void` | `setSlicerFontName(java.lang.String slicerFontName)`
`void` | `setSlicerFontSize(int slicerFontSize)`
`void` | `setSlicerFontStyle(int slicerFontStyle)`
`void` | `setSlicerPosition(int slicerPosition)`
`void` | `setTickLabelRotate(int tickLabelRotate)`
`void` | `setVertAxisLabel(java.lang.String axisLabel)`
`void` | `structureChanged(ModelChangeEvent e)` major change, e.g. extensions added/removed
`java.lang.String` | `writeImageMap(java.lang.String name, org.jfree.chart.ChartRenderingInfo info, boolean useOverLibForToolTips)` Writes an image map as a String This function has been requested to be added to jfreechart Also requires slight change to ChartEntity.getImageMapAreaTag() to produce valid xml tag and use & entity in urls.

Methods inherited from class com.tonbeller.wcf.component.ComponentSupport
`addFormListener, destroy, getBookmarkState, getDispatcher, getForm, getId, getLocale, getNextView, getParent, getRoleExpr, isAutoValidate, isListeningTo, isVisible, removeFormListener, request, revert, setAutoValidate, setBookmarkState, setId, setNextView, setParent, setRoleExpr, setVisible, validate, valueBound, valueUnbound`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ChartComponent

    public ChartComponent(java.lang.String id,
                          com.tonbeller.wcf.component.Component parent,
                          java.lang.String ref,
                          java.lang.String baseDisplayURL,
                          java.lang.String controllerURL,
                          com.tonbeller.wcf.controller.RequestContext context)

  Constructor

  Parameters:
    `id` - the id of this component
    `parent` - parent component
    `ref` - a reference to an olap model
    `baseDisplayURL` - URL for chart servlet. Overrides default
    `controllerURL` - URL for web application where JPivot/WCF is running. Overrides default
    `context` - RequestContext

### ChartComponent

    public ChartComponent(java.lang.String id,
                          com.tonbeller.wcf.component.Component parent,
                          java.lang.String ref,
                          com.tonbeller.wcf.controller.RequestContext context)

Method Detail

### initialize

    public void initialize(com.tonbeller.wcf.controller.RequestContext context)
                    throws java.lang.Exception

  called once by the creating tag

  Specified by:
    `initialize` in interface `com.tonbeller.wcf.component.LifeCycle`
  Overrides:
    `initialize` in class `com.tonbeller.wcf.component.ComponentSupport`
  Throws:
    `java.lang.Exception`

### render

    public org.w3c.dom.Document render(com.tonbeller.wcf.controller.RequestContext context)
                                throws java.lang.Exception

  Entry point for producing charts, called by wcf render tag. Produces a jfreechart dataset from olap model, then creates a chart and writes it to the servlet container temp directory. Returns a DOM document for Renderer to transform into html. Requires that jfreechart servlet is installed in this application context.

  Specified by:
    `render` in interface `com.tonbeller.wcf.component.Renderable`
  Throws:
    `java.lang.Exception`

### getGraphURL

    public java.lang.String getGraphURL(com.tonbeller.wcf.controller.RequestContext context)

### writeImageMap

    public java.lang.String writeImageMap(java.lang.String name,
                                          org.jfree.chart.ChartRenderingInfo info,
                                          boolean useOverLibForToolTips)

  Writes an image map as a String This function has been requested to be added to jfreechart Also requires slight change to ChartEntity.getImageMapAreaTag() to produce valid xml tag and use & entity in urls. Diffs sent to jfreechart project - so hopefully this will be in there soon

  Parameters:
    `name` - the map name.
    `info` - the chart rendering info.
    `useOverLibForToolTips` - whether to use OverLIB for tooltips (http://www.bosrup.com/web/overlib/).

### getColCount

    public int getColCount()

  Returns:

### isDirty

    public boolean isDirty()

  true means that render() will create a new chart

### setDirty

    public void setDirty(boolean dirty)

### modelChanged

    public void modelChanged(ModelChangeEvent e)

  Description copied from interface: `ModelChangeListener`
  model data have changed, e.g. user has navigated

  Specified by:
    `modelChanged` in interface `ModelChangeListener`

### structureChanged

    public void structureChanged(ModelChangeEvent e)

  Description copied from interface: `ModelChangeListener`
  major change, e.g. extensions added/removed

  Specified by:
    `structureChanged` in interface `ModelChangeListener`

### getChartHeight

    public int getChartHeight()

  Returns:

### setChartHeight

    public void setChartHeight(int chartHeight)

  Parameters:
    `chartHeight` -

### getChartTitle

    public java.lang.String getChartTitle()

  Returns:

### setChartTitle

    public void setChartTitle(java.lang.String chartTitle)

  Parameters:
    `chartTitle` -

### getChartType

    public int getChartType()

  Returns:

### setChartType

    public void setChartType(int chartType)

  Parameters:
    `chartType` -

### getChartWidth

    public int getChartWidth()

  Returns:

### setChartWidth

    public void setChartWidth(int chartWidth)

  Parameters:
    `chartWidth` -

### getHorizAxisLabel

    public java.lang.String getHorizAxisLabel()

  Returns:

### setHorizAxisLabel

    public void setHorizAxisLabel(java.lang.String axisLabel)

  Parameters:
    `axisLabel` -

### getShowLegend

    public boolean getShowLegend()

  Returns:

### setShowLegend

    public void setShowLegend(boolean showLegend)

  Parameters:
    `showLegend` -

### getFontName

    public java.lang.String getFontName()

  Returns:

### setFontName

    public void setFontName(java.lang.String fontname)

  Parameters:
    `titleFont` -

### getVertAxisLabel

    public java.lang.String getVertAxisLabel()

  Returns:

### setVertAxisLabel

    public void setVertAxisLabel(java.lang.String axisLabel)

  Parameters:
    `axisLabel` -

### getFontSize

    public int getFontSize()

  Returns:

### setFontSize

    public void setFontSize(int fontSize)

  Parameters:
    `fontSize` -

### getFontStyle

    public int getFontStyle()

  Returns:

### setFontStyle

    public void setFontStyle(int fontStyle)

  Parameters:
    `fontStyle` -

### getBgColorB

    public int getBgColorB()

  Returns:

### setBgColorB

    public void setBgColorB(int bgColorB)

  Parameters:
    `bgColorB` -

### getBgColorG

    public int getBgColorG()

  Returns:

### setBgColorG

    public void setBgColorG(int bgColorG)

  Parameters:
    `bgColorG` -

### getBgColorR

    public int getBgColorR()

  Returns:

### setBgColorR

    public void setBgColorR(int bgColorR)

  Parameters:
    `bgColorR` -

### canDrillThrough

    protected boolean canDrillThrough(Cell cell)

### drillThrough

    protected com.tonbeller.wcf.table.TableModel drillThrough(Cell cell)

  returns a DrillThroughTableModel for the drill through

  Parameters:
    `cell` -
  Returns:

### isDrillThroughEnabled

    public boolean isDrillThroughEnabled()

### setDrillThroughEnabled

    public void setDrillThroughEnabled(boolean drillThroughEnabled)

### getAxisFontName

    public java.lang.String getAxisFontName()

  Returns:

### setAxisFontName

    public void setAxisFontName(java.lang.String axisFontName)

  Parameters:
    `axisFontName` -

### getAxisFontSize

    public int getAxisFontSize()

  Returns:

### setAxisFontSize

    public void setAxisFontSize(int axisFontSize)

  Parameters:
    `axisFontSize` -

### getAxisFontStyle

    public int getAxisFontStyle()

  Returns:

### setAxisFontStyle

    public void setAxisFontStyle(int axisFontStyle)

  Parameters:
    `axisFontStyle` -

### getLegendFontName

    public java.lang.String getLegendFontName()

  Returns:

### setLegendFontName

    public void setLegendFontName(java.lang.String legendFontName)

  Parameters:
    `legendFontName` -

### getLegendFontSize

    public int getLegendFontSize()

  Returns:

### setLegendFontSize

    public void setLegendFontSize(int legendFontSize)

  Parameters:
    `legendFontSize` -

### getLegendFontStyle

    public int getLegendFontStyle()

  Returns:

### setLegendFontStyle

    public void setLegendFontStyle(int legendFontStyle)

  Parameters:
    `legendFontStyle` -

### getSlicerAlignment

    public int getSlicerAlignment()

  Returns:

### setSlicerAlignment

    public void setSlicerAlignment(int slicerAlignment)

  Parameters:
    `slicerAlignment` -

### getSlicerFontName

    public java.lang.String getSlicerFontName()

  Returns:

### setSlicerFontName

    public void setSlicerFontName(java.lang.String slicerFontName)

  Parameters:
    `slicerFontName` -

### getSlicerFontSize

    public int getSlicerFontSize()

  Returns:

### setSlicerFontSize

    public void setSlicerFontSize(int slicerFontSize)

  Parameters:
    `slicerFontSize` -

### getSlicerFontStyle

    public int getSlicerFontStyle()

  Returns:

### setSlicerFontStyle

    public void setSlicerFontStyle(int slicerFontStyle)

  Parameters:
    `slicerFontStyle` -

### getSlicerPosition

    public int getSlicerPosition()

  Returns:

### setSlicerPosition

    public void setSlicerPosition(int slicerPosition)

  Parameters:
    `slicerPosition` -

### getLegendPosition

    public int getLegendPosition()

  Returns:

### setLegendPosition

    public void setLegendPosition(int legendPosition)

  Parameters:
    `legendPosition` -

### getAxisTickFontName

    public java.lang.String getAxisTickFontName()

  Returns:

### setAxisTickFontName

    public void setAxisTickFontName(java.lang.String axisTickFontName)

  Parameters:
    `axisTickFontName` -

### getAxisTickFontSize

    public int getAxisTickFontSize()

  Returns:

### setAxisTickFontSize

    public void setAxisTickFontSize(int axisTickFontSize)

  Parameters:
    `axisTickFontSize` -

### getAxisTickFontStyle

    public int getAxisTickFontStyle()

  Returns:

### setAxisTickFontStyle

    public void setAxisTickFontStyle(int axisTickFontStyle)

  Parameters:
    `axisTickFontStyle` -

### getTickLabelRotate

    public int getTickLabelRotate()

  Returns:
    Returns the tickLabelRotate.

### setTickLabelRotate

    public void setTickLabelRotate(int tickLabelRotate)

  Parameters:
    `tickLabelRotate` - The tickLabelRotate to set.

### isShowSlicer

    public boolean isShowSlicer()

  Returns:

### setShowSlicer

    public void setShowSlicer(boolean showSlicer)

  Parameters:
    `showSlicer` -

### getFilename

    public java.lang.String getFilename()

  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD