JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart.db
Class DataChart

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.chart.JCChart
                          |
                          +--com.klg.jclass.chart.beans.BaseChart
                                |
                                +--com.klg.jclass.chart.db.DataChart
All Implemented Interfaces:
AncestorListener, Changeable, Changeable, EventListener, ImageObserver, com.klg.jclass.util.JCName, KeyListener, LegendComponentLayoutUser, MenuContainer, MouseListener, MouseMotionListener, RenderProperties, Serializable, com.klg.jclass.util.ServerRenderable
Direct Known Subclasses:
DSdbChart, JBdbChart

public class DataChart
extends BaseChart

This is a data-aware subclass of BaseChart. It displays data from the data source. This component displays the result set of a data bean and can insert and delete records, cancel, save and requery data in the data source. The class is not a bean, but a common ancestor of all data-aware chart beans.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.klg.jclass.chart.beans.BaseChart
AUTOMATIC, axesOrientationStrings, axesOrientationValues, dataSource, DAYS, EAST, HORIZONTAL, HOURS, MAX, MIN, MINUTES, MONTHS, NORTH, NORTHEAST, NORTHWEST, ORIENT_INVERTED_X_NORMAL_Y_NORMAL, ORIENT_INVERTED_X_NORMAL_Y_REVERSED, ORIENT_INVERTED_X_REVERSED_Y_NORMAL, ORIENT_INVERTED_X_REVERSED_Y_REVERSED, ORIENT_X_NORMAL_Y_NORMAL, ORIENT_X_NORMAL_Y_REVERSED, ORIENT_X_REVERSED_Y_NORMAL, ORIENT_X_REVERSED_Y_REVERSED, ORIGIN, POINT_LABELS, ROTATE_270, ROTATE_90, ROTATE_NONE, SECONDS, SOUTH, SOUTHEAST, SOUTHWEST, tableModel, TIME_LABELS, VALUE, VALUE_ANCHORED, VALUE_LABELS, VERTICAL, WEEKS, WEST, YEARS
 
Fields inherited from class com.klg.jclass.chart.JCChart
antiAliasing, AREA, AREA_RADAR, BAR, cancelKey, CANDLE, chartApplet, chartArea, chartAreaLayoutHints, chartLabelManager, customizer, customizerName, data, ERRMSG_INVALID_TRIGGER_INDEX, fillColorIndex, footer, footerImageMapInfo, footerLayoutHints, header, headerImageMapInfo, headerLayoutHints, HILO, HILO_OPEN_CLOSE, imageMapInfo, LAST_PREDEFINED_CHART_TYPE, layoutDone, legend, legendLayoutHints, legendManager, lineColorIndex, listeners, locale, NONE, pickListeners, PIE, PLOT, POLAR, prevSetGraphics, queryGraphics, RADAR, resetKey, SCATTER_PLOT, STACKING_AREA, STACKING_BAR, symbolColorIndex, symbolShapeIndex, triggers, userObject, usingDoublePixels
 
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.klg.jclass.chart.Changeable
BASIC_CHANGE_MASK, NOTIFY_AXES_RECALC, NOTIFY_AXES_REDRAW, NOTIFY_CA_RECALC, NOTIFY_CA_REDRAW, NOTIFY_LEGEND_RECALC, NOTIFY_LEGEND_REDRAW
 
Fields inherited from interface com.klg.jclass.util.Changeable
LAYOUT, NO_CHANGE, NOTIFY_PARENT_LAYOUT, RECALC, REDRAW
 
Fields inherited from interface com.klg.jclass.util.RenderProperties
ANTI_ALIASING_DEFAULT, ANTI_ALIASING_OFF, ANTI_ALIASING_ON
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected DataChart()
          Protected DataChart constructor.
 
Method Summary
protected  boolean beforeCurrentRowChange()
          Saves the value from the current editor to the data source before the current row has been changed.
 com.klg.jclass.chart.db.DataBindingConfigWrapper getDataBindingConfig()
          Gets the dataBindingConfig property used to build a DataBoundSource.
protected  String getDataBindingString()
          Returns the chart's value of the DataBinding object property.
protected  com.klg.jclass.chart.db.DataBoundSource getDataBoundSource()
          Returns DataBoundSource for the chart.
protected  Object getNativeMetaData()
          Returns the IDE specific metadata object bound to the chart.
protected  void initDataBinding(com.klg.jclass.chart.db.DataBoundSource dataSource)
          Verifies that a new data source is valid and binds the chart.
protected  boolean setDataBinding(com.klg.jclass.datasource.DataModel dataModel, com.klg.jclass.datasource.MetaDataModel metaDataModel)
          Sets up parameters to bind the DataBoundSource to a MetaDataModel in the given DataModel.
 void setDataBindingConfig(com.klg.jclass.chart.db.DataBindingConfigWrapper wrapper)
          Sets the meta property used to build a DataBoundSource.
 void setDataColumns(String[] seriesColumns)
          Sets the value of the SeriesColumns indexed property.
 void setDataSource(com.klg.jclass.datasource.BindingModel binding)
          Bind using a Binding.
 void setDataSource(com.klg.jclass.chart.ChartDataModel dataSource)
          Sets a chart datasource.
 void setDataSource(com.klg.jclass.datasource.DataModel dataModel)
          Binds the chart to the given DataModel and to the root MetaDataModel.
 void setDataSource(com.klg.jclass.datasource.DataModel dataModel, com.klg.jclass.datasource.MetaDataModel metaDataModel)
          Binds the chart to the given DataModel and MetaDataModelDataModel.
protected  void setDataSource(com.klg.jclass.datasource.DataModel dataModel, String metaDescription)
          Sets the data source to a DataModel and binds the MetaData to the MetaDataModel represented by a "path" of MetaDataModel descriptions separated by '|' (e.g.
protected  void setDataSource(String dataBinding)
          Sets the DataBinding property value to the chart.
 void setName(String s)
          Sets the value of the name property.
 void setPointLabelsColumn(String pointLabelsColumn)
          Sets the value of the PointLabelsColumn property.
 
Methods inherited from class com.klg.jclass.chart.beans.BaseChart
getAxisOrientation, getChartType, getFooterFont, getFooterText, getHeaderFont, getHeaderText, getLegendAnchor, getLegendOrientation, getLegendVisible, getSwingDataModel, getView3D, getXAxisAnnotationMethod, getXAxisGridVisible, getXAxisLogarithmic, getXAxisMax, getXAxisMin, getXAxisMinMax, getXAxisNumSpacing, getXAxisTitleText, getXAxisVisible, getYAxisAnnotationMethod, getYAxisGridVisible, getYAxisLogarithmic, getYAxisMax, getYAxisMin, getYAxisMinMax, getYAxisNumSpacing, getYAxisTitleText, getYAxisVisible, setAxisOrientation, setChartType, setFooterFont, setFooterText, setHeaderFont, setHeaderText, setLegendAnchor, setLegendOrientation, setLegendVisible, setSwingDataModel, setView3D, setXAxisAnnotationMethod, setXAxisGridVisible, setXAxisLogarithmic, setXAxisMax, setXAxisMin, setXAxisMinMax, setXAxisNumSpacing, setXAxisTitleText, setXAxisVisible, setYAxisAnnotationMethod, setYAxisGridVisible, setYAxisLogarithmic, setYAxisMax, setYAxisMin, setYAxisMinMax, setYAxisNumSpacing, setYAxisTitleText, setYAxisVisible
 
Methods inherited from class com.klg.jclass.chart.JCChart
addChartListener, addDataView, addNotify, addPickListener, addTrigger, addTrigger, ancestorAdded, ancestorMoved, ancestorRemoved, cancel, createChartArea, createFooter, createHeader, createLegend, createLocalImage, createQueryGraphics, createToolTip, disableChartEvents, disposeQueryGraphics, doLayout, enableChartEvents, findData, findDataView, findDataViewIndex, findMatchingTrigger, firePaint, getAbout, getAllowUserChanges, getAntiAliasing, getCancelKey, getChanged, getChanged, getChartArea, getChartLabelManager, getComponentArea, getComponentAt, getCustomizerName, getDataView, getDataView, getDrawingArea, getDrawingArea, getDrawingAreaHeight, getDrawingAreaWidth, getFillColorIndex, getFooter, getFooterImageMapInfo, getGraphics, getHeader, getHeaderImageMapInfo, getImageMapInfo, getLayoutHints, getLegend, getLicense, getLineColorIndex, getLocale, getNumData, getNumTriggers, getOriginalDataView, getQueryGraphics, getResetKey, getSource, getSymbolColorIndex, getSymbolShapeIndex, getToolTipLocation, getToolTipText, getTrigger, getUI, getUIClassID, getUserObject, hasChartLabelManager, init, isBatched, isChanged, isChanged, isFocusTraversable, isUsingDoublePixels, isWarningDialog, keyPressed, keyReleased, keyTyped, launchPropertyPage, main, makeChart, moreAddNotify, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, paintChildren, paintComponent, pick, printAll, processKeyEvent, processMouseEvent, processMouseMotionEvent, recalc, registerUI, removeChartListener, removeDataView, removePickListener, removeTrigger, reorderDataViews, requestFocus, reset, resetDefaults, rotate, rotateEnd, rotateStart, scale, sendEvent, sendPickEvent, serverPaint, serverSnapshot, setAbout, setAllowUserChanges, setAntiAliasing, setBackground, setBatched, setCancelKey, setChanged, setChanged, setChartArea, setChartLabelManager, setCustomizerName, setDataView, setDataView, setFillColorIndex, setFont, setFooter, setFooterImageMapInfo, setForeground, setGraphics, setHeader, setHeaderImageMapInfo, setImageMapInfo, setLayoutHints, setLegend, setLicense, setLineColorIndex, setLocale, setOpaque, setResetKey, setSymbolColorIndex, setSymbolShapeIndex, setTrigger, setUI, setUserObject, setUsingDoublePixels, setWarningDialog, snapshot, snapshot, snapshot, translate, translateStart, unpick, unpick, update, updateUI, zoom
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintImmediately, paintImmediately, paramString, print, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, 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, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, 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.klg.jclass.util.legend.LegendComponentLayoutUser
getPreferredSize
 
Methods inherited from interface com.klg.jclass.util.JCName
getName
 

Constructor Detail

DataChart

protected DataChart()
Protected DataChart constructor. The constructor must not be called directly, but only from it's subclasses.

Method Detail

setDataSource

public void setDataSource(com.klg.jclass.chart.ChartDataModel dataSource)
Sets a chart datasource.


setDataSource

public void setDataSource(com.klg.jclass.datasource.DataModel dataModel)
Binds the chart to the given DataModel and to the root MetaDataModel.


setDataSource

public void setDataSource(com.klg.jclass.datasource.DataModel dataModel,
                          com.klg.jclass.datasource.MetaDataModel metaDataModel)
Binds the chart to the given DataModel and MetaDataModelDataModel.


setDataSource

public void setDataSource(com.klg.jclass.datasource.BindingModel binding)
Bind using a Binding.


setDataSource

protected void setDataSource(String dataBinding)
Sets the DataBinding property value to the chart. Sets a chart datasource for the data binding hierarchy string, starting from a JCTreeData instance name and containing full sequence of MetaDataModel levels starting from the root to the level the chart is bound with.

See Also:
DSdbChart.getDataBinding()

setDataSource

protected void setDataSource(com.klg.jclass.datasource.DataModel dataModel,
                             String metaDescription)
Sets the data source to a DataModel and binds the MetaData to the MetaDataModel represented by a "path" of MetaDataModel descriptions separated by '|' (e.g. Orders|Customers).


initDataBinding

protected void initDataBinding(com.klg.jclass.chart.db.DataBoundSource dataSource)
Verifies that a new data source is valid and binds the chart.


getDataBindingString

protected String getDataBindingString()
Returns the chart's value of the DataBinding object property. Returns the data binding hierarchy string, starting from a JCTreeData instance name and containing full sequence of MetaDataModel levels starting from the root to the level at which the chart is bound. The DataBinding property specifies a string describing a JCTreeData instance and metadata level at which the instance this chart is bound. The format of the property is as follows:
    <JCTreeData name>:<MetaDataModel description>[|<MetaDataModel description>...]

See Also:
setDataBinding(com.klg.jclass.datasource.DataModel, com.klg.jclass.datasource.MetaDataModel)

setDataBinding

protected boolean setDataBinding(com.klg.jclass.datasource.DataModel dataModel,
                                 com.klg.jclass.datasource.MetaDataModel metaDataModel)
Sets up parameters to bind the DataBoundSource to a MetaDataModel in the given DataModel.


setDataBindingConfig

public void setDataBindingConfig(com.klg.jclass.chart.db.DataBindingConfigWrapper wrapper)
Sets the meta property used to build a DataBoundSource.

Parameters:
wrapper - the instance of DataBindingConfigWrapper

getDataBindingConfig

public com.klg.jclass.chart.db.DataBindingConfigWrapper getDataBindingConfig()
Gets the dataBindingConfig property used to build a DataBoundSource.

Returns:
the dataBindingConfig property

beforeCurrentRowChange

protected boolean beforeCurrentRowChange()
Saves the value from the current editor to the data source before the current row has been changed.


getDataBoundSource

protected com.klg.jclass.chart.db.DataBoundSource getDataBoundSource()
Returns DataBoundSource for the chart.


getNativeMetaData

protected Object getNativeMetaData()
Returns the IDE specific metadata object bound to the chart.


setDataColumns

public void setDataColumns(String[] seriesColumns)
Sets the value of the SeriesColumns indexed property. Only columns that have a numeric type can be potential series columns.

See Also:
DataBindingConfigEditor.isNumerical(int)

setPointLabelsColumn

public void setPointLabelsColumn(String pointLabelsColumn)
Sets the value of the PointLabelsColumn property.


setName

public void setName(String s)
Sets the value of the name property. The name property defines the name of the data object.

Specified by:
setName in interface com.klg.jclass.util.JCName
Overrides:
setName in class Component
Parameters:
s - the name string

Copyright © 2004 Quest Software Inc..
All rights reserved.