JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class JCChart3d

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.chart3d.JCChart3d
All Implemented Interfaces:
Changeable, Changeable, Chart3dDataModel, Chart3dGridDataModel, Chart3dPointDataModel, EventListener, ImageObserver, KeyListener, LegendComponentLayoutUser, MenuContainer, MouseListener, MouseMotionListener, Serializable, com.klg.jclass.util.ServerRenderable
Direct Known Subclasses:
JCChart3dJava2d, JCChart3dJava3d

public abstract class JCChart3d
extends JComponent
implements Changeable, Serializable, LegendComponentLayoutUser, com.klg.jclass.util.ServerRenderable, KeyListener, MouseListener, MouseMotionListener, Chart3dGridDataModel, Chart3dPointDataModel

The core charting class. JCChart3d allows the retrieval of related objects, such as the chart area, the legend, the header, and the footer. Bean classes are represented by a charting class derived from JCChart3d.

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  com.klg.jclass.chart3d.JCActionTable actionTable
          The ActionTable object that associates key and mouse triggers with actions.
static int BAR
          Specifies that an array of bars should be drawn.
protected  com.klg.jclass.chart3d.JCChart3dArea chart3dArea
          The component that manages the area where the chart is drawn.
protected  Rectangle chart3dAreaLayoutHints
          Gives the layout manager info about the position and size of the chart area.
 com.klg.jclass.chart3d.JCChart3dCustomizer customizer
          References the Customizer, if it exists.
protected  Vector dataViews
          A list of dataViews for this chart.
static String ERRMSG_CUSTOMIZER_FAILURE
          Error message for customizer failure.
protected  int fillColorIndex
          An index into the color list.
protected  JComponent footer
          The footer for this chart.
protected  Rectangle footerLayoutHints
          Give the layout manager info about the position and size of the footer.
protected  JComponent header
          The header for this chart.
protected  Rectangle headerLayoutHints
          Gives the layout manager info about the position and size of the header.
protected  boolean inKeyPress
          Asks if a key press has been initiated without a corresponding release.
static int LAST_PREDEFINED_CHART_TYPE
          Specifies the end of array so more chart can possibly be added later.
protected  com.klg.jclass.util.legend.JCLegend legend
          The legend for this chart.
protected  Rectangle legendLayoutHints
          Gives the layout manager info about the position and size of the legend.
protected  com.klg.jclass.chart3d.JCChart3dLegendManager legendManager
          The default implementation of the legend populator and renderer.
protected  int lineColorIndex
          An index into the color list.
protected  com.klg.jclass.util.JCListenerList listeners
          The current list of JCChart3dListener's for this chart.
protected  Locale locale
          The locale object for this chart3d.
static int NONE
          Invalid chart type used for error checking.
protected  com.klg.jclass.util.JCListenerList pickListeners
          The current list of JCPick3dListener's for this chart.
static int SCATTER
          Specifies that a scatter plot should be drawn.
static int SURFACE
          Specifes that a surface should be drawn.
protected  int symbolColorIndex
          An index into the symbol list.
protected  int symbolShapeIndex
          An index into the shape list.
 
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.chart3d.Changeable
ALL, CONTOURS, NOTIFY_CA_RECALC, NOTIFY_CA_REDRAW, NOTIFY_LEGEND_RECALC, NOTIFY_LEGEND_REDRAW
 
Fields inherited from interface com.klg.jclass.util.Changeable
BASIC_CHANGE_MASK, LAYOUT, NO_CHANGE, NOTIFY_PARENT_LAYOUT, RECALC, REDRAW
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JCChart3d()
          Default constructor, required by JavaBeans.
JCChart3d(int tp)
          Constructor that creates a JCChart3d of a particular type.
 
Method Summary
 void addChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
          Adds a listener to changes in JClass Chart 3D.
 com.klg.jclass.chart3d.Chart3dDataView addDataView(int index, int chartType)
          Creates a new Chart3dDataView and adds it to the chart at the specified index, replacing the existing ChartDataView object at that specified index.
 void addNotify()
          Overrides javax.swing.JComponent addNotify().
 void addPick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
          Adds listener to JClass Chart 3D pick events.
 void cancel()
          Performs a cancel on the chart.
 int convertChartAreaXToX(int x)
           
 int convertChartAreaYToY(int y)
           
 int convertXToChartAreaX(int x)
           
 int convertYToChartAreaY(int y)
           
protected abstract  void createActionTable()
          Creates the action table for the chart.
protected  void createChart3dArea()
          Creates and adds a JCChart3dArea to chart.
protected  void createFooter()
          Creates and adds a new JLabel footer to the chart.
protected  void createHeader()
          Creates and adds a new JLabel header to the chart.
static com.klg.jclass.chart3d.JCChart3d createJava2dChart()
          Creates an instance of the Java 2d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional chart functionality using the Java 2d API.
static com.klg.jclass.chart3d.JCChart3d createJava3dChart()
          Creates an instance of the Java 3d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional chart functionality using the Java 3d API.
static com.klg.jclass.chart3d.JCChart3d createJava3dChart(boolean fallback)
          Creates an instance of the Java 3d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional chart functionality using the Java 3d API.
protected  void createLegend()
          Creates and adds a legend to the chart.
 void doLayout()
          JCChart3d layout method.
 com.klg.jclass.chart3d.Chart3dDataView findDataView(String name)
          Finds a data view, given its name.
 void firePaint()
          Fires a paint event to interested listeners.
 String getAbout()
          Gets the value of the About property.
protected abstract  com.klg.jclass.chart3d.JCAction getActionHandler(InputEvent event)
          Retrieves the action handler that is associated with a given InputEvent.
 com.klg.jclass.chart3d.JCActionTable getActionTable()
          The JCActionTable object that associates key and mouse triggers with actions.
 boolean getAllowUserChanges()
          Gets the value of the AllowUserChanges property, which determines whether the user viewing the chart can modify chart values.
 boolean getChanged()
          Gets the value of the Changed property, which determines whether the chart requires a recalculation.
 boolean getChanged(int mask)
          Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks).
 com.klg.jclass.chart3d.JCChart3dArea getChart3dArea()
          Gets the value of the Chart3dArea property.
protected  int getColorIndex(int style)
          Gets the color index based on the style.
 JComponent getComponentArea()
          Used to implement the LegendComponentLayoutUser interface.
 Component getComponentAt(int x, int y)
          Overrides the Container class's method to return only components that are actually showing.
abstract  String getCustomizerName()
          Gets the value of the CustomizerName property.
 List getDataView()
          Gets the value of the DataViews property, which is an indexed property that contains all the data to be displayed in the chart.
 com.klg.jclass.chart3d.Chart3dDataView getDataView(int index)
          Gets the value of the specified index within the dataViews property.
 Rectangle getDrawingArea()
          Gets the drawing area represented by this chart.
 void getDrawingArea(Rectangle rect)
          Gets the drawing area represented by this chart and places it in the provided rectangle.
 int getDrawingAreaHeight()
          Gets the height of the drawing area represented by this chart.
 int getDrawingAreaWidth()
          Gets the width of the drawing area represented by this chart.
 int getFillColorIndex()
          Gets the current fill color index.
 JComponent getFooter()
          Sets the Footer property.
 Graphics getGraphics()
          Overrides parent getGraphics().
 JComponent getHeader()
          Gets the Header property.
 Rectangle getLayoutHints(JComponent child)
          Gets layout hints for the specified chart child.
 com.klg.jclass.util.legend.JCLegend getLegend()
          Gets the Legend property.
 int getLineColorIndex()
          Gets the current line color index.
 Locale getLocale()
          Returns the chart3d locale.
 int getNumDataViews()
          Gets the value of the NumDataViews property, which indicates how many Chart3dDataView objects are stored in JClass Chart 3D.
protected  List getOriginalDataView()
          Gets the actual data view collection.
 Point3d[][] getPoints()
          Retrieves a list of points for a scatter plot.
 Object getSource()
          Returns this chart as an object.
 int getSymbolColorIndex()
          Gets the current symbol color index.
 int getSymbolShapeIndex()
          Gets the current symbol shape index.
 com.klg.jclass.chart3d.JCChart3dUI getUI()
          Returns the UI for JCChart3d.
 String getUIClassID()
          Returns the UIClass ID for JCChart3d.
 double[] getXGrid()
          Retrieves the x grid values.
 double[] getYGrid()
          Retrieves the y grid values.
 double[][] getZValues()
          Retrieves the z values - one for each (x,y) grid point.
protected  void init(int chartType)
          Initializes assorted chart member variables.
protected  void initializeLayout()
          Sets the initial layout.
protected  void initializeUI()
          Registers the user interface.
 boolean isBatched()
          Gets the value of the Batched property.
 boolean isChanged()
          Gets the value of the Changed property, which determines whether the chart requires a recalculation.
 boolean isChanged(int mask)
          Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks).
 boolean isFocusTraversable()
          Overrides the superclass's isFocusTraversable method to always return true, which is required to get keyPress events.
 boolean isProjection()
          Asks if the surface is represented by the first dataView is a 3d view or a 2d projection.
 boolean isWarningDialog()
          Gets the value of the WarningDialog property.
 void keyPressed(KeyEvent event)
          Processes keyPressed events for the chart; resets chart or cancels action as specified.
 void keyReleased(KeyEvent event)
          Processes keyReleased events for the chart; does nothing.
 void keyTyped(KeyEvent event)
          Processes keyTyped events for the chart; does nothing.
 void launchPropertyPage(Point p)
          Launches Customizer.
static com.klg.jclass.chart3d.JCChart3d makeChart3d(String fileName)
          Static function to allow creation of a chart from a serialized file.
 void mouseClicked(MouseEvent event)
          Processes mouseClicked events for the chart; does nothing.
 void mouseDragged(MouseEvent event)
          Processes mouseDragged events for the chart; performs associated actions.
 void mouseEntered(MouseEvent event)
          Processes mouseEntered events for the chart; does nothing.
 void mouseExited(MouseEvent event)
          Processes mouseExited events for the chart; does nothing.
 void mouseMoved(MouseEvent event)
          Processes mouseMoved events for the chart; does nothing.
 void mousePressed(MouseEvent event)
          Processes mousePressed events for the chart; requests focus and performs associated actions.
 void mouseReleased(MouseEvent event)
          Processes mouseReleased events for the chart; finishes associated actions.
 void paint(Graphics gc)
          Overrides the superclass's paint() method so that the chart is fully painted and flushed before the listeners are called.
 void paintComponent(Graphics gc)
          The top-level paint routine in JCChart3d.
 com.klg.jclass.chart3d.JCData3dIndex pick(Point p, com.klg.jclass.chart3d.Chart3dDataView dataView)
          Given a screen position in pixels, returns a JCData3dIndex object that represents the index of the closest point in the elevation data set of the specified ChartData3dView instance.
protected  com.klg.jclass.chart3d.JCData3dIndex pickLegend(Point p, com.klg.jclass.chart3d.Chart3dDataView dataView)
          Internal pick method.
 void printAll(Graphics g)
          Prints this component and all of its subcomponents.
protected  void processKeyEvent(KeyEvent e)
          Processes key events on the chart.
protected  void processMouseEvent(MouseEvent e)
          Processes mouse click events on the chart.
protected  void processMouseMotionEvent(MouseEvent e)
          Processes mouse motion events on the chart.
 void recalc()
          Recalculates the entire chart, if it has been marked for recalculation.
 void redraw()
          For internal use only.
 void registerUI()
          Tells the UIManager class which class to use for JCChart3d.
 void removeChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
          Removes the listener for changes in JClass Chart 3D from a list of listeners.
 void removeDataView(int index)
          Removes a Chart3dDataView from the index specified.
 void removePick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
          Removes the listener for JClass Chart 3D pick events from a list of listeners.
 void requestFocus()
          Requests the input focus.
 void reset()
          Performs a reset on the chart.
 void resetDefaults()
          Resets the line, symbol, and fill color and pattern to the default index values.
 void sendEvent()
          Tells interested users that the chart is changed after an action is performed.
 void sendPick3dEvent(com.klg.jclass.chart3d.JCData3dIndex index)
          Sends pick event to all objects listening for it.
 void serverPaint(Graphics igc)
          Internal use only.
 Image serverSnapshot()
          Internal use only.
 void setAbout(String s)
          Sets the value of the About property.
 void setAllowUserChanges(boolean change)
          Sets the value of the AllowUserChanges property, which determines whether the user viewing the chart can modify chart values.
 void setBackground(Color c)
          Overrides the superclass's method so that changes will generate redraws.
 void setBatched(boolean bt)
          Sets the value of the Batched property, which controls whether chart updates are accumulated.
 void setChanged(boolean n, int cf)
          Sets the value of the Changed property, which determines whether the chart requires recalculation.
 void setChanged(boolean n, int cf, boolean updateParent)
          Sets the value of the Changed property, which determines whether the chart requires recalculation.
 void setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea ca)
          Sets the value of the Chart3dArea property.
protected  void setColorIndex(int colorIndex, int style)
          Sets the color index based on the style.
protected abstract  void setCustomizerName(String s)
          Sets the value of the CustomizerName property.
 void setDataView(int index, com.klg.jclass.chart3d.Chart3dDataView ndv)
          Takes the specified Chart3dDataView and adds it to the chart at the index indicated.
 void setDataView(List views)
          Sets the value of the dataViews property, which is an indexed property that contains all the data to be displayed in the 3d chart.
 void setFillColorIndex(int colorIndex)
          Sets the initial fill color index.
 void setFont(Font f)
          Overrides the superclass's method so that changes will generate redraws.
 void setFooter(JComponent foot)
          Sets the Footer property.
 void setForeground(Color c)
          Overrides the superclass's method so that changes will generate redraws.
 void setGraphics(Graphics g)
          Provides a way for the chart to draw to a custom Graphics object.
 void setHeader(JComponent head)
          Sets the Header property.
 void setLayout(LayoutManager mgr)
          Overrides java.awt.Component setLayout().
 void setLayoutHints(JComponent child, Rectangle layoutHints)
          Sets layout hints for chart children.
 void setLegend(com.klg.jclass.util.legend.JCLegend jl)
          Sets the Legend property.
 void setLineColorIndex(int colorIndex)
          Sets the line color index.
 void setLocale(Locale locale)
          Sets the locale for chart3d.
 void setOpaque(boolean op)
          Overrides the superclass's method so that changes will generate redraws.
 void setSymbolColorIndex(int colorIndex)
          Sets the initial symbol color index.
 void setSymbolShapeIndex(int shapeIndex)
          Sets the initial symbol shape index.
 void setUI(ComponentUI newUI)
          Sets the UI for JCChart3d.
 void setWarningDialog(boolean on)
          Sets the value of the WarningDialog property, which controls whether a dialog will appear when the chart has warning messages.
 Image snapshot()
          Takes a snapshot of the current chart.
 void snapshot(Image img)
          Takes a snapshot of the current chart and places it in the supplied image.
 Image snapshot(int imagetype)
          Takes a snapshot of the current chart and places it in an image of the specified type.
 Point unpick(com.klg.jclass.chart3d.Chart3dDataView dataView, com.klg.jclass.chart3d.JCData3dIndex index)
          Returns the position in screen pixels of a particular point in a particular data set (grid data or point data).
 void update()
          Forces the chart to re-layout and recalculate.
 void updateUI()
          Updates the UI for JCChart3d.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, 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, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, 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, 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
 

Field Detail

chart3dArea

protected com.klg.jclass.chart3d.JCChart3dArea chart3dArea
The component that manages the area where the chart is drawn.


dataViews

protected Vector dataViews
A list of dataViews for this chart. Currently only one dataView is supported.


legend

protected com.klg.jclass.util.legend.JCLegend legend
The legend for this chart.


legendManager

protected com.klg.jclass.chart3d.JCChart3dLegendManager legendManager
The default implementation of the legend populator and renderer.


footer

protected JComponent footer
The footer for this chart. Any JComponent can be used.


header

protected JComponent header
The header for this chart. Any JComponent can be used.


listeners

protected com.klg.jclass.util.JCListenerList listeners
The current list of JCChart3dListener's for this chart.


pickListeners

protected com.klg.jclass.util.JCListenerList pickListeners
The current list of JCPick3dListener's for this chart.


inKeyPress

protected boolean inKeyPress
Asks if a key press has been initiated without a corresponding release.


NONE

public static final int NONE
Invalid chart type used for error checking.

See Also:
Constant Field Values

SURFACE

public static final int SURFACE
Specifes that a surface should be drawn.

See Also:
Constant Field Values

BAR

public static final int BAR
Specifies that an array of bars should be drawn.

See Also:
Constant Field Values

SCATTER

public static final int SCATTER
Specifies that a scatter plot should be drawn.

See Also:
Constant Field Values

LAST_PREDEFINED_CHART_TYPE

public static final int LAST_PREDEFINED_CHART_TYPE
Specifies the end of array so more chart can possibly be added later.

See Also:
Constant Field Values

ERRMSG_CUSTOMIZER_FAILURE

public static final String ERRMSG_CUSTOMIZER_FAILURE
Error message for customizer failure.

See Also:
Constant Field Values

lineColorIndex

protected int lineColorIndex
An index into the color list. Specifies that the next requested color ia different.


symbolColorIndex

protected int symbolColorIndex
An index into the symbol list. Specifies that the next requested symbol is different.


fillColorIndex

protected int fillColorIndex
An index into the color list. Specifies that the next requested fill color is different.


symbolShapeIndex

protected int symbolShapeIndex
An index into the shape list. Specifies that the next requested symbol shape is different.


chart3dAreaLayoutHints

protected Rectangle chart3dAreaLayoutHints
Gives the layout manager info about the position and size of the chart area.


legendLayoutHints

protected Rectangle legendLayoutHints
Gives the layout manager info about the position and size of the legend.


headerLayoutHints

protected Rectangle headerLayoutHints
Gives the layout manager info about the position and size of the header.


footerLayoutHints

protected Rectangle footerLayoutHints
Give the layout manager info about the position and size of the footer.


actionTable

protected com.klg.jclass.chart3d.JCActionTable actionTable
The ActionTable object that associates key and mouse triggers with actions.


customizer

public transient com.klg.jclass.chart3d.JCChart3dCustomizer customizer
References the Customizer, if it exists.


locale

protected Locale locale
The locale object for this chart3d.

Constructor Detail

JCChart3d

public JCChart3d(int tp)
Constructor that creates a JCChart3d of a particular type.
Note: The ChartType is actually a property of Chart3dDataView. This constructor is provided as a convenience.

Parameters:
tp - the chart type
See Also:
Chart3dDataView

JCChart3d

public JCChart3d()
Default constructor, required by JavaBeans. Chart type defaults to SURFACE.

Method Detail

init

protected void init(int chartType)
Initializes assorted chart member variables. Used as a convenience when writing a new JCChart3d constructor.

Parameters:
chartType - the initial chart type of the chart

createJava2dChart

public static com.klg.jclass.chart3d.JCChart3d createJava2dChart()
Creates an instance of the Java 2d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional chart functionality using the Java 2d API.

Returns:
an instance of com.klg.jclass.chart3d.j2d.JCChart3dJava2d or null if there are any problems instantiating the class.

createJava3dChart

public static com.klg.jclass.chart3d.JCChart3d createJava3dChart()
Creates an instance of the Java 3d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional chart functionality using the Java 3d API.

Returns:
an instance of com.klg.jclass.chart3d.j3d.JCChart3dJava3d or null if there are any problems instantiating the class.

createJava3dChart

public static com.klg.jclass.chart3d.JCChart3d createJava3dChart(boolean fallback)
Creates an instance of the Java 3d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional chart functionality using the Java 3d API. If there are any problems creating this class (for example, Java 3d is not available) and the fallback parameter is set to true, this method will revert to creating an instance of the Java 2d version of JClass Chart 3d.

Parameters:
fallback - if true, fall back to using the Java 2d version of JClass Chart 3D when there are problems using the Java 3d version.
Returns:
an instance of com.klg.jclass.chart3d.j3d.JCChart3dJava3d, if possible. Otherwise, either null or an instance of com.klg.jclass.chart3d.j2d.JCChart3dJava2d, depending on the value of the fallback parameter.

createActionTable

protected abstract void createActionTable()
Creates the action table for the chart. This method must be overridden by subclasses.


initializeLayout

protected void initializeLayout()
Sets the initial layout.


initializeUI

protected void initializeUI()
Registers the user interface.


createHeader

protected void createHeader()
Creates and adds a new JLabel header to the chart.


createFooter

protected void createFooter()
Creates and adds a new JLabel footer to the chart.


createLegend

protected void createLegend()
Creates and adds a legend to the chart.


createChart3dArea

protected void createChart3dArea()
Creates and adds a JCChart3dArea to chart.


getActionTable

public com.klg.jclass.chart3d.JCActionTable getActionTable()
The JCActionTable object that associates key and mouse triggers with actions.

Returns:
Chart3d's JCActionTable
See Also:
JCActionTable

isProjection

public boolean isProjection()
Asks if the surface is represented by the first dataView is a 3d view or a 2d projection.

Returns:
a boolean indicating whether the first dataView is a 2D projection or not

processMouseEvent

protected void processMouseEvent(MouseEvent e)
Processes mouse click events on the chart.

Overrides:
processMouseEvent in class Component
Parameters:
e - the mouse event to be processed

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent e)
Processes mouse motion events on the chart.

Overrides:
processMouseMotionEvent in class JComponent
Parameters:
e - the mouse motion event to be processed

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Processes key events on the chart.

Overrides:
processKeyEvent in class JComponent
Parameters:
e - the key event to be processed

convertXToChartAreaX

public int convertXToChartAreaX(int x)

convertYToChartAreaY

public int convertYToChartAreaY(int y)

convertChartAreaXToX

public int convertChartAreaXToX(int x)

convertChartAreaYToY

public int convertChartAreaYToY(int y)

getActionHandler

protected abstract com.klg.jclass.chart3d.JCAction getActionHandler(InputEvent event)
Retrieves the action handler that is associated with a given InputEvent. This method must be overridden by subclasses.

Parameters:
event - the InputEvent
Returns:
the action handler associated with the event

mousePressed

public void mousePressed(MouseEvent event)
Processes mousePressed events for the chart; requests focus and performs associated actions.

Specified by:
mousePressed in interface MouseListener
Parameters:
event - the MouseEvent instance that represents this mouse click

mouseClicked

public void mouseClicked(MouseEvent event)
Processes mouseClicked events for the chart; does nothing.

Specified by:
mouseClicked in interface MouseListener
Parameters:
event - the MouseEvent instance that represents this mouse event

mouseReleased

public void mouseReleased(MouseEvent event)
Processes mouseReleased events for the chart; finishes associated actions.

Specified by:
mouseReleased in interface MouseListener
Parameters:
event - the MouseEvent instance that represents this mouse event

mouseEntered

public void mouseEntered(MouseEvent event)
Processes mouseEntered events for the chart; does nothing.

Specified by:
mouseEntered in interface MouseListener
Parameters:
event - the MouseEvent instance that represents this mouse event

mouseExited

public void mouseExited(MouseEvent event)
Processes mouseExited events for the chart; does nothing.

Specified by:
mouseExited in interface MouseListener
Parameters:
event - the MouseEvent instance that represents this mouse event

mouseDragged

public void mouseDragged(MouseEvent event)
Processes mouseDragged events for the chart; performs associated actions.

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
event - the MouseEvent instance that represents this mouse event

mouseMoved

public void mouseMoved(MouseEvent event)
Processes mouseMoved events for the chart; does nothing.

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
event - the MouseEvent instance that represents this mouse event

keyTyped

public void keyTyped(KeyEvent event)
Processes keyTyped events for the chart; does nothing.

Specified by:
keyTyped in interface KeyListener
Parameters:
event - the KeyEvent instance that represents this keyboard event

keyPressed

public void keyPressed(KeyEvent event)
Processes keyPressed events for the chart; resets chart or cancels action as specified.

Specified by:
keyPressed in interface KeyListener
Parameters:
event - the KeyEvent instance that represents this keyboard event

keyReleased

public void keyReleased(KeyEvent event)
Processes keyReleased events for the chart; does nothing.

Specified by:
keyReleased in interface KeyListener
Parameters:
event - the KeyEvent instance that represents this keyboard event

launchPropertyPage

public void launchPropertyPage(Point p)
Launches Customizer.

Parameters:
p - the point at which to launch the Customizer

makeChart3d

public static com.klg.jclass.chart3d.JCChart3d makeChart3d(String fileName)
Static function to allow creation of a chart from a serialized file. The serialized file can be created by using the JClass Chart 3D Customizer's Save As option.

Parameters:
fileName - the name of the file from which to load
Returns:
the new JCChart3d instance

isChanged

public final boolean isChanged()
Gets the value of the Changed property, which determines whether the chart requires a recalculation.

Specified by:
isChanged in interface Changeable
Returns:
the current value of the Changed property

isChanged

public final boolean isChanged(int mask)
Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks). The ChangedFlag property determines the type of action that the chart needs to take regarding the current change.

Specified by:
isChanged in interface Changeable
Parameters:
mask - the mask to check against
Returns:
the current value of the Changed property, based on the mask

getChanged

public boolean getChanged()
Gets the value of the Changed property, which determines whether the chart requires a recalculation.

Specified by:
getChanged in interface Changeable
Returns:
Does the chart need a racalc?

getChanged

public boolean getChanged(int mask)
Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks). The ChangedFlag property determines the type of action the chart needs to take regarding the current change.

Specified by:
getChanged in interface Changeable
Parameters:
mask - the mask to check against
Returns:
Does the chart need a racalc based on the mask?

recalc

public void recalc()
Recalculates the entire chart, if it has been marked for recalculation.


setChanged

public void setChanged(boolean n,
                       int cf)
Sets the value of the Changed property, which determines whether the chart requires recalculation. This value is propagated to all child components.

Specified by:
setChanged in interface Changeable
Parameters:
n - boolean value of the Changed property
cf - the changed flag mask to check against

setChanged

public void setChanged(boolean n,
                       int cf,
                       boolean updateParent)
Sets the value of the Changed property, which determines whether the chart requires recalculation. This value is propagated to all the child components.
Note: This method is mandated by the Changeable interface, but has no use in JCChart3d. It is usually used for cases in which the Changed property must be changed without forcing a recalculation.

Specified by:
setChanged in interface Changeable
Parameters:
n - boolean value of the Changed property
cf - the changed flag mask to check against
updateParent - since this is the final parent, call setChanged if true and store the fact that a change is needed if false

redraw

public void redraw()
For internal use only. Called by the setChanged() method of JCChart3dArea. The Java3D version of JCChart3d overrides this method to call update().


paint

public void paint(Graphics gc)
Overrides the superclass's paint() method so that the chart is fully painted and flushed before the listeners are called.

Overrides:
paint in class JComponent
Parameters:
gc - the graphics used for painting

firePaint

public void firePaint()
Fires a paint event to interested listeners.


getDrawingArea

public Rectangle getDrawingArea()
Gets the drawing area represented by this chart.

Returns:
rectangle object containing drawing area

getDrawingArea

public void getDrawingArea(Rectangle rect)
Gets the drawing area represented by this chart and places it in the provided rectangle.

Parameters:
rect - rectangle object to fill, with drawing area coordinates

getDrawingAreaHeight

public int getDrawingAreaHeight()
Gets the height of the drawing area represented by this chart.

Specified by:
getDrawingAreaHeight in interface LegendComponentLayoutUser
Returns:
the height of the drawing area

getDrawingAreaWidth

public int getDrawingAreaWidth()
Gets the width of the drawing area represented by this chart.

Specified by:
getDrawingAreaWidth in interface LegendComponentLayoutUser
Returns:
the width of the drawing area

paintComponent

public void paintComponent(Graphics gc)
The top-level paint routine in JCChart3d.

Overrides:
paintComponent in class JComponent
Parameters:
gc - the graphics object used to paint

printAll

public void printAll(Graphics g)
Prints this component and all of its subcomponents. Overridden from java.awt.Component, but should be used in the same way.

Overrides:
printAll in class JComponent
Parameters:
g - the graphics object used to paint

doLayout

public void doLayout()
JCChart3d layout method. It lays out the header, footer, legend, and chart area.

Overrides:
doLayout in class Container

setLayout

public void setLayout(LayoutManager mgr)
Overrides java.awt.Component setLayout().

Overrides:
setLayout in class Container
Parameters:
mgr - the layout manager to be used for doing the layout

setLayoutHints

public void setLayoutHints(JComponent child,
                           Rectangle layoutHints)
Sets layout hints for chart children. Hints are rectangle objects. A value of Integer.MAX_VALUE in the rectangle's members indicates to calculate default values during layout. Other values indicate to the layout to use that value. For example, a rectangle with members x=5, y=10, width=MAX_VALUE, and height=200, would indicate to the layout mechanism that the chart child should be placed at (5,10), have a height of 200, and use the default width.

Layout hints are only used by the DefaultChartLayout layout manager.

Parameters:
child - chart child - either the chart3dArea, legend, header, or footer
layoutHints - rectangle object containing the desired layout hints

getLayoutHints

public Rectangle getLayoutHints(JComponent child)
Gets layout hints for the specified chart child.

Specified by:
getLayoutHints in interface LegendComponentLayoutUser
Parameters:
child - chart child - either the chart3dArea, legend, header, or footer
Returns:
Rectangle object containing the desired layout hints. Null child is not one of the valid children of chart.

setBatched

public void setBatched(boolean bt)
Sets the value of the Batched property, which controls whether chart updates are accumulated.

Parameters:
bt - if true, it will accumulate chart updates; if false, it forces the accumulated updates to be processed

isBatched

public boolean isBatched()
Gets the value of the Batched property.

Specified by:
isBatched in interface Changeable
Returns:
true if updates are being accumulated; if false, updates are not accumulated

update

public void update()
Forces the chart to re-layout and recalculate.


addNotify

public void addNotify()
Overrides javax.swing.JComponent addNotify().

Overrides:
addNotify in class JComponent

setBackground

public void setBackground(Color c)
Overrides the superclass's method so that changes will generate redraws.

Overrides:
setBackground in class JComponent
Parameters:
c - the new background color

setForeground

public void setForeground(Color c)
Overrides the superclass's method so that changes will generate redraws.

Overrides:
setForeground in class JComponent
Parameters:
c - the new foreground color

setFont

public void setFont(Font f)
Overrides the superclass's method so that changes will generate redraws.

Overrides:
setFont in class JComponent
Parameters:
f - the new chart font

setOpaque

public void setOpaque(boolean op)
Overrides the superclass's method so that changes will generate redraws.

Overrides:
setOpaque in class JComponent
Parameters:
op - the new value of opaque

setAllowUserChanges

public void setAllowUserChanges(boolean change)
Sets the value of the AllowUserChanges property, which determines whether the user viewing the chart can modify chart values. Used to allow edits to values and changes to parameters via the Customizer.

Parameters:
change - if true, the user is allowed to modify graph values; if false, the user is not allowed to modify graph values

getAllowUserChanges

public boolean getAllowUserChanges()
Gets the value of the AllowUserChanges property, which determines whether the user viewing the chart can modify chart values. Used to allow edits to values and changes to parameters via the Customizer.

Returns:
if true, the user is allowed to modify the graph values; false otherwise

setWarningDialog

public void setWarningDialog(boolean on)
Sets the value of the WarningDialog property, which controls whether a dialog will appear when the chart has warning messages.

Parameters:
on - if true (default), the warning dialog will appear; if false, the user will not be warned of anything

isWarningDialog

public boolean isWarningDialog()
Gets the value of the WarningDialog property.

Returns:
if true (default), the warning dialog will appear; if false, the user will not be warned of anything

getHeader

public JComponent getHeader()
Gets the Header property. The Header property controls the object which controls the display of the header.

Specified by:
getHeader in interface LegendComponentLayoutUser
Returns:
The JComponent object associated with the header. By default it is an instance of JLabel.

setHeader

public void setHeader(JComponent head)
Sets the Header property. The Header property controls the object that controls the display of the header.

Parameters:
head - the JComponent object associated with the header

getFooter

public JComponent getFooter()
Sets the Footer property. The Footer property controls the object that controls the display of the footer.

Specified by:
getFooter in interface LegendComponentLayoutUser
Returns:
The JComponent object associated with the footer. By default it is an instance of JLabel.

setFooter

public void setFooter(JComponent foot)
Sets the Footer property. The Footer property controls the object that controls the display of the footer.

Parameters:
foot - the JComponent object associated with the footer

getLegend

public com.klg.jclass.util.legend.JCLegend getLegend()
Gets the Legend property. The Legend property controls the object that controls the display of the legend.

Specified by:
getLegend in interface LegendComponentLayoutUser
Returns:
the JCLegend object associated with the legend

setLegend

public void setLegend(com.klg.jclass.util.legend.JCLegend jl)
Sets the Legend property. The Legend property controls the object that controls the display of the legend. If the legend has no populator or renderer set, they will be set with JClass Chart 3D's default legend populator and renderer.

Parameters:
jl - the JCLegend object associated with the legend

getChart3dArea

public com.klg.jclass.chart3d.JCChart3dArea getChart3dArea()
Gets the value of the Chart3dArea property. The Chart3dArea property controls the object that controls the display of the graph.

Returns:
the JCChart3dArea object associated with this JCChart3d

getComponentArea

public JComponent getComponentArea()
Used to implement the LegendComponentLayoutUser interface. Returns the component used to draw the actual chart.

Specified by:
getComponentArea in interface LegendComponentLayoutUser
Returns:
the subcomponent used to draw the actual chart

setChart3dArea

public void setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea ca)
Sets the value of the Chart3dArea property. The Chart3dArea property controls the object that controls the display of the graph.

Parameters:
ca - the new chart area

getDataView

public com.klg.jclass.chart3d.Chart3dDataView getDataView(int index)
Gets the value of the specified index within the dataViews property. The dataviews property is an indexed property of JCChart3d that contains one or more Chart3dDataView objects. Each Chart3dDataView object controls the display of data using a particular chart type.

Parameters:
index - index of the dataView object to return
Returns:
ChartDataView object

addDataView

public com.klg.jclass.chart3d.Chart3dDataView addDataView(int index,
                                                          int chartType)
Creates a new Chart3dDataView and adds it to the chart at the specified index, replacing the existing ChartDataView object at that specified index. If the index is one past the final occupied index, the ChartDataView will be added to the end of the list. Also, see setDataView.

Parameters:
index - index of the dataView object to add
chartType - the chartType of the added dataView
Returns:
the newly creaated ChartDataView

setDataView

public void setDataView(int index,
                        com.klg.jclass.chart3d.Chart3dDataView ndv)
Takes the specified Chart3dDataView and adds it to the chart at the index indicated. The act of adding this new Chart3dDataView will cause all existing Chart3dDataView objects to re-order themselves. Also, see addDataView.

Parameters:
index - position at which to add the new object
ndv - new data view object

setDataView

public void setDataView(List views)
Sets the value of the dataViews property, which is an indexed property that contains all the data to be displayed in the 3d chart.

Parameters:
views - array of data views to be included in the dataViews property

findDataView

public com.klg.jclass.chart3d.Chart3dDataView findDataView(String name)
Finds a data view, given its name.

Parameters:
name - the name to use in the search
Returns:
the desired ChartDataView; if not found, null is returned

getDataView

public List getDataView()
Gets the value of the DataViews property, which is an indexed property that contains all the data to be displayed in the chart.

Returns:
array of data views that are included in the dataViews property (currently only one is supported)

getOriginalDataView

protected List getOriginalDataView()
Gets the actual data view collection. Used within the chart instead of using getDataView() in order to avoid copying.

Returns:
the list of dataViews (currently only one is supported)

removeDataView

public void removeDataView(int index)
Removes a Chart3dDataView from the index specified. The act of removing a Chart3dDataView from the 3d chart will cause all existing Chart3dDataView objects to re-order themselves.

Parameters:
index - position from which to remove the object

getNumDataViews

public int getNumDataViews()
Gets the value of the NumDataViews property, which indicates how many Chart3dDataView objects are stored in JClass Chart 3D. It is a read-only property.

Returns:
number of Chart3dDataView objects inside this JCChart3d instance. Currently only one dataView is supported.

reset

public void reset()
Performs a reset on the chart. Returns the default dataport to chart3d.


cancel

public void cancel()
Performs a cancel on the chart. Cancel will stop any current action.


getAbout

public String getAbout()
Gets the value of the About property. The About property displays contact information for Quest Software in the BeanBox.

Returns:
the about String

setAbout

public void setAbout(String s)
Sets the value of the About property. The About property displays contact information for Quest Software in the BeanBox.

Parameters:
s - the new about String

pick

public com.klg.jclass.chart3d.JCData3dIndex pick(Point p,
                                                 com.klg.jclass.chart3d.Chart3dDataView dataView)
Given a screen position in pixels, returns a JCData3dIndex object that represents the index of the closest point in the elevation data set of the specified ChartData3dView instance. If no data view is supplied, all data views are considered when finding the closest point (only one dataView is currently supported). If the data in a data view is being updated when pick() is called, the result may be incorrect.

Parameters:
p - pick point in pixels relative to the JCChart3d object
dataView - data view on which to perform pick; if null, all data views are used (only one dataView is currently supported)
Returns:
The JCData3dIndex object representing the index of the picked point. This is either a JCData3dGridIndex representing the (x, y) index of grid data point, or a JCData3dPointIndex representing the (series, point) index of a point in a point data set.

pickLegend

protected com.klg.jclass.chart3d.JCData3dIndex pickLegend(Point p,
                                                          com.klg.jclass.chart3d.Chart3dDataView dataView)
Internal pick method. Chooses the contour level or data series represented by the legend item at the provided position. If a data view is supplied, picking is done for the provided data view only. Otherwise, it tries to do picking for any data view (currently only one is supported).

Parameters:
p - pick point relative to legend
dataView - data view on which to perform pick; if null, all data views are used (only one dataView is currently supported)
Returns:
JCData3dIndex object representing the picked legend item. This might be a JCData3dContourIndex that represents a contour range, or a JCData3dContourPointIndex that represents a Point Data series.

unpick

public Point unpick(com.klg.jclass.chart3d.Chart3dDataView dataView,
                    com.klg.jclass.chart3d.JCData3dIndex index)
Returns the position in screen pixels of a particular point in a particular data set (grid data or point data).

Parameters:
dataView - the data view containing the specified series
index - The data index of the point. This is either a JCData3dGridIndex representing the (x, y) index of grid data point, or a JCData3dPointIndex representing the (series, point) index of a point in a point data set.
Returns:
AWT Point object representing position in screen pixels relative to the JCChart3d object, or null if the point does not exist

addChart3dListener

public void addChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
Adds a listener to changes in JClass Chart 3D. Called after zoom, translate, and scale (when used either through method calls or interactive triggers), as well as following rotate, depth change, or edit (interactive only).

Parameters:
l - the listener to be added

removeChart3dListener

public void removeChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
Removes the listener for changes in JClass Chart 3D from a list of listeners.

Parameters:
l - the listener to be removed

sendEvent

public void sendEvent()
Tells interested users that the chart is changed after an action is performed.


addPick3dListener

public void addPick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
Adds listener to JClass Chart 3D pick events.

Parameters:
l - the new pick listener to be added

removePick3dListener

public void removePick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
Removes the listener for JClass Chart 3D pick events from a list of listeners.

Parameters:
l - the pick listener to be deleted

sendPick3dEvent

public void sendPick3dEvent(com.klg.jclass.chart3d.JCData3dIndex index)
Sends pick event to all objects listening for it.

Parameters:
index - The data index to send to the pick listeners. This could be a JCData3dGridIndex, JCData3dPointIndex, or JCData3dContourIndex, depending on the location and type of picking that has happened.

requestFocus

public void requestFocus()
Requests the input focus. A FocusEvent will be generated to indicate that the focus has been gained.

Overrides:
requestFocus in class JComponent
See Also:
FocusEvent

isFocusTraversable

public boolean isFocusTraversable()
Overrides the superclass's isFocusTraversable method to always return true, which is required to get keyPress events.

Overrides:
isFocusTraversable in class Component
Returns:
Is this component focus traversable?

resetDefaults

public void resetDefaults()
Resets the line, symbol, and fill color and pattern to the default index values. The colors are defined in JCStyle.


setLineColorIndex

public void setLineColorIndex(int colorIndex)
Sets the line color index.

Parameters:
colorIndex - the new line color index

setColorIndex

protected void setColorIndex(int colorIndex,
                             int style)
Sets the color index based on the style.

Parameters:
colorIndex - the new color index
style - the fill style, line style, or symbol style color index

setFillColorIndex

public void setFillColorIndex(int colorIndex)
Sets the initial fill color index.

Parameters:
colorIndex - the new fill color index

setSymbolColorIndex

public void setSymbolColorIndex(int colorIndex)
Sets the initial symbol color index.

Parameters:
colorIndex - the new symbol color index

setSymbolShapeIndex

public void setSymbolShapeIndex(int shapeIndex)
Sets the initial symbol shape index.

Parameters:
shapeIndex - the new shape index

getColorIndex

protected int getColorIndex(int style)
Gets the color index based on the style.

Parameters:
style - the fill style, line style, or symbol style color index
Returns:
the color index based on the style

getLineColorIndex

public int getLineColorIndex()
Gets the current line color index.

Returns:
the current line color index

getFillColorIndex

public int getFillColorIndex()
Gets the current fill color index.

Returns:
the current fill color index

getSymbolColorIndex

public int getSymbolColorIndex()
Gets the current symbol color index.

Returns:
the current symbol color index

getSymbolShapeIndex

public int getSymbolShapeIndex()
Gets the current symbol shape index.

Returns:
the current symbol shape index

getCustomizerName

public abstract String getCustomizerName()
Gets the value of the CustomizerName property. The CustomzierName property controls the name of the customizer used by JClass Chart 3D. It must be a full class name. The default value is com.klg.jclass.chart3d.customizer.Chart3dCustomizer.

Returns:
the current customizer name

setCustomizerName

protected abstract void setCustomizerName(String s)
Sets the value of the CustomizerName property. The CustomzierName property controls the name of the customizer used by JClass Chart 3D. It must be a full class name. The default value is com.klg.jclass.chart3d.customizer.Chart3dCustomizer.

Parameters:
s - the new customizer name

getUI

public com.klg.jclass.chart3d.JCChart3dUI getUI()
Returns the UI for JCChart3d.

Returns:
the JCChart3d UI object

setUI

public void setUI(ComponentUI newUI)
Sets the UI for JCChart3d.

Overrides:
setUI in class JComponent
Parameters:
newUI - the new user interface object

updateUI

public void updateUI()
Updates the UI for JCChart3d.

Overrides:
updateUI in class JComponent

getUIClassID

public String getUIClassID()
Returns the UIClass ID for JCChart3d.

Overrides:
getUIClassID in class JComponent
Returns:
the UIClass ID

registerUI

public void registerUI()
Tells the UIManager class which class to use for JCChart3d.


getSource

public Object getSource()
Returns this chart as an object.

Returns:
this chart as an object

getComponentAt

public Component getComponentAt(int x,
                                int y)
Overrides the Container class's method to return only components that are actually showing.

Overrides:
getComponentAt in class Container
Parameters:
x - the x position of the component
y - the y position of the component
Returns:
the current component at the specified point

snapshot

public Image snapshot()
Takes a snapshot of the current chart.

Returns:
image object containing a snapshot of the chart

snapshot

public Image snapshot(int imagetype)
Takes a snapshot of the current chart and places it in an image of the specified type. The image types are as specified in the BufferedImage class. BufferedImage.TYPE_INT_ARGB is a good default for representing many possible colors. If using less than 256 colors, BufferedImage.TYPE_BYTE_INDEXED may prove to generate faster and smaller images.

Parameters:
imagetype - the type of image to write to, as defined in the java.awt.image.BufferedImage class
Returns:
image object containing snapshot of chart

snapshot

public void snapshot(Image img)
Takes a snapshot of the current chart and places it in the supplied image.

Parameters:
img - the image to put the snapshot in

getGraphics

public Graphics getGraphics()
Overrides parent getGraphics(). If another Graphics object has been set to be the current one, that one is returned. Otherwise, call the superclass' getGraphics() method.

Specified by:
getGraphics in interface com.klg.jclass.util.ServerRenderable
Overrides:
getGraphics in class JComponent
Returns:
the Graphics object to use to draw this chart

setGraphics

public void setGraphics(Graphics g)
Provides a way for the chart to draw to a custom Graphics object. A null call specifies that the default Graphics object is used to draw to the screen.

Specified by:
setGraphics in interface com.klg.jclass.util.ServerRenderable
Parameters:
g - Graphics object to use for drawing

serverSnapshot

public Image serverSnapshot()
Internal use only. Don't use.

Specified by:
serverSnapshot in interface com.klg.jclass.util.ServerRenderable

serverPaint

public void serverPaint(Graphics igc)
Internal use only. Don't use.

Specified by:
serverPaint in interface com.klg.jclass.util.ServerRenderable

getXGrid

public double[] getXGrid()
Retrieves the x grid values. This method is required to implement the Chart3dGridDataModel interface.

Specified by:
getXGrid in interface Chart3dGridDataModel
Returns:
array of double values representing x grid points

getYGrid

public double[] getYGrid()
Retrieves the y grid values. This method is required to implement the Chart3dGridDataModel interface.

Specified by:
getYGrid in interface Chart3dGridDataModel
Returns:
array of double values representing y grid points

getZValues

public double[][] getZValues()
Retrieves the z values - one for each (x,y) grid point. This method is required to implement Chart3dGridDataModel interface.

Specified by:
getZValues in interface Chart3dGridDataModel
Returns:
doubly subscripted array of double values representing z values

getPoints

public Point3d[][] getPoints()
Retrieves a list of points for a scatter plot. This method is required to implement the Chart3dPointDataModel interface.

Specified by:
getPoints in interface Chart3dPointDataModel
Returns:
an array of Point3d arrays, each of which represents the points in a series

setLocale

public void setLocale(Locale locale)
Sets the locale for chart3d.

Overrides:
setLocale in class Component
Parameters:
locale - the Locale object
See Also:
Locale

getLocale

public Locale getLocale()
Returns the chart3d locale.

Overrides:
getLocale in class Component
Returns:
Locale the chart3d locale

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