JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class JCChart3dArea

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.chart3d.JCChart3dArea
All Implemented Interfaces:
Changeable, Changeable, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
JCChart3dAreaJava3d

public class JCChart3dArea
extends JComponent
implements Changeable, Serializable

This is the sub-portion of the overall chart3d real estate onto which the actual linear/circular portion of the chart3d is drawn. Headers, footers, and legends are not drawn in this area; the 3d graph is.

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.JCAction actionHandler
          If an action is in process, this is the handler that will handle it.
protected  com.klg.jclass.chart3d.Anno anno
           
protected  com.klg.jclass.chart3d.JCAxis[] axes
          A list of the X, Y, and Z axis objects.
protected  com.klg.jclass.chart3d.JCBar bar
          Object that controls bar chart only properties.
protected  boolean changed
          Boolean that represents the value of the Changed property.
protected  int changedFlag
           
protected  com.klg.jclass.chart3d.JCChart3d chart3d
          The chart3d to be placed in this chart3d area.
protected  com.klg.jclass.chart3d.Cube cube
           
protected  boolean inAction
          Asks if we are currently in an action.
protected  Point last
          The point used during last animateAction call.
protected  com.klg.jclass.chart3d.JCPlotCube plotCube
          Object that controls properties of the plot cube.
protected  Dimension preferredSize
          What is our preferred size? If null, the super's preferred size is used.
protected  Graphics rbGC
           
protected  com.klg.jclass.chart3d.JCScatter scatter
          Object that controls scatter plot only properties.
protected  com.klg.jclass.chart3d.JCSurface surface
          Object that controls surface only properties.
protected  com.klg.jclass.chart3d.Transform transform
           
protected  boolean updateParent
           
protected  com.klg.jclass.chart3d.JCView3d view3d
          An object that controls the X, Y, and Z rotation.
protected  com.klg.jclass.chart3d.JCViewport viewport
          An object that allows the user to control the drawing viewport.
protected  com.klg.jclass.chart3d.JCAxis xAxis
          The axis in the X direction.
protected  com.klg.jclass.chart3d.JCAxis yAxis
          The axis in the Y direction.
protected  com.klg.jclass.chart3d.JCAxis zAxis
          The axis in the Z direction.
 
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
JCChart3dArea()
          No arguments constructor.
JCChart3dArea(com.klg.jclass.chart3d.JCChart3d chart3d)
          Creates a chart3d area for a 3D chart.
 
Method Summary
protected  void animateAction(InputEvent event, int x, int y)
          Calls the handler for the current action, if the current point is different from the last point.
 void cancel()
          Stops any current action.
 void drawPreview(double scale, double horizShift, double vertShift, double xRotation, double yRotation, double zRotation, int axisId, int x, int y)
          Draws the preview cube for this chart3dArea.
 void drawZoomRectangle(Point p, Point start)
          Package-internal method that draws a rubber band rectangle from the point in "start" to the provided point.
protected  void endAction(InputEvent event, int x, int y)
          Calls the action handler to end the current action.
protected  void fillWithBackgroundColor(Graphics gc)
          Fills the chart area will its background color.
 com.klg.jclass.chart3d.JCAction getActionHandler()
          Gets the action handler for this chart 3D area.
 com.klg.jclass.chart3d.Anno getAnno()
          Gets the chart area's Anno object.
 com.klg.jclass.chart3d.JCAxis[] getAxes()
          Returns the list of axes for this 3d chart.
 com.klg.jclass.chart3d.JCAxis getAxis(int axisId)
          Returns the axis based on the given axisId.
 com.klg.jclass.chart3d.JCBar getBar()
          Gets the chart area's JCBar object.
 boolean getChanged()
          Gets the value of the Changed property.
 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.JCChart3d getChart3d()
          Gets the chart area's associated JCChart3d object (normally its parent).
 com.klg.jclass.chart3d.Cube getCube()
          Gets the chart area's Cube object.
 Rectangle getDrawingArea()
          Gets the bounding rectangle of the component's drawing area, (its area minus the shadows and insets).
 void getDrawingArea(Rectangle rect)
          Gets the bounding rectangle of the component's drawing area, (its area minus the insets).
 Graphics getGraphics()
          Overrides parent getGraphics().
 Dimension getMinimumSize()
          Returns the minimum size for the chart area.
 com.klg.jclass.chart3d.JCPlotCube getPlotCube()
          Gets the chart area's JCPlotCube object.
 Dimension getPreferredSize()
          Returns the preferred size for the chart area.
 com.klg.jclass.chart3d.JCScatter getScatter()
          Gets the chart area's JCScatter object.
 com.klg.jclass.chart3d.JCSurface getSurface()
          Gets the chart area's JCSurface object.
 com.klg.jclass.chart3d.Transform getTransform()
          Gets the chart area's Transform object.
 com.klg.jclass.chart3d.JCView3d getView3d()
          Gets the chart area's JCView3d object.
 com.klg.jclass.chart3d.JCViewport getViewport()
          Gets the chart area's JCViewport object.
 com.klg.jclass.chart3d.JCAxis getXAxis()
          Gets the X axis for this chart3dArea object.
 com.klg.jclass.chart3d.JCAxis getYAxis()
          Gets the Y axis for this chart3dArea object.
 com.klg.jclass.chart3d.JCAxis getZAxis()
          Gets the Z axis for this chart3dArea object.
 boolean isBatched()
          Returns the value of the batched property.
 boolean isChanged()
          Gets the value of the Changed property.
 boolean isChanged(int mask)
          Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks).
 boolean isInAction()
          Gets the value of the InAction property, which is a flag that determines whether an action is in process.
 void paintComponent(Graphics gc)
          Renders the JCChart3dArea contents.
protected  com.klg.jclass.chart3d.JCData3dIndex pick(Point p, com.klg.jclass.chart3d.Chart3dDataView dataView)
          Package-internal pick method.
 void recalc()
          If necessary, forces recalculation of the chart area.
 void reset()
          Returns the chart back to the default viewport settings.
protected  void setActionHandler(com.klg.jclass.chart3d.JCAction handler)
          Sets the action handler for this chart 3D area.
 void setAnno(com.klg.jclass.chart3d.Anno anno)
          Sets the Anno object for this chart3dArea.
 void setAxes(com.klg.jclass.chart3d.JCAxis[] axes)
          Sets all axes for the chart via an array of axes.
 void setAxis(com.klg.jclass.chart3d.JCAxis axis, int axisId)
          Sets an axis on the chart based on axisId.
 void setBackground(Color bg)
          Overrides setBackground to make sure that the entire chart is redrawn if the background is set on this subcomponent.
Note: The Opaque property needs to be set to true for the background color to be visible.
 void setBar(com.klg.jclass.chart3d.JCBar bar)
          Sets the chart area's JCBar object.
 void setChanged(boolean n, int cf)
          Sets the value of the Changed property and updates the parent object.
 void setChanged(boolean n, int cf, boolean updateParent)
          Sets the value of the Changed property.
 void setChart3d(com.klg.jclass.chart3d.JCChart3d chart3d)
          Sets the parent JCChart3d object.
 void setCube(com.klg.jclass.chart3d.Cube cube)
          Sets the Cube object for this chart3dArea.
 void setForeground(Color c)
          Overrides setForeground to make sure legend is marked for redraw.
 void setGraphics(Graphics g)
          Provides a way for the chart area to draw to a custom Graphics object.
 void setInAction(boolean ia)
          Sets the value of the InAction property, which is a flag that determines whether an action is in process.
 void setOpaque(boolean op)
          Overrides setOpaque to make sure entire chart is redrawn if opacity is set on this subcomponent.
 void setPlotCube(com.klg.jclass.chart3d.JCPlotCube plotCube)
          Sets the chart area's JCPlotCube object.
 void setPreferredSize(Dimension preferredSize)
          Sets the preferred size manually for this JCChart3dArea instance.
 void setScatter(com.klg.jclass.chart3d.JCScatter scatter)
          Sets the chart area's JCScatter object.
 void setSurface(com.klg.jclass.chart3d.JCSurface surface)
          Sets the chart area's JCSurface object.
 void setTransform(com.klg.jclass.chart3d.Transform transform)
          Sets the Transform object for this chart3dArea.
 void setView3d(com.klg.jclass.chart3d.JCView3d view3d)
          Sets the chart area's JCView3d object.
 void setViewport(com.klg.jclass.chart3d.JCViewport viewport)
          Sets the chart area's JCViewport object.
 void setXAxis(com.klg.jclass.chart3d.JCAxis axis)
          Sets the X axis for this chart3dArea object.
 void setYAxis(com.klg.jclass.chart3d.JCAxis axis)
          Sets the Y axis for this chart3dArea object.
 void setZAxis(com.klg.jclass.chart3d.JCAxis axis)
          Sets the Z axis for this chart3dArea object.
protected  void startAction(InputEvent event, int x, int y)
          Starts the action stored in the actionHandler, if any.
 void updateParent(int cf)
          Updates our parent with the changed flag mask information, and possibly repaints.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

updateParent

protected boolean updateParent

rbGC

protected Graphics rbGC

changed

protected boolean changed
Boolean that represents the value of the Changed property.


changedFlag

protected int changedFlag

inAction

protected boolean inAction
Asks if we are currently in an action.


actionHandler

protected transient com.klg.jclass.chart3d.JCAction actionHandler
If an action is in process, this is the handler that will handle it.


preferredSize

protected Dimension preferredSize
What is our preferred size? If null, the super's preferred size is used.


chart3d

protected com.klg.jclass.chart3d.JCChart3d chart3d
The chart3d to be placed in this chart3d area.


xAxis

protected com.klg.jclass.chart3d.JCAxis xAxis
The axis in the X direction.


yAxis

protected com.klg.jclass.chart3d.JCAxis yAxis
The axis in the Y direction.


zAxis

protected com.klg.jclass.chart3d.JCAxis zAxis
The axis in the Z direction.


axes

protected com.klg.jclass.chart3d.JCAxis[] axes
A list of the X, Y, and Z axis objects.


viewport

protected com.klg.jclass.chart3d.JCViewport viewport
An object that allows the user to control the drawing viewport.


view3d

protected com.klg.jclass.chart3d.JCView3d view3d
An object that controls the X, Y, and Z rotation.


cube

protected com.klg.jclass.chart3d.Cube cube

plotCube

protected com.klg.jclass.chart3d.JCPlotCube plotCube
Object that controls properties of the plot cube.


transform

protected com.klg.jclass.chart3d.Transform transform

anno

protected com.klg.jclass.chart3d.Anno anno

surface

protected com.klg.jclass.chart3d.JCSurface surface
Object that controls surface only properties.


bar

protected com.klg.jclass.chart3d.JCBar bar
Object that controls bar chart only properties.


scatter

protected com.klg.jclass.chart3d.JCScatter scatter
Object that controls scatter plot only properties.


last

protected Point last
The point used during last animateAction call.

Constructor Detail

JCChart3dArea

public JCChart3dArea()
No arguments constructor.


JCChart3dArea

public JCChart3dArea(com.klg.jclass.chart3d.JCChart3d chart3d)
Creates a chart3d area for a 3D chart.

Parameters:
chart3d - the JCChart3d whose graph will be drawn in this chart3d area
Method Detail

getChart3d

public com.klg.jclass.chart3d.JCChart3d getChart3d()
Gets the chart area's associated JCChart3d object (normally its parent).

Returns:
the JCChart3d object referenced by this JCChart3dArea

setChart3d

public void setChart3d(com.klg.jclass.chart3d.JCChart3d chart3d)
Sets the parent JCChart3d object.

Parameters:
chart3d - The new JCChart3d object

setForeground

public void setForeground(Color c)
Overrides setForeground to make sure legend is marked for redraw. (Needed for outline color of swatches, which is derived from Chart3dArea.)

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

setBackground

public void setBackground(Color bg)
Overrides setBackground to make sure that the entire chart is redrawn if the background is set on this subcomponent.
Note: The Opaque property needs to be set to true for the background color to be visible. JCChartArea is transparent by default.

Overrides:
setBackground in class JComponent
Parameters:
bg - The new background color

setOpaque

public void setOpaque(boolean op)
Overrides setOpaque to make sure entire chart is redrawn if opacity is set on this subcomponent.

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

getDrawingArea

public Rectangle getDrawingArea()
Gets the bounding rectangle of the component's drawing area, (its area minus the shadows and insets).

Returns:
a rectangle representing the component's drawing area
See Also:
JComponent.setBorder(javax.swing.border.Border)

getDrawingArea

public void getDrawingArea(Rectangle rect)
Gets the bounding rectangle of the component's drawing area, (its area minus the insets).

Parameters:
rect - the rectangle in which to put the drawing area information
See Also:
JComponent.setBorder(javax.swing.border.Border)

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size for the chart area.

Overrides:
getPreferredSize in class JComponent
Returns:
the current preferred size

setPreferredSize

public void setPreferredSize(Dimension preferredSize)
Sets the preferred size manually for this JCChart3dArea instance.

Overrides:
setPreferredSize in class JComponent
Parameters:
preferredSize - the preferred size

getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size for the chart area.

Overrides:
getMinimumSize in class JComponent
Returns:
a Dimension object containing the minimum size

getAxis

public com.klg.jclass.chart3d.JCAxis getAxis(int axisId)
Returns the axis based on the given axisId.

Parameters:
axisId - the axis ID (either AXIS_X, AXIS_Y, or AXIS_Z).
Returns:
the JCAxis object based on the given axisId

setAxis

public void setAxis(com.klg.jclass.chart3d.JCAxis axis,
                    int axisId)
Sets an axis on the chart based on axisId.

Parameters:
axis - the new axis
axisId - Which one of X, Y, or Z axis is it?

getAxes

public com.klg.jclass.chart3d.JCAxis[] getAxes()
Returns the list of axes for this 3d chart.

Returns:
the current list of axes for this chart

setAxes

public void setAxes(com.klg.jclass.chart3d.JCAxis[] axes)
Sets all axes for the chart via an array of axes.

Parameters:
axes - an array of axes (X, Y, and Z)

getXAxis

public com.klg.jclass.chart3d.JCAxis getXAxis()
Gets the X axis for this chart3dArea object.

Returns:
the X axis for this chart3dArea object

setXAxis

public void setXAxis(com.klg.jclass.chart3d.JCAxis axis)
Sets the X axis for this chart3dArea object.
Note: The axisId of the axis that is passed in must be equal to JCAxis.AXIS_X.

Parameters:
axis - the new X axis

getYAxis

public com.klg.jclass.chart3d.JCAxis getYAxis()
Gets the Y axis for this chart3dArea object.

Returns:
the Y axis for this chart3dArea object

setYAxis

public void setYAxis(com.klg.jclass.chart3d.JCAxis axis)
Sets the Y axis for this chart3dArea object.
Note: The axisId of the axis that is passed in must be equal to JCAxis.AXIS_Y.

Parameters:
axis - the new Y axis

getZAxis

public com.klg.jclass.chart3d.JCAxis getZAxis()
Gets the Z axis for this chart3dArea object.

Returns:
the Z axis for this chart3dArea object

setZAxis

public void setZAxis(com.klg.jclass.chart3d.JCAxis axis)
Sets the Z axis for this chart3dArea object.
Note: The axisId of the axis that is passed in must be equal to JCAxis.AXIS_Z.

Parameters:
axis - the new Z axis

getViewport

public com.klg.jclass.chart3d.JCViewport getViewport()
Gets the chart area's JCViewport object.

Returns:
the JCViewport object referenced by this JCChart3dArea

setViewport

public void setViewport(com.klg.jclass.chart3d.JCViewport viewport)
Sets the chart area's JCViewport object.

Parameters:
viewport - the new JCViewport object

getView3d

public com.klg.jclass.chart3d.JCView3d getView3d()
Gets the chart area's JCView3d object.

Returns:
the JCView3d object referenced by this JCChart3dArea

setView3d

public void setView3d(com.klg.jclass.chart3d.JCView3d view3d)
Sets the chart area's JCView3d object.

Parameters:
view3d - the new JCView3d object

getPlotCube

public com.klg.jclass.chart3d.JCPlotCube getPlotCube()
Gets the chart area's JCPlotCube object.

Returns:
the JCPlotCube object referenced by this JCChart3dArea

setPlotCube

public void setPlotCube(com.klg.jclass.chart3d.JCPlotCube plotCube)
Sets the chart area's JCPlotCube object.

Parameters:
plotCube - the new JCPlotCube object

getSurface

public com.klg.jclass.chart3d.JCSurface getSurface()
Gets the chart area's JCSurface object.

Returns:
the JCSurface object referenced by this JCChart3dArea

setSurface

public void setSurface(com.klg.jclass.chart3d.JCSurface surface)
Sets the chart area's JCSurface object.

Parameters:
surface - the new chart area surface object

getBar

public com.klg.jclass.chart3d.JCBar getBar()
Gets the chart area's JCBar object.

Returns:
the JCBar object referenced by this JCChart3dArea

setBar

public void setBar(com.klg.jclass.chart3d.JCBar bar)
Sets the chart area's JCBar object.

Parameters:
bar - the new chart area bar object

getScatter

public com.klg.jclass.chart3d.JCScatter getScatter()
Gets the chart area's JCScatter object.

Returns:
the JCScatter object referenced by this JCChart3dArea

setScatter

public void setScatter(com.klg.jclass.chart3d.JCScatter scatter)
Sets the chart area's JCScatter object.

Parameters:
scatter - the new chart area scatter object

getCube

public com.klg.jclass.chart3d.Cube getCube()
Gets the chart area's Cube object.

Returns:
the Cube object referenced by this JCChart3dArea

setCube

public void setCube(com.klg.jclass.chart3d.Cube cube)
Sets the Cube object for this chart3dArea.

Parameters:
cube - the new Cube object

getTransform

public com.klg.jclass.chart3d.Transform getTransform()
Gets the chart area's Transform object.

Returns:
the Transform object referenced by this JCChart3dArea

setTransform

public void setTransform(com.klg.jclass.chart3d.Transform transform)
Sets the Transform object for this chart3dArea.

Parameters:
transform - the new transform object

getAnno

public com.klg.jclass.chart3d.Anno getAnno()
Gets the chart area's Anno object.

Returns:
the Anno object referenced by this JCChart3dArea

setAnno

public void setAnno(com.klg.jclass.chart3d.Anno anno)
Sets the Anno object for this chart3dArea.

Parameters:
anno - the new Anno object

getChanged

public boolean getChanged()
Gets the value of the Changed property. The Changed property determines whether the object needs to be recalculated.

Specified by:
getChanged in interface Changeable
Returns:
true if the object has been changed and needs recalculation; false otherwise

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 action the object needs to take in regards to the current change.

Specified by:
getChanged in interface Changeable
Parameters:
mask - the mask to check against
Returns:
true if the specified mask exists in the ChangedFlag property; false otherwise

isChanged

public final boolean isChanged()
Gets the value of the Changed property. The Changed property determines whether the object needs to be recalculated.

Specified by:
isChanged in interface Changeable
Returns:
true if the object has been changed and needs recalculation; false otherwise

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 action the object needs to take in regards to the current change.

Specified by:
isChanged in interface Changeable
Parameters:
mask - the mask to check against
Returns:
true if the specified mask exists in the ChangedFlag property; false otherwise

setChanged

public void setChanged(boolean n,
                       int cf)
Sets the value of the Changed property and updates the parent object. The Changed property determines whether the object needs to be recalculated.

Specified by:
setChanged in interface Changeable
Parameters:
n - new value for Changed
cf - the change flag mask used to check which type of change is needed

setChanged

public void setChanged(boolean n,
                       int cf,
                       boolean updateParent)
Sets the value of the Changed property. The Changed property determines whether the object needs to be recalculated.

Specified by:
setChanged in interface Changeable
Parameters:
n - new value for Changed
cf - the change flag mask used to check which type of change is needed
updateParent - if true, the parent is updated; otherwise, the parent is not updated (the "update" semantics are up to the implementor)

getActionHandler

public com.klg.jclass.chart3d.JCAction getActionHandler()
Gets the action handler for this chart 3D area. The action handler handles the interactions for this chart area.

Returns:
the current action handler that is in use; null if none is in use

setActionHandler

protected void setActionHandler(com.klg.jclass.chart3d.JCAction handler)
Sets the action handler for this chart 3D area. The action handler handles the interactions for this chart area.

Parameters:
handler - the new action handler to use

isInAction

public boolean isInAction()
Gets the value of the InAction property, which is a flag that determines whether an action is in process.

Returns:
whether we are in an action

setInAction

public void setInAction(boolean ia)
Sets the value of the InAction property, which is a flag that determines whether an action is in process.

Parameters:
ia - Are we in an action?

fillWithBackgroundColor

protected void fillWithBackgroundColor(Graphics gc)
Fills the chart area will its background color.

Parameters:
gc - the graphics object to use for filling

paintComponent

public void paintComponent(Graphics gc)
Renders the JCChart3dArea contents.

Overrides:
paintComponent in class JComponent
Parameters:
gc - graphics context used for drawing

updateParent

public void updateParent(int cf)
Updates our parent with the changed flag mask information, and possibly repaints.

Parameters:
cf - the change flag mask used to check which type of change is needed

recalc

public void recalc()
If necessary, forces recalculation of the chart area.


animateAction

protected void animateAction(InputEvent event,
                             int x,
                             int y)
Calls the handler for the current action, if the current point is different from the last point. The assumption is that the action has been started already.

Parameters:
event - the event for the action
x - the X position of the current action
y - the Y position of the current action

endAction

protected void endAction(InputEvent event,
                         int x,
                         int y)
Calls the action handler to end the current action.

Parameters:
event - the event for the action
x - the X position of the current action
y - the Y position of the current action

startAction

protected void startAction(InputEvent event,
                           int x,
                           int y)
Starts the action stored in the actionHandler, if any.

Parameters:
event - the event for the action
x - the X position of the action
y - the Y position of the action

drawPreview

public void drawPreview(double scale,
                        double horizShift,
                        double vertShift,
                        double xRotation,
                        double yRotation,
                        double zRotation,
                        int axisId,
                        int x,
                        int y)
Draws the preview cube for this chart3dArea.

Parameters:
scale - the scale of the preview cube
horizShift - the horizontal shift of the preview cube
vertShift - the vertical shift of the preview cube
xRotation - the xRotation angle of the preview cube
yRotation - the yRotation angle of the preview cube
zRotation - the zRotation angle of the preview cube
axisId - this determines the type of previewing
x - the current X position of the mouse (needed for EYE previewing)
y - the current Y position of the mouse (needed for EYE previewing)

drawZoomRectangle

public void drawZoomRectangle(Point p,
                              Point start)
Package-internal method that draws a rubber band rectangle from the point in "start" to the provided point.

Parameters:
p - coordinates to use as the end point for the rectangle
start - starting point for zoom rectangle

reset

public void reset()
Returns the chart back to the default viewport settings.


cancel

public void cancel()
Stops any current action.


isBatched

public boolean isBatched()
Returns the value of the batched property.

Specified by:
isBatched in interface Changeable
Returns:
this method will always return false

pick

protected com.klg.jclass.chart3d.JCData3dIndex pick(Point p,
                                                    com.klg.jclass.chart3d.Chart3dDataView dataView)
Package-internal pick method. Chooses the point closest to the provided position. If a data view is supplied, picks a point on the provided data view only. Otherwise, it tries to find the closest point from any data view (currently only one data view is supported).

Parameters:
p - pick point in pixels relative to JCChart3dArea object
dataView - Data view on which to perform pick. If null, all data views are used (currently only one data view is supported).
Returns:
JCData3dIndex object representing the picked point

getGraphics

public Graphics getGraphics()
Overrides parent getGraphics(). If another Graphics object has been set to be the current one, it is returned; otherwise, the superclass's getGraphics() method is called.

Overrides:
getGraphics in class JComponent
Returns:
the Graphics object to use to draw this chart area

setGraphics

public void setGraphics(Graphics g)
Provides a way for the chart area to draw to a custom Graphics object. Call with a null to specify use of the default Graphics object used to draw to the screen.

Parameters:
g - Graphics object to use for drawing

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