EspressReport 6.6

quadbase.reportdesigner.ReportAPI
Class ChartObject

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by quadbase.ChartAPI.QbChartPanel
                  extended by quadbase.ChartAPI.QbChartBasic
                      extended by quadbase.ChartAPI.QbChart
                          extended by quadbase.reportdesigner.ReportAPI.ChartObject
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Externalizable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, IExportConstants, IMiscConstants, quadbase.chartviewer.IChartHolder, quadbase.common.util.IAlertable, quadbase.common.util.internal.IChart, IChartTypeConstants, IMapConstants

public class ChartObject
extends QbChart
implements IChart

A ChartObject is a chart that is wrapped by the class ReportChartObject for insertion into a report. While it is recommended to insert charts using Designer, the following snippet can be used as a template for inserting charts via the API.

    // Create ChartObject
    ChartObject chartObj = new ChartObject(...); // Specify arguments for constructor call

    // Create ReportChartObject to wrap chartObj
    ReportChartObject reportChartObject = new ReportChartObject();

    // Change chartObj properties
    ...

    // Wrap reportChartObject around chartObj
    reportChartObject.setChart(chartObj);

The ReportChartObject is then added to a report section. For example,

    report.getTableFooter().addData(reportChartObject);

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class quadbase.ChartAPI.QbChartBasic
quadbase.ChartAPI.QbChartBasic.CAxisRuler, quadbase.ChartAPI.QbChartBasic.CDataTopLabel, quadbase.ChartAPI.QbChartBasic.CDataTopLabel2, quadbase.ChartAPI.QbChartBasic.CMainTitle, quadbase.ChartAPI.QbChartBasic.CNoDataToPlotMessage, quadbase.ChartAPI.QbChartBasic.ControlPanel
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class quadbase.ChartAPI.QbChart
OLAPDATA_CONCATENATELABEL, OLAPDATA_DIRECT, OLAPDATA_TRANSPOSECOLBREAK, VIEW2D, VIEW3D
 
Fields inherited from class quadbase.ChartAPI.QbChartBasic
chart, forExportOnly, root, SURFACEDATAERROR
 
Fields inherited from class quadbase.ChartAPI.QbChartPanel
listener
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface quadbase.util.IChartTypeConstants
AREA, BAR, BOX, BUBBLE, CHARTTYPENAME, COL, COMBO_COL, COMBO_LINE, COMBO_OVERLAY, COMBO_STACKAREA, COMBOTYPENAME, DIAL, DOUGHNUT, GANTT, HILOW, HLCO, HTMLCENTER, HTMLHORIZONTAL, HTMLLEFT, HTMLRIGHT, HTMLVERTICAL, LINE, OVERLAY, PERCENTCOL, PIE, POLAR, RADAR, SCATTER, STACKAREA, STACKBAR, STACKCOL, SURFACE, TOTALTYPE, TOTALTYPE_2D, TOTALTYPE_3D, XYCHART
 
Fields inherited from interface quadbase.ChartAPI.IExportConstants
BMP, CHT, CHT_DATA, COMMA, EXCEL, FLASH, GIF, GIF_C, GIF_N, GIF_R, JPEG, JPEG_C, PAC, PDF, PNG, PNG_COMPRESSION_DEFAULT, PNG_COMPRESSION_FAST, PNG_COMPRESSION_MAX, PNG_COMPRESSION_NONE, SEMICOLON, SPACE, SVG, TPL, TXTFORMAT, WMF, XMLFORMAT
 
Fields inherited from interface quadbase.ChartAPI.IMiscConstants
ASCENDING, BACK_LINE, BOTTOM_ALIGNMENT, BOTTOM_ALIGNMENT_INSIDE, CENTER, CENTER_ALIGNMENT, CENTERALIGNMENT, CIRCLE, CLASSFILE, CROSS, CUSTOMIZE_DATA_ORDER, CUT_CORNER, DASH, DATAFILE, DESCENDING, DIAMOND, DOWN, FIT, FIXED_COLUMN, FLAT, FLAT_BORDER, GOURAUD, GOURAUD_BORDER, HORIZONTAL, INVERSE_TRIANGLE, LEFT_DOUBLECLICK, LEFT_SINGLECLICK, LEFTALIGNMENT, LOWER, NONE, NOSYMBOL, ORIGINAL_DATA_ORDER, PATTERN_BACKWARD_DIAGONAL, PATTERN_BIG_CIRCLE, PATTERN_BIG_REV_TRIANGLE, PATTERN_BIG_TRIANGLE, PATTERN_BLANK, PATTERN_CHESSBOX, PATTERN_CLUB, PATTERN_CROSS_ECLIPSE, PATTERN_DIAGONAL_CROSS, PATTERN_DIAMOND, PATTERN_FORWARD_DIAGONAL, PATTERN_HEART, PATTERN_HOLLOW_CIRCLE, PATTERN_HOLLOW_DIAMOND, PATTERN_HOLLOW_SQUARE, PATTERN_HOLLOW_TRIANGLE, PATTERN_HORIZONTAL_LINE, PATTERN_LOWER_TRIANGLE, PATTERN_MID_CROSS, PATTERN_SMALL_BLOCK, PATTERN_SMALL_CIRCLE, PATTERN_SMALL_REV_TRIANGLE, PATTERN_SMALL_TRIANGLE, PATTERN_STAR, PATTERN_THICK_BACKWARD_DIAGONAL, PATTERN_THICK_FORWARD_DIAGONAL, PATTERN_THICK_HORIZONTAL, PATTERN_THICK_VERTICAL, PATTERN_UPPER_TRIANGLE, PATTERN_VERTICAL_LINE, PLAIN, PLUS, QUERYFILE, RAISE, RIGHT, RIGHT_DOUBLECLICK, RIGHT_SINGLECLICK, RIGHTALIGNMENT, SHADOW, SQUARE, SQUARE_LEGEND, STAR, TILE, TOP_ALIGNMENT, TOP_ALIGNMENT_INSIDE, TRIANGLE, VERTICAL, WIREFRAME, XMLFILE
 
Fields inherited from interface quadbase.util.IMapConstants
CATEGORY, CLOSE, END_DATE, HIGH, LOW, OPEN, SCATTER_X, SCATTER_Y, SCATTER_Z, SECONDARY_SERIES, SECONDARY_VALUE, SERIES, START_DATE, SUB_TASK, SUMBY, TASK, VALUE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ChartObject(java.lang.Object chartInfo)
          Using chartInfo to create ChartObject.
ChartObject(QbReport qbReport, int dimension, int chartType, boolean doTransposeData, int[] transposeCol, IColumnMap cmap, java.lang.String template)
          Create an instance of ChartObject that can embedded in a ReportChartObject, which can be used to insert this chart into a report.
ChartObject(QbReport qbReport, int dimension, int chartType, boolean doTransposeData, int[] transposeCol, IColumnMap cmap, java.lang.String template, quadbase.reportdesigner.ReportElements.ReportTableElement panel)
          Creates an instance of ChartObject that can be embedded in a ReportChartObject, which can be used to insert this chart into a report.
ChartObject(QbReport qbReport, int dimension, int chartType, boolean doTransposeData, int[] transposeCol, IColumnMap cmap, java.lang.String template, quadbase.reportdesigner.ReportElements.ReportTableElement panel, boolean useSummaryData)
          Creates an instance of ChartObject that can be embedded in a ReportChartObject, which can be used to insert this chart into a report.
 
Method Summary
static ChartObject createChartObject(QbReport report, java.lang.String templateFileName)
          Method to create a new ChartObject that does NOT using report section Aggregation data.
static ChartObject createChartObject(QbReport report, java.lang.String templateFileName, ReportSection panel)
          Creates a ChartOject in a specific ReportSection.
 quadbase.chart.Chart setNewData(quadbase.chart.ColData[] colData)
          For internal use only
 
Methods inherited from class quadbase.ChartAPI.QbChart
applyAntiAliasToChartAreaOnly, applyTemplateFile, createDrillDownChart, createDrillDownChart, draw, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, exportChartToByteArray, exportChartToByteArray, exportChartToString, exportDataFile, exportDataFile, finalize, forceApplyAntiAliasToHorizontalText, getAllAlertIds, getApplet, getArgument, getBufferedImageType, getChartGraphics, getDimension, getDrillDownChart, getDrillDownChartAt, getDrillDownChartCount, getErrorMessage, getFile, getFileRecordBufferSize, getGradientDesColor, getGradientEndX, getGradientEndY, getGradientShade, getGradientStartX, getGradientStartY, geth3DControlPanel, geth3DProperties, gethAggregationInfo, gethAnnotations, gethAxis, gethBoxProperties, gethBubbleProperties, gethCanvas, gethChartPlot, gethControlRanges, gethDataLines, gethDataPoints, gethDialProperties, gethDoughnutProperties, gethDrillDown, gethDropBars, gethFlashHintBoxProperties, gethFloatingLines, gethFloatingText, gethGanttProperties, gethHistogramInfo, gethHyperLinks, gethInputData, gethLegend, gethLineProperties, gethMainTitle, gethMouseEvents, gethNoDataToPlotMessage, gethOverlayProperties, gethPieProperties, gethPolarProperties, gethPopupMenu, gethRadarProperties, gethSecondaryChart, gethSurfaceProperties, gethTable, getHTMLParamPage, getHTMLParamPage, getHTMLParamPageBlock, getHTMLParamPageBody, getHTMLParamPageBody, gethTrendLines, gethXAxis, gethXRuler, gethYAxis, gethYRuler, gethZAxis, gethZoomInfo, getImageMapDataHintBoxHandle, getLocale, getMaxCharForRecordFile, getMaxFieldSize, getMaxRecordInMemory, getModifier, getPageBufferSize, getPagingThreshold, getParameterPage, getPickDataCount, getPreferredSize, getQueryTimeout, getServletContext, getTempDirectory, getTemplateFile, getTimeZone, getTotalPageBufferSize, getTriggeredAlertDetails, getTriggeredAlertIds, getType, getUpdateVersion, getVersion, is3DShadingEnabled, isAdjustFont, isApplyGradientToChartDataOnly, isBackgroundTransparent, isBufferedImageUsed, isChartServerUsed, isDrawBorderForWMF, isEspressManagerUsed, isFieldDrillDownChart, isFieldDrillDownEnabled, isForExportOnly, isGradientCyclic, isGradientEnabled, isGrayscaleForExport, isHiLowAsCandleStick, isPrintKeyEnabled, isRefreshEnabled, loadFile, readExternal, refresh, repaintPanel, saveAs, set3DShadingEnabled, setAddOnChart, setAdjustFont, setApplet, setApplyGradientToChartDataOnly, setBackgroundTransparent, setBufferedImageType, setBufferedImageUsed, setChartGraphics, setChartServerUsed, setChartServerUsed, setChartServerUsed, setConnectURLForServer, setDebugMode, setDebugMode, setDimension, setDrawBorderForWMF, setDrillDownPath, setEspressManagerUsed, setEspressManagerUsed, setEspressManagerUsed, setFileRecordBufferSize, setForExportOnly, setGIFEnable, setGradientCyclic, setGradientDesColor, setGradientEnabled, setGradientEndX, setGradientEndY, setGradientShade, setGradientStartX, setGradientStartY, setGrayscaleForExport, setHiLowAsCandleStick, setImageMapDataHintBoxHandle, setLocale, setMaxCharForRecordFile, setMaxFieldSize, setMaxRecordInMemory, setOpaque, setPageBufferSize, setPagingThreshold, setPanelBorder, setPreferredSize, setPrintKeyEnabled, setQueryTimeout, setRefreshEnabled, setRenderingHint, setScrollBarOption, setServerAddress, setServerHosts, setServerPortNumber, setServletContext, setServletRunner, setStringCustomizer, setTempDirectory, setTimeZone, setTotalPageBufferSize, setType, setUseSingleTableForDistinctParamValue, toPickData, updateDrillDownCharts, useHttp, useServlet, useSingleTableForDistinctParamValue, writeExternal
 
Methods inherited from class quadbase.ChartAPI.QbChartBasic
actionPerformed, addKeyListener, addMouseListener, addMouseMotionListener, createChart, getChart, paint, paintAll, print, printAll, removeKeyListener, removeMouseListener, removeMouseMotionListener, setChartHolder, setViewPanel
 
Methods inherited from class quadbase.ChartAPI.QbChartPanel
addActionListener, getInsets
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChartObject

public ChartObject(QbReport qbReport,
                   int dimension,
                   int chartType,
                   boolean doTransposeData,
                   int[] transposeCol,
                   IColumnMap cmap,
                   java.lang.String template)
Create an instance of ChartObject that can embedded in a ReportChartObject, which can be used to insert this chart into a report.

Parameters:
qbReport - the parent QbReport object
dimension - either a 2D, or 3D chart. Can be either ChartObject.VIEW2D, or ChartObject.VIEW3D
chartType - the type of chart desired. Please see IChartTypeConstants.
doTransposeData - whether to transpose data prior to plotting.
transposeCol - the indices of the columns to be transposed
cmap - the column mapping to use. If using ReportData, values should correspond to ReportTable column indices.
template - the chart template file, ".tpl" to use for look & feel.

ChartObject

public ChartObject(QbReport qbReport,
                   int dimension,
                   int chartType,
                   boolean doTransposeData,
                   int[] transposeCol,
                   IColumnMap cmap,
                   java.lang.String template,
                   quadbase.reportdesigner.ReportElements.ReportTableElement panel)
Creates an instance of ChartObject that can be embedded in a ReportChartObject, which can be used to insert this chart into a report.

Parameters:
qbReport - the parent QbReport object
dimension - either a 2D, or 3D chart. Can be either ChartObject.VIEW2D, or ChartObject.VIEW3D
chartType - the type of chart desired. Please see IChartTypeConstants.
doTransposeData - whether to transpose data prior to plotting.
transposeCol - the indices of the columns to be transposed
cmap - the column mapping to use. If using ReportData, values should correspond to ReportTable column indices.
panel - reportSection/ reportTable element, target section
template - the chart template file, ".tpl" to use for look & feel.

ChartObject

public ChartObject(QbReport qbReport,
                   int dimension,
                   int chartType,
                   boolean doTransposeData,
                   int[] transposeCol,
                   IColumnMap cmap,
                   java.lang.String template,
                   quadbase.reportdesigner.ReportElements.ReportTableElement panel,
                   boolean useSummaryData)
Creates an instance of ChartObject that can be embedded in a ReportChartObject, which can be used to insert this chart into a report.

Parameters:
qbReport - the parent QbReport object
dimension - either a 2D, or 3D chart. Can be either ChartObject.VIEW2D, or ChartObject.VIEW3D
chartType - the type of chart desired. Please see IChartTypeConstants.
doTransposeData - whether to transpose data prior to plotting.
transposeCol - the indices of the columns to be transposed
cmap - the column mapping to use. If using ReportData, values should correspond to ReportTable column indices.
template - the chart template file, ".tpl" to use for look & feel.
panel - reportSection/ reportTable element, target section
useSummaryData - for fixed-field crossTab report only - create summary chart

ChartObject

public ChartObject(java.lang.Object chartInfo)
Using chartInfo to create ChartObject. User can get chartInfo from implementing IChartModifier. After creating ChartObject successfully, user can change the chart attribute using ChartObject which extends QbChart. Once the modification is done, return back the ChartObject in IChartModifier #modifyChart().

Method Detail

createChartObject

public static ChartObject createChartObject(QbReport report,
                                            java.lang.String templateFileName)
Method to create a new ChartObject that does NOT using report section Aggregation data. To load a ChartObject that using section data, please use the method createChartObject(QbReport, String, ReportSection). This method is used to create a ChartObject based on the report and the template, so that the user does not need to know in advance about the chartType, dimension nor the colInfo. The user will need to make sure that the template is applicable to the report.

This method is currently only used in the QuickDesigner to edit the chart inside the report.


createChartObject

public static ChartObject createChartObject(QbReport report,
                                            java.lang.String templateFileName,
                                            ReportSection panel)
Creates a ChartOject in a specific ReportSection.

Parameters:
report - the main report that holding the chart object
templateFileName - The chart template applicable to the report column settings
panel - the report section where the chart is to be inserted. If this parameter is set to null, it won't use any section data and the chart can be put in any section of the report
Returns:
- a ChartObject using the templateFileName
null, if an error occurs

setNewData

public quadbase.chart.Chart setNewData(quadbase.chart.ColData[] colData)
                                throws java.lang.Exception
For internal use only

Specified by:
setNewData in interface quadbase.common.util.internal.IChart
Overrides:
setNewData in class QbChart
Throws:
java.lang.Exception

EspressReport 6.6