org.jzy3d.plot3d.rendering.canvas
Class CanvasSwing

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by javax.media.opengl.awt.GLJPanel
                      extended by org.jzy3d.plot3d.rendering.canvas.CanvasSwing
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, javax.media.nativewindow.WindowClosingProtocol, javax.media.opengl.awt.AWTGLAutoDrawable, javax.media.opengl.awt.ComponentEvents, javax.media.opengl.GLAutoDrawable, javax.media.opengl.GLDrawable, ICanvas, IScreenCanvas

Deprecated.

@Deprecated
public class CanvasSwing
extends javax.media.opengl.awt.GLJPanel
implements IScreenCanvas

As of version 0.9.1, CanvasSwing is deprecated as the underlying extended GLJPanel has several drawbacks:

It is thus suggested to use CanvasNewtAwt instead which is obtained by building a chart with newt parameter: new Chart("newt")

Author:
Martin Pernollet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Nested classes/interfaces inherited from interface javax.media.nativewindow.WindowClosingProtocol
javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode
 
Field Summary
protected  com.jogamp.opengl.util.Animator animator
          Deprecated.  
protected  Renderer3d renderer
          Deprecated.  
protected  View view
          Deprecated.  
 
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 javax.media.opengl.GLAutoDrawable
SCREEN_CHANGE_ACTION_ENABLED
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality)
          Deprecated.  
CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality, javax.media.opengl.GLCapabilitiesImmutable glci)
          Deprecated. Initialize a Canvas3d attached to a Scene, with a given rendering Quality.
CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality, javax.media.opengl.GLCapabilitiesImmutable glci, boolean traceGL, boolean debugGL)
          Deprecated. Initialize a Canvas3d attached to a Scene, with a given rendering Quality.
 
Method Summary
 void addKeyController(Object o)
          Deprecated. A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.
 void addMouseController(Object o)
          Deprecated. A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.
 void dispose()
          Deprecated. Performs all required cleanup when destroying a Canvas.
 void forceRepaint()
          Deprecated. Force repaint and ensure that GL2 rendering will occur in the GUI thread, wherever the caller stands.
 String getDebugInfo()
          Deprecated.  
 javax.media.opengl.GLDrawable getDrawable()
          Deprecated. Returns the GLDrawable associated with the canvas
 Renderer3d getRenderer()
          Deprecated.  
 int getRendererHeight()
          Deprecated. Provide the actual renderer height for the open gl camera settings, which is obtained after a resize event.
 int getRendererWidth()
          Deprecated. Provide the actual renderer width for the open gl camera settings, which is obtained after a resize event.
 View getView()
          Deprecated. Provide a reference to the View that renders into this canvas.
 void removeKeyController(Object o)
          Deprecated. A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.
 void removeMouseController(Object o)
          Deprecated. A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.
 com.jogamp.opengl.util.texture.TextureData screenshot()
          Deprecated. Returns an image with the current renderer's size
 com.jogamp.opengl.util.texture.TextureData screenshot(File file)
          Deprecated.  
 
Methods inherited from class javax.media.opengl.awt.GLJPanel
addGLEventListener, addGLEventListener, addNotify, createContext, destroy, display, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDefaultCloseOperation, getDelegatedDrawable, getFactory, getGL, getGLProfile, getHandle, getNativeSurface, getThreadName, getUpstreamWidget, invoke, isRealized, paintComponent, removeGLEventListener, removeGLEventListener, removeNotify, reshape, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setDefaultCloseOperation, setGL, setOpaque, setRealized, shouldPreserveColorBufferIfTranslucent, swapBuffers, toString
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jzy3d.plot3d.rendering.canvas.IScreenCanvas
display, getAnimator
 
Methods inherited from interface javax.media.opengl.awt.AWTGLAutoDrawable
repaint, setSize
 
Methods inherited from interface javax.media.opengl.GLDrawable
getHeight, getWidth
 
Methods inherited from interface javax.media.opengl.awt.ComponentEvents
addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

view

protected View view
Deprecated. 

renderer

protected Renderer3d renderer
Deprecated. 

animator

protected com.jogamp.opengl.util.Animator animator
Deprecated. 
Constructor Detail

CanvasSwing

public CanvasSwing(IChartComponentFactory factory,
                   Scene scene,
                   Quality quality)
Deprecated. 

CanvasSwing

public CanvasSwing(IChartComponentFactory factory,
                   Scene scene,
                   Quality quality,
                   javax.media.opengl.GLCapabilitiesImmutable glci)
Deprecated. 
Initialize a Canvas3d attached to a Scene, with a given rendering Quality.


CanvasSwing

public CanvasSwing(IChartComponentFactory factory,
                   Scene scene,
                   Quality quality,
                   javax.media.opengl.GLCapabilitiesImmutable glci,
                   boolean traceGL,
                   boolean debugGL)
Deprecated. 
Initialize a Canvas3d attached to a Scene, with a given rendering Quality.

Method Detail

dispose

public void dispose()
Deprecated. 
Description copied from interface: ICanvas
Performs all required cleanup when destroying a Canvas.

Specified by:
dispose in interface ICanvas
Overrides:
dispose in class javax.media.opengl.awt.GLJPanel

forceRepaint

public void forceRepaint()
Deprecated. 
Force repaint and ensure that GL2 rendering will occur in the GUI thread, wherever the caller stands.

Specified by:
forceRepaint in interface ICanvas

screenshot

public com.jogamp.opengl.util.texture.TextureData screenshot(File file)
                                                      throws IOException
Deprecated. 
Specified by:
screenshot in interface ICanvas
Throws:
IOException

screenshot

public com.jogamp.opengl.util.texture.TextureData screenshot()
Deprecated. 
Description copied from interface: ICanvas
Returns an image with the current renderer's size

Specified by:
screenshot in interface ICanvas

getDrawable

public javax.media.opengl.GLDrawable getDrawable()
Deprecated. 
Description copied from interface: ICanvas
Returns the GLDrawable associated with the canvas

Specified by:
getDrawable in interface ICanvas

getView

public View getView()
Deprecated. 
Provide a reference to the View that renders into this canvas.

Specified by:
getView in interface ICanvas

getRendererWidth

public int getRendererWidth()
Deprecated. 
Provide the actual renderer width for the open gl camera settings, which is obtained after a resize event.

Specified by:
getRendererWidth in interface ICanvas

getRendererHeight

public int getRendererHeight()
Deprecated. 
Provide the actual renderer height for the open gl camera settings, which is obtained after a resize event.

Specified by:
getRendererHeight in interface ICanvas

getRenderer

public Renderer3d getRenderer()
Deprecated. 
Specified by:
getRenderer in interface ICanvas

getDebugInfo

public String getDebugInfo()
Deprecated. 
Specified by:
getDebugInfo in interface ICanvas

addMouseController

public void addMouseController(Object o)
Deprecated. 
Description copied from interface: ICanvas
A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.

Specified by:
addMouseController in interface ICanvas

addKeyController

public void addKeyController(Object o)
Deprecated. 
Description copied from interface: ICanvas
A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.

Specified by:
addKeyController in interface ICanvas

removeMouseController

public void removeMouseController(Object o)
Deprecated. 
Description copied from interface: ICanvas
A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.

Specified by:
removeMouseController in interface ICanvas

removeKeyController

public void removeKeyController(Object o)
Deprecated. 
Description copied from interface: ICanvas
A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.

Specified by:
removeKeyController in interface ICanvas


Copyright © 2013. All rights reserved.