JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart.beans
Class SimpleChart

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.beans.SimpleChart
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

public class SimpleChart
extends BaseChart

A derived class that enables JClass Chart to be used at design-time with Bean-compliant Java IDEs (Integrated Development Environments).

This class differs from JCChart in the following ways:

  1. SimpleChart exposes properties that are actually defined in JCChart's sub-objects so that IDEs can access them.
  2. SimpleChart duplicates enums that are actually defined in JCChart's sub-objects.

The following table lists the properties this class can set/get.

Properties

Name Description
AxisOrientation The AxisOrientation property determines if the x and y axes are inverted and reversed.
Background The Background property determines the background color used to draw inside the chart region.
Note: The Background property is inherited from the parent JComponent.
ChartType The ChartType property determines the chart type of the first set of data in the chart.
Data The Data property controls the file or URL used for the first set of data in chart.
Font The Font property determines what font is used to render text inside the chart region.
Note: The Font property is inherited from the parent JComponent.
FooterText The FooterText property holds the text that is displayed in the footer. The default value is " " (empty String).
Foreground The Foreground property determines the foreground color used to draw inside the chart region.
Note: The Foreground property is inherited from the parent JComponent.
HeaderText The HeaderText property holds the text that is displayed in the header. The default value is " " (empty String).
Legend The Legend property controls the object that controls the display of the legend. The default value is null.
LegendAnchor The LegendAnchor property determines the position of the legend relative to the ChartArea. Valid values include NORTH, SOUTH, EAST, WEST, NORTHWEST, SOUTHWEST, NORTHEAST, and SOUTHEAST. The default value is EAST.
LegendVisible The LegendVisible property determines whether the legend is visible. The default value is false.
LegendOrientation The LegendOrientation property determines how legend information is laid out. Valid values include VERTICAL and HORIZONTAL. The default value is VERTICAL.
SwingDataModel Sets the chart's data source to use a specified Swing TableModel object, instead of the Data property.
View3D The View3D property combines the values of the Depth, Elevation, and Rotation properties defined in JCChartArea. Depth controls the apparent depth of a graph. Elevation controls the distance above the x axis for the 3D effect. Rotation controls the position of the eye relative to the y axis for the 3D effect. The default value is "0.0,0.0,0.0".
Version The Version property specifies the JClass Chart version number. This property is read-only. The default value is calculated.
XAxisAnnotationMethod The XAxisAnnotationMethod property determines how axis annotations are generated. Valid values include VALUE (annotation is generated by JClass Chart, with possible callbacks to a label generator); VALUE_LABELS (annotation is taken from a list of value labels provided by the user -- a value label is a label that appears at a particular axis value); POINT_LABELS (annotation comes from the data source's point labels that are associated with particular data points); and TIME_LABELS (JClass Chart generates time/date labels based on the TimeUnit, TimeBase and TimeFormat properties). The default value is VALUE.
XAxisGridVisible The XAxisGridVisible property determines whether a grid is drawn for the axis. The default value is false.
XAxisLogarithmic The XAxisLogarithmic property determines whether the first x axis will be logarithmic (true) or linear (false). The default value is false.
XAxisVisible The XAxisVisible property determines whether the first x axis is currently visible. The default value is true.
XAxisMinMax The XAxisMinMax controls both the XAxisMin and XAxisMax properties. The XAxisMin property controls the minimum value shown on the axis. If a null String is used, JClass Chart will calculate the axis min. The data min is determined by JClass Chart. The default value is calculated. The XAxisMax property controls the maximum value shown on the axis. If a null String is used, JClass Chart will calculate the axis max. The data max is determined by JClass Chart. The default value is calculated.
XAxisNumSpacing The XAxisNumSpacing property controls the interval between axis labels. If a null String is used, JClass Chart will calculate the interval. The default value is calculated.
XAxisTitleText The XAxisTitleText property specifies the text that will appear as the x axis title. The default value is " " (empty String).
YAxisAnnotationMethod The YAxisAnnotationMethod property determines how axis annotations are generated. Valid values include VALUE (annotation is generated by JClass Chart, with possible callbacks to a label generator); VALUE_LABELS (annotation is taken from a list of value labels provided by the user -- a value label is a label that appears at a particular axis value); POINT_LABELS (annotation comes from the data source's point labels that are associated with particular data points); and TIME_LABELS (JClass Chart generates time/date labels based on the TimeUnit, TimeBase, and TimeFormat properties). The default value is VALUE.
YAxisGridVisible The YAxisGridVisible property determines whether a grid is drawn for the axis.
YAxisLogarithmic The YAxisLogarithmic property determines whether the first y axis will be logarithmic (true) or linear (false). The default value is false.
YAxisVisible The YAxisVisible property determines whether the first y axis is currently visible. The default value is true.
YAxisMinMax The YAxisMinMax controls both the YAxisMin and YAxisMax properties. The YAxisMin property controls the minimum value shown on the axis. If a null String is used, JClass Chart will calculate the axis min. The data min is determined by JClass Chart. The default value is calculated. The YAxisMax property controls the maximum value shown on the axis. If a null String is used, JClass Chart will calculate the axis max. The data max is determined by JClass Chart. The default value is calculated.
YAxisNumSpacing The YAxisNumSpacing property controls the interval between axis labels. If a null String is used, JClass Chart will calculate the interval. The default value is calculated.
YAxisTitleText The YAxisTitleText property specifies the text that will appear as the y axis title. The default value is " " (empty String).

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
protected  String data
          String representation of data held by this chart.
 
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, 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
SimpleChart()
          Basic constructor.
 
Method Summary
 String getData()
          Gets the value of the data property.
 void setData(String s)
          Sets the value of the data 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, 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.klg.jclass.util.legend.LegendComponentLayoutUser
getPreferredSize
 
Methods inherited from interface com.klg.jclass.util.JCName
getName, setName
 

Field Detail

data

protected String data
String representation of data held by this chart.

Constructor Detail

SimpleChart

public SimpleChart()
Basic constructor. Sets data to default data.

Method Detail

getData

public String getData()
Gets the value of the data property. The data property controls the file or URL used for the first set of data in the chart.

Returns:

setData

public void setData(String s)
Sets the value of the data property. The data property controls the file or URL used for the first set of data in the chart.

Parameters:
s -

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