JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d.j3d
Class JCChart3dAreaJava3d

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

public class JCChart3dAreaJava3d
extends JCChart3dArea
implements Changeable, Java3dImageable, Serializable

This is the sub-portion of the overall Chart3d real estate onto which the actual 3D chart 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.j3d.JCChart3dUniverse chart3dUniverse
           
protected  HashMap shapeInstances
           
 
Fields inherited from class com.klg.jclass.chart3d.JCChart3dArea
actionHandler, anno, axes, bar, changed, changedFlag, chart3d, cube, inAction, last, plotCube, preferredSize, rbGC, scatter, surface, transform, updateParent, view3d, viewport, xAxis, yAxis, zAxis
 
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
 
Method Summary
 void addAmbientLight()
          Adds an AmbientLight object with Chart3d default properties to the scene graph.
 void addDirectionalLight()
          Adds a DirectionalLight object with Chart3d default properties to the scene graph.
 void addFog(Fog fog)
          Adds a Fog object to the scene graph.
 void addLighting(Light light)
          Adds a Light object to the scene graph.
 void addLinearFog(Color color)
          Adds a LinearFog object to the scene graph.
 void addMouseListener(MouseListener listener)
          Adds a MouseListener to the Chart3d area.
 void addMouseMotionListener(MouseMotionListener listener)
          Adds a MouseMotionListener to the Chart3d area.
 void addPointLight()
          Adds a PointLight object with Chart3d default properties to the scene graph.
 void addSpotLight()
          Adds a SpotLight object with Chart3d default properties to the scene graph.
 void enableFog(boolean flag)
          Enables or disables the Fog.
 com.klg.jclass.chart3d.j3d.JCChart3dUniverse getChart3dUniverse()
          Returns a JCChart3dUniverse object containing the Java 3D scene graph.
 double getFogBackDistance()
          Gets the back distance of the Fog object.
 Color getFogColor()
          Gets the color of the Fog.
 double getFogFrontDistance()
          Gets the front distance of the Fog object.
 Image getJava3dAsImage(Point imageLocation)
          Gets the Java3d canvas used by this class as an image.
 HashMap getShapeInstances()
           
 boolean isFogEnabled()
          Gets the on/off state of the fog.
 void paintComponent(Graphics gc)
          Renders the JCChart3dArea contents.
protected  com.klg.jclass.chart3d.JCData3dIndex pick(Point p, com.klg.jclass.chart3d.Chart3dDataView dataView)
          Overrides the base class method.
 void removeAllLighting()
          Removes all Light objects from the scene graph.
 void removeFog()
          Removes the current Fog object from the scene graph.
 void removeMouseListener(MouseListener listener)
          Removes a MouseMotionListener from the Chart3d area.
 void removeMouseMotionListener(MouseMotionListener listener)
          Removes a MouseMotionListener from the Chart3d area.
 void setBackground(Color color)
          Sets the color of the Background node in the scene graph.
 void setFogBackDistance(double back)
          Sets the back distance of the Fog object.
 void setFogColor(Color color)
          Sets the color of the Fog.
 void setFogFrontDistance(double front)
          Sets the front distance of the Fog object.
protected  void setPlotCubeJava3d(com.klg.jclass.chart3d.j3d.JCPlotCubeJava3d pc)
           
 void setSceneAntialiasing(boolean antialias)
          Enables or disables full scene antialiasing.
 void setVisible(boolean fVisible)
          Displays or hides the Chart3d area.
 void updateAnnotation()
           
 void updatePlotCube()
           
 
Methods inherited from class com.klg.jclass.chart3d.JCChart3dArea
animateAction, cancel, drawPreview, drawZoomRectangle, endAction, fillWithBackgroundColor, getActionHandler, getAnno, getAxes, getAxis, getBar, getChanged, getChanged, getChart3d, getCube, getDrawingArea, getDrawingArea, getGraphics, getMinimumSize, getPlotCube, getPreferredSize, getScatter, getSurface, getTransform, getView3d, getViewport, getXAxis, getYAxis, getZAxis, isBatched, isChanged, isChanged, isInAction, recalc, reset, setActionHandler, setAnno, setAxes, setAxis, setBar, setChanged, setChanged, setChart3d, setCube, setForeground, setGraphics, setInAction, setOpaque, setPlotCube, setPreferredSize, setScatter, setSurface, setTransform, setView3d, setViewport, setXAxis, setYAxis, setZAxis, startAction, updateParent
 
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, 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, 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, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.klg.jclass.util.Changeable
getChanged, getChanged, isBatched, isChanged, isChanged, setChanged, setChanged
 

Field Detail

chart3dUniverse

protected com.klg.jclass.chart3d.j3d.JCChart3dUniverse chart3dUniverse

shapeInstances

protected HashMap shapeInstances
Method Detail

getShapeInstances

public HashMap getShapeInstances()

getChart3dUniverse

public com.klg.jclass.chart3d.j3d.JCChart3dUniverse getChart3dUniverse()
Returns a JCChart3dUniverse object containing the Java 3D scene graph. getChart3dUniverse().getVirtualUniverse().getSceneBranchGroup() returns a BranchGroup containing the scene graph.

Returns:
a BranchGroup containing the scene graph

setBackground

public void setBackground(Color color)
Sets the color of the Background node in the scene graph.

Overrides:
setBackground in class JCChart3dArea
Parameters:
color - the desired color for the background

addAmbientLight

public void addAmbientLight()
Adds an AmbientLight object with Chart3d default properties to the scene graph.


addSpotLight

public void addSpotLight()
Adds a SpotLight object with Chart3d default properties to the scene graph.


addDirectionalLight

public void addDirectionalLight()
Adds a DirectionalLight object with Chart3d default properties to the scene graph.


addPointLight

public void addPointLight()
Adds a PointLight object with Chart3d default properties to the scene graph.


addLighting

public void addLighting(Light light)
Adds a Light object to the scene graph.

Parameters:
light - the Light object to be added

removeAllLighting

public void removeAllLighting()
Removes all Light objects from the scene graph.


addFog

public void addFog(Fog fog)
Adds a Fog object to the scene graph.

Parameters:
fog - the Fog object to be added

removeFog

public void removeFog()
Removes the current Fog object from the scene graph.


addLinearFog

public void addLinearFog(Color color)
Adds a LinearFog object to the scene graph.

Parameters:
color - the desired color for the LinearFog

enableFog

public void enableFog(boolean flag)
Enables or disables the Fog.

Parameters:
flag - true to enable the fog, false to disable it

isFogEnabled

public boolean isFogEnabled()
Gets the on/off state of the fog.

Returns:
true if fog is enabled, false if it is disabled

setFogColor

public void setFogColor(Color color)
Sets the color of the Fog.

Parameters:
color - the desired color for the fog

getFogColor

public Color getFogColor()
Gets the color of the Fog.

Returns:
the Fog color

setFogFrontDistance

public void setFogFrontDistance(double front)
Sets the front distance of the Fog object.

Parameters:
front - the front distance in meters

getFogFrontDistance

public double getFogFrontDistance()
Gets the front distance of the Fog object.

Returns:
the front distance in meters

setFogBackDistance

public void setFogBackDistance(double back)
Sets the back distance of the Fog object.

Parameters:
back - the back distance in meters

getFogBackDistance

public double getFogBackDistance()
Gets the back distance of the Fog object.

Returns:
the back distance in meters

setSceneAntialiasing

public void setSceneAntialiasing(boolean antialias)
Enables or disables full scene antialiasing. If enabled, rendering is very slow.

Parameters:
antialias - true to enable full scene antialiasing, false to disable it

setVisible

public void setVisible(boolean fVisible)
Displays or hides the Chart3d area.

Overrides:
setVisible in class JComponent
Parameters:
fVisible - true to display the Chart3d area, false to hide it

setPlotCubeJava3d

protected void setPlotCubeJava3d(com.klg.jclass.chart3d.j3d.JCPlotCubeJava3d pc)

paintComponent

public void paintComponent(Graphics gc)
Description copied from class: JCChart3dArea
Renders the JCChart3dArea contents.

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

pick

protected com.klg.jclass.chart3d.JCData3dIndex pick(Point p,
                                                    com.klg.jclass.chart3d.Chart3dDataView dataView)
Overrides the base class 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, tries to find the closest point from any data view (currently, only one data view is supported).

Overrides:
pick in class JCChart3dArea
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

updateAnnotation

public void updateAnnotation()

updatePlotCube

public void updatePlotCube()

getJava3dAsImage

public Image getJava3dAsImage(Point imageLocation)
Gets the Java3d canvas used by this class as an image. Implemented as part of the Java3dImageable interface.

Specified by:
getJava3dAsImage in interface Java3dImageable
Parameters:
imageLocation - a Point object that will be filled with the location of the canvas' image within this component
Returns:
an Image class containg a drawn representation of this class' 3d canvas object; null if no canvas exists

addMouseMotionListener

public void addMouseMotionListener(MouseMotionListener listener)
Adds a MouseMotionListener to the Chart3d area.

Overrides:
addMouseMotionListener in class Component
Parameters:
listener - the MouseMotionListener to be added

removeMouseMotionListener

public void removeMouseMotionListener(MouseMotionListener listener)
Removes a MouseMotionListener from the Chart3d area.

Overrides:
removeMouseMotionListener in class Component
Parameters:
listener - the MouseMotionListener to be removed

addMouseListener

public void addMouseListener(MouseListener listener)
Adds a MouseListener to the Chart3d area.

Overrides:
addMouseListener in class Component
Parameters:
listener - the MouseListener to be added

removeMouseListener

public void removeMouseListener(MouseListener listener)
Removes a MouseMotionListener from the Chart3d area.

Overrides:
removeMouseListener in class Component
Parameters:
listener - the MouseListener to be removed

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