Ontimize 5.2072EN

com.ontimize.gui.field
Class Chart

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.field.Chart
All Implemented Interfaces:
javax.accessibility.Accessible, DataComponent, FormComponent, IChartComponent, IdentifiedElement, java.awt.image.ImageObserver, Internationalization, ITemplateField, java.awt.MenuContainer, SecureElement, java.io.Serializable

public class Chart
extends javax.swing.JPanel
implements DataComponent, IChartComponent, ITemplateField

The component that allows to show the information in form of chart. Many types are allowed: bars, circles, etc.

See Also:
JFreeChart, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  java.lang.Object attribute
          A reference to attribute.
static int AVG
          Constant that sets the AVG operation identifier.
protected  java.awt.Paint backgroundPaint
           
protected  java.awt.Paint backgroundPlotPaint
           
static int BAR
          Constant that sets the BAR chart identifier.
static int BAR_3D
          Constant that sets the BAR_3D chart identifier.
protected  java.util.ResourceBundle bundle
           
protected  javax.swing.JPanel chartComponentPanel
          An instance of a chart component panel.
protected  IChartComponent chartImpl
           
protected  java.lang.Object chartPanel
          A reference for a chart panel.
static java.lang.String COUNT_COLUMN
          A key that allows to count the occurrences of a Xaxis value.
protected  java.lang.String entityName
          A reference to a entity name.
protected  java.lang.String labelX
          A reference to X label.
protected  java.lang.String labelY
          A reference to Y label.
static int LINE
          Constant that sets the LINE chart identifier.
static int MAX
          Constant that sets the MAX operation identifier.
static int MIN
          Constant that sets the MIN operation identifier.
static int PIE
          Constant that sets the PIE chart identifier.
static int PIE_3D
          Constant that sets the PIE_3D chart identifier.
protected  int prefH
          The preferred height.
protected  int prefW
          The preferred weight.
protected  javax.swing.JScrollPane scroll
          An instance of a scroll pane.
static int STACKED_3D
          Constant that sets the STACKED_3D chart identifier.
static int SUM
          Constant that sets the SUM operation identifier.
protected  java.lang.String title
           
protected  int type
          The reference to type.
protected  java.util.Hashtable value
          A reference to value.
protected  java.util.Vector visibleSeries
          A reference to a visible series.
protected  java.lang.String xAxesName
          A reference to a x Axis name.
protected  java.util.Vector yAxesName
          A reference to a y Axis name.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.ontimize.gui.field.DataComponent
COMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2
 
Fields inherited from interface com.ontimize.gui.field.FormComponent
DEBUG
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface com.ontimize.gui.SecureElement
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP
 
Fields inherited from interface com.ontimize.util.templates.ITemplateField
DATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Chart(java.util.Hashtable parameters)
          Inits parameters and Container.setLayout(LayoutManager).
 
Method Summary
 boolean checkXYDataset(java.lang.String colX, java.lang.String[] colY)
          Checks the possible inconsistency for pairs x-y dataset values.
 java.lang.Object createChart()
          Creates the chart in function of parameters: type, labelX, labelY, xAxesName, yAxesName, ...
 void createChartComponent(java.util.Hashtable parameters)
          This method create the component detecting version of JfreeChart library in classpath.
 void deleteData()
          Delete data and calls updateChart() to repaint.
 java.lang.Object getAttribute()
          Returns an #TableAttribute whether 'entity' parameter is not null.
 java.awt.Paint getBackgroundPaint()
          Gets the paint of background of charts.
 java.awt.Paint getBackgroundPlotPaint()
          Gets the paint of background in plot of charts.
 java.lang.Object getCategoryDataset(java.lang.String colX, java.lang.String[] colsY, java.lang.String[] seriesNames)
          Returns the CategoryDataset.
 java.lang.Object getCategoryDataset(java.lang.String colX, java.lang.String[] colsY, java.lang.String[] seriesNames, int[] operations)
          Gets the categoy dataset for chart.
 java.lang.Object getCategoryDataset(java.lang.String colX, java.lang.String colY, int operation)
          Gets the category dataset.
 javax.swing.JPanel getChartComponentPanel()
          Gets the component with chart panel is placed.
 java.lang.Object getChartPanel()
          Returns the chart panel.
 java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
          Returns the constraints to chart to set in the correct position in parent Container.
 java.lang.String getLabelComponentText()
          Returns the label text component.
 java.lang.Object getPieDataset(java.lang.String colX, java.lang.String colY)
          Calls to getPieDataset(String, String, int) with operation = SUM.
 java.lang.Object getPieDataset(java.lang.String colX, java.lang.String colY, int operation)
          Gets the Dataset for pie charts.
 javax.swing.JScrollPane getScrollPane()
          Gets the scroll pane where is placed.
 int getSQLDataType()
          Returns the sql data type according to java.sql.Types
 int getTemplateDataType()
          Returns the data type.
 java.lang.Object getTemplateDataValue()
          Gets the value to show in the template
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
 java.lang.Object getValue()
          Gets the parameter value.
 java.lang.Object getXYDataset(java.lang.String colX, java.lang.String[] colY, java.lang.String[] series)
          Matches the x-y pairs and adds to resultant XYDataSet.
 void init(java.util.Hashtable parameters)
          This method gets the Hashtable, processes one by one its parameters and creates the chart.
 void initPermissions()
           
 boolean isEmpty()
          Checks the data existence in component.
 boolean isHidden()
          Indicates to check the visibility condition for a component.
 boolean isModifiable()
          Checks the modifiable condition for a component.
 boolean isModified()
          This method should be return true when data have been modified.
 boolean isRequired()
          Indicates the required condition for a component.
 boolean isRestricted()
           
 void setBackgroundPaint(java.awt.Paint backgroundPaint)
          Sets the paint of background of charts.
 void setBackgroundPlotPaint(java.awt.Paint backgroundPlotPaint)
          Sets the paint of background in plot of charts.
 void setChartPreferredSize(int w, int h)
          Sets the preferred size for chart.
 void setComponentLocale(java.util.Locale l)
           
 void setModifiable(boolean modifiable)
          Establishes the modifiable condition for a component.
 void setRequired(boolean required)
          Sets required a component according to condition.
 void setResourceBundle(java.util.ResourceBundle resources)
          Sets the language resource bundle.
 void setSerieVisible(java.lang.String s, boolean visible)
          Adds to visibleSeries new visible values aned updates chart.
 void setType(int type)
          Changes the type of chart and repaints the chart.
 void setValue(java.lang.Object value)
          Sets the value for component.
 void setYAxis(java.lang.String[] yAxis)
          Sets the name or names in Y axis and updates the chart.
 void updateChart()
          Repaints the chart.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.gui.field.FormComponent
isEnabled, setEnabled, setVisible
 

Field Detail

COUNT_COLUMN

public static final java.lang.String COUNT_COLUMN
A key that allows to count the occurrences of a Xaxis value.

See Also:
Constant Field Values

PIE

public static final int PIE
Constant that sets the PIE chart identifier. By definition, PIE = 0;

See Also:
Constant Field Values

PIE_3D

public static final int PIE_3D
Constant that sets the PIE_3D chart identifier. By definition, PIE_3D = 1;

See Also:
Constant Field Values

BAR

public static final int BAR
Constant that sets the BAR chart identifier. By definition, BAR = 2;

See Also:
Constant Field Values

BAR_3D

public static final int BAR_3D
Constant that sets the BAR_3D chart identifier. By definition, BAR_3D = 3;

See Also:
Constant Field Values

STACKED_3D

public static final int STACKED_3D
Constant that sets the STACKED_3D chart identifier. By definition, STACKED_3D = 4;

See Also:
Constant Field Values

LINE

public static final int LINE
Constant that sets the LINE chart identifier. By definition, LINE = 5;

See Also:
Constant Field Values

SUM

public static final int SUM
Constant that sets the SUM operation identifier. By definition, SUM = 0;

See Also:
Constant Field Values

MAX

public static final int MAX
Constant that sets the MAX operation identifier. By definition, MAX = 1;

See Also:
Constant Field Values

MIN

public static final int MIN
Constant that sets the MIN operation identifier. By definition, MIN = 2;

See Also:
Constant Field Values

AVG

public static final int AVG
Constant that sets the AVG operation identifier. By definition, AVG = 3;

See Also:
Constant Field Values

chartComponentPanel

protected javax.swing.JPanel chartComponentPanel
An instance of a chart component panel.


scroll

protected javax.swing.JScrollPane scroll
An instance of a scroll pane.


chartPanel

protected java.lang.Object chartPanel
A reference for a chart panel. By default null.


attribute

protected java.lang.Object attribute
A reference to attribute. By default, null.


xAxesName

protected java.lang.String xAxesName
A reference to a x Axis name. By default, null.


yAxesName

protected java.util.Vector yAxesName
A reference to a y Axis name. By default, null.


visibleSeries

protected java.util.Vector visibleSeries
A reference to a visible series. By default, null.


type

protected int type
The reference to type. By default, LYNE type.


value

protected java.util.Hashtable value
A reference to value. By default, null.


labelX

protected java.lang.String labelX
A reference to X label. By default, "".


labelY

protected java.lang.String labelY
A reference to Y label. By default, "".


entityName

protected java.lang.String entityName
A reference to a entity name. By default, null.


prefW

protected int prefW
The preferred weight. By default, -1.


prefH

protected int prefH
The preferred height. By default, -1.


bundle

protected java.util.ResourceBundle bundle

title

protected java.lang.String title

backgroundPaint

protected java.awt.Paint backgroundPaint

backgroundPlotPaint

protected java.awt.Paint backgroundPlotPaint

chartImpl

protected IChartComponent chartImpl
Constructor Detail

Chart

public Chart(java.util.Hashtable parameters)
Inits parameters and Container.setLayout(LayoutManager).

Parameters:
parameters - the Hashtable with parameters
Method Detail

createChartComponent

public void createChartComponent(java.util.Hashtable parameters)
This method create the component detecting version of JfreeChart library in classpath.

Parameters:
parameters - Hashtable with parameters

setYAxis

public void setYAxis(java.lang.String[] yAxis)
Sets the name or names in Y axis and updates the chart.

Specified by:
setYAxis in interface IChartComponent
Parameters:
yAxis - the String Vector with names

setChartPreferredSize

public void setChartPreferredSize(int w,
                                  int h)
Sets the preferred size for chart.

Specified by:
setChartPreferredSize in interface IChartComponent
Parameters:
w - the width
h - the height

setSerieVisible

public void setSerieVisible(java.lang.String s,
                            boolean visible)
Adds to visibleSeries new visible values aned updates chart.

Specified by:
setSerieVisible in interface IChartComponent
Parameters:
s - the value to set visible
visible - Indicates whether other parameter is visible

getChartPanel

public java.lang.Object getChartPanel()
Returns the chart panel.

Specified by:
getChartPanel in interface IChartComponent
Returns:
the chartPanel to draw

init

public void init(java.util.Hashtable parameters)
This method gets the Hashtable, processes one by one its parameters and creates the chart.

Specified by:
init in interface FormComponent
Parameters:
parameters - the Hashtable with parameters

attribute values default required meaning
attr yes The attribute.
entity no The entity name. Mandatory when data are obtained from entity.
xaxis yes X axis name.
yaxis yes Y axis name.
type line/bar/bar3d/pie/pie3d/stacked3d line no The chart type
xlabel no The X axis label.
ylabel no The Y axis label.
width no Preferred width size in pixels for chart component.
height no Preferred height size in pixels for chart component.
title no Title to set.
bgpaint A paint registered in the ColorConstants class no Paint value to use in the panel when the Chart is contained in
bgplotpaint A paint registered in the ColorConstants class no Paint to use in the chart plot background
opaque yes/no yes no Specifies if the chart panel must be opaque or not

getConstraints

public java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
Returns the constraints to chart to set in the correct position in parent Container.

Specified by:
getConstraints in interface FormComponent
Parameters:
parentLayout - the parent Layout
Returns:
the constraints for the component

getValue

public java.lang.Object getValue()
Gets the parameter value.

Specified by:
getValue in interface DataComponent
Returns:
the value the Hashtable with vector for Xaxis and other for each Yaxis serie

setType

public void setType(int type)
Changes the type of chart and repaints the chart.

Specified by:
setType in interface IChartComponent
Parameters:
type - type of chart

setValue

public void setValue(java.lang.Object value)
Description copied from interface: DataComponent
Sets the value for component.

Specified by:
setValue in interface DataComponent
Parameters:
value - the object with value to set

updateChart

public void updateChart()
Repaints the chart.

Specified by:
updateChart in interface IChartComponent

deleteData

public void deleteData()
Delete data and calls updateChart() to repaint.

Specified by:
deleteData in interface DataComponent

isModified

public boolean isModified()
Description copied from interface: DataComponent
This method should be return true when data have been modified. The method setValue() should be change this condition.

Specified by:
isModified in interface DataComponent
Returns:
the modified condition

isRequired

public boolean isRequired()
Description copied from interface: DataComponent
Indicates the required condition for a component.

Specified by:
isRequired in interface DataComponent
Returns:
the required condition

setRequired

public void setRequired(boolean required)
Description copied from interface: DataComponent
Sets required a component according to condition.

Specified by:
setRequired in interface DataComponent
Parameters:
required - the required condition

getSQLDataType

public int getSQLDataType()
Description copied from interface: DataComponent
Returns the sql data type according to java.sql.Types

Specified by:
getSQLDataType in interface DataComponent
Returns:
the Integer type

isHidden

public boolean isHidden()
Description copied from interface: DataComponent
Indicates to check the visibility condition for a component.

Specified by:
isHidden in interface DataComponent
Returns:
the visibility condition

setModifiable

public void setModifiable(boolean modifiable)
Description copied from interface: DataComponent
Establishes the modifiable condition for a component. When component is not modifiable, data will not be deleted automatically in DeleteFields call.

Specified by:
setModifiable in interface DataComponent
Parameters:
modifiable - the boolean condition

isModifiable

public boolean isModifiable()
Description copied from interface: DataComponent
Checks the modifiable condition for a component. It is useful when it is not desired form deletes a component value.

Specified by:
isModifiable in interface DataComponent
Returns:
true when component is modifiable

isEmpty

public boolean isEmpty()
Description copied from interface: DataComponent
Checks the data existence in component.

Specified by:
isEmpty in interface DataComponent
Returns:
true when component is empty

getLabelComponentText

public java.lang.String getLabelComponentText()
Description copied from interface: DataComponent
Returns the label text component. This label will change according to the Locale.

Specified by:
getLabelComponentText in interface DataComponent
Returns:
the label text

setComponentLocale

public void setComponentLocale(java.util.Locale l)
Specified by:
setComponentLocale in interface Internationalization

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle resources)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Parameters:
resources - the new language bundle.

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Description copied from interface: Internationalization
Returns all the texts in the element suitable for being translated.

Specified by:
getTextsToTranslate in interface Internationalization
Returns:
all the texts in the element suitable for being translated.

getAttribute

public java.lang.Object getAttribute()
Returns an #TableAttribute whether 'entity' parameter is not null. In other case returns attr.

Specified by:
getAttribute in interface IdentifiedElement
Returns:
a #TableAttribute with information about entity data
See Also:
#TableAttribute

initPermissions

public void initPermissions()
Specified by:
initPermissions in interface SecureElement

isRestricted

public boolean isRestricted()
Specified by:
isRestricted in interface SecureElement

createChart

public java.lang.Object createChart()
Creates the chart in function of parameters: type, labelX, labelY, xAxesName, yAxesName, ...

Specified by:
createChart in interface IChartComponent
Returns:
a JFreeChart with the chart created

getCategoryDataset

public java.lang.Object getCategoryDataset(java.lang.String colX,
                                           java.lang.String[] colsY,
                                           java.lang.String[] seriesNames)
Returns the CategoryDataset.

Specified by:
getCategoryDataset in interface IChartComponent
See Also:
getCategoryDataset(String, String[], String[], int[])

getCategoryDataset

public java.lang.Object getCategoryDataset(java.lang.String colX,
                                           java.lang.String[] colsY,
                                           java.lang.String[] seriesNames,
                                           int[] operations)
Gets the categoy dataset for chart.

Specified by:
getCategoryDataset in interface IChartComponent
Parameters:
colX - the X col
colsY - the Y cols
seriesNames - the names of series
operations - the operations for applying to the columns. By default (operations = null), SUM is the operation
Returns:

getPieDataset

public java.lang.Object getPieDataset(java.lang.String colX,
                                      java.lang.String colY)
Calls to getPieDataset(String, String, int) with operation = SUM.

Specified by:
getPieDataset in interface IChartComponent
Parameters:
colX - the x column
colY - the y column
Returns:
the Dataset for pie chart

getPieDataset

public java.lang.Object getPieDataset(java.lang.String colX,
                                      java.lang.String colY,
                                      int operation)
Gets the Dataset for pie charts.

Specified by:
getPieDataset in interface IChartComponent
Parameters:
colX - the X col
colY - the Y col
operation - One of the possible operations: SUM, AVG, MAX or MIN
Returns:
the Dataset for pie chart

getCategoryDataset

public java.lang.Object getCategoryDataset(java.lang.String colX,
                                           java.lang.String colY,
                                           int operation)
Gets the category dataset.

Specified by:
getCategoryDataset in interface IChartComponent
Parameters:
colX - the X col
colY - the Y col
operation - the operation
Returns:

checkXYDataset

public boolean checkXYDataset(java.lang.String colX,
                              java.lang.String[] colY)
Checks the possible inconsistency for pairs x-y dataset values.

Specified by:
checkXYDataset in interface IChartComponent
Parameters:
colX -
colY -
Returns:
true when data are valid

getXYDataset

public java.lang.Object getXYDataset(java.lang.String colX,
                                     java.lang.String[] colY,
                                     java.lang.String[] series)
Matches the x-y pairs and adds to resultant XYDataSet.

Specified by:
getXYDataset in interface IChartComponent
Parameters:
colX - the X col
colY - the Y cols
series - the name of series
Returns:
the matched xy Dataset

getBackgroundPaint

public java.awt.Paint getBackgroundPaint()
Description copied from interface: IChartComponent
Gets the paint of background of charts.

Specified by:
getBackgroundPaint in interface IChartComponent
Returns:
the background paint

setBackgroundPaint

public void setBackgroundPaint(java.awt.Paint backgroundPaint)
Description copied from interface: IChartComponent
Sets the paint of background of charts.

Specified by:
setBackgroundPaint in interface IChartComponent
Parameters:
backgroundPaint - the background paint to set

getBackgroundPlotPaint

public java.awt.Paint getBackgroundPlotPaint()
Description copied from interface: IChartComponent
Gets the paint of background in plot of charts.

Specified by:
getBackgroundPlotPaint in interface IChartComponent
Returns:
the background paint for plots

setBackgroundPlotPaint

public void setBackgroundPlotPaint(java.awt.Paint backgroundPlotPaint)
Description copied from interface: IChartComponent
Sets the paint of background in plot of charts.

Specified by:
setBackgroundPlotPaint in interface IChartComponent

getChartComponentPanel

public javax.swing.JPanel getChartComponentPanel()
Description copied from interface: IChartComponent
Gets the component with chart panel is placed.

Specified by:
getChartComponentPanel in interface IChartComponent
Returns:
the chart component

getScrollPane

public javax.swing.JScrollPane getScrollPane()
Description copied from interface: IChartComponent
Gets the scroll pane where is placed.

Specified by:
getScrollPane in interface IChartComponent
Returns:
the chart component

getTemplateDataType

public int getTemplateDataType()
Description copied from interface: ITemplateField
Returns the data type. The values that can return are: ITemplateField.DATA_TYPE_FIELD ITemplateField.DATA_TYPE_IMAGE ITemplateField.DATA_TYPE_TABLE

Specified by:
getTemplateDataType in interface ITemplateField
Returns:
a int with the data type.

getTemplateDataValue

public java.lang.Object getTemplateDataValue()
Description copied from interface: ITemplateField
Gets the value to show in the template

Specified by:
getTemplateDataValue in interface ITemplateField
Returns:

Ontimize