org.jzy3d.plot3d.rendering.canvas
Class CanvasSwing
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- com.jogamp.opengl.awt.GLJPanel
-
- org.jzy3d.plot3d.rendering.canvas.CanvasSwing
-
- All Implemented Interfaces:
- com.jogamp.nativewindow.awt.AWTPrintLifecycle, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.nativewindow.ScalableSurface, com.jogamp.nativewindow.WindowClosingProtocol, com.jogamp.opengl.awt.AWTGLAutoDrawable, com.jogamp.opengl.awt.ComponentEvents, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.opengl.GLSharedContextSetter, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, ICanvas, IScreenCanvas
Deprecated.
@Deprecated public class CanvasSwing extends com.jogamp.opengl.awt.GLJPanel implements IScreenCanvas
As of version 0.9.1,CanvasSwingis deprecated as the underlying extendedGLJPanelhas several drawbacks:- It is buggy, at least while resizing the panel, and sometime for any rendering
- Newt is now the recommended windowing toolkit by JOGL developers
CanvasNewtAwtinstead which is obtained by building a chart with newt parameter: new Chart("newt")- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
-
-
Field Summary
-
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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.jogamp.nativewindow.awt.AWTPrintLifecycle
DEFAULT_PRINT_TILE_SIZE
-
-
Constructor Summary
Constructors Constructor and Description CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality)Deprecated.CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality, com.jogamp.opengl.GLCapabilitiesImmutable glci)Deprecated.CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality, com.jogamp.opengl.GLCapabilitiesImmutable glci, boolean traceGL, boolean debugGL)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidaddKeyController(java.lang.Object o)Deprecated.A generic interface for mouse listener to remain Windowing toolkit independant.voidaddMouseController(java.lang.Object o)Deprecated.A generic interface for mouse listener to remain Windowing toolkit independant.voiddispose()Deprecated.Performs all required cleanup when destroying a Canvas.voidforceRepaint()Deprecated.Force repaint and ensure that GL2 rendering will occur in the GUI thread, wherever the caller stands.java.lang.StringgetDebugInfo()Deprecated.com.jogamp.opengl.GLDrawablegetDrawable()Deprecated.Returns the GLDrawable associated with the canvasRenderer3dgetRenderer()Deprecated.intgetRendererHeight()Deprecated.Provide the actual renderer height for the open gl camera settings, which is obtained after a resize event.intgetRendererWidth()Deprecated.Provide the actual renderer width for the open gl camera settings, which is obtained after a resize event.ViewgetView()Deprecated.Provide a reference to the View that renders into this canvas.voidremoveKeyController(java.lang.Object o)Deprecated.A generic interface for key listener to remain Windowing toolkit independant.voidremoveMouseController(java.lang.Object o)Deprecated.A generic interface for key listener to remain Windowing toolkit independant.com.jogamp.opengl.util.texture.TextureDatascreenshot()Deprecated.Returns an image with the current renderer's sizecom.jogamp.opengl.util.texture.TextureDatascreenshot(java.io.File file)Deprecated.voidsetPixelScale(float[] scale)Deprecated.Defines pixel scale.-
Methods inherited from class com.jogamp.opengl.awt.GLJPanel
addGLEventListener, addGLEventListener, addNotify, areAllGLEventListenerInitialized, createContext, destroy, display, disposeGLEventListener, flushGLRunnables, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getCurrentSurfaceScale, getCustomPixelBufferProvider, getDefaultCloseOperation, getDelegatedDrawable, getExclusiveContextThread, getFactory, getGL, getGLEventListener, getGLEventListenerCount, getGLEventListenerInitState, getGLProfile, getHandle, getMaximumSurfaceScale, getMinimumSurfaceScale, getNativeSurface, getRequestedGLCapabilities, getRequestedSurfaceScale, getSkipGLOrientationVerticalFlip, getSurfaceHeight, getSurfaceWidth, getTextureUnit, getUpstreamLock, getUpstreamWidget, initializeBackend, invoke, invoke, isGLOriented, isRealized, isThreadGLCapable, print, releasePrint, removeGLEventListener, removeNotify, reshape, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setDefaultCloseOperation, setExclusiveContextThread, setGL, setGLEventListenerInitState, setOpaque, setPixelBufferProvider, setRealized, setRequestedGLCapabilities, setSharedAutoDrawable, setSharedContext, setSkipGLOrientationVerticalFlip, setSurfaceScale, setTextureUnit, setupPrint, shouldPreserveColorBufferIfTranslucent, swapBuffers, toString
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jzy3d.plot3d.rendering.canvas.IScreenCanvas
display, getAnimator
-
Methods inherited from interface com.jogamp.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
-
-
-
-
Constructor Detail
-
CanvasSwing
public CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality)
Deprecated.
-
CanvasSwing
public CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality, com.jogamp.opengl.GLCapabilitiesImmutable glci)
Deprecated.
-
CanvasSwing
public CanvasSwing(IChartComponentFactory factory, Scene scene, Quality quality, com.jogamp.opengl.GLCapabilitiesImmutable glci, boolean traceGL, boolean debugGL)
Deprecated.
-
-
Method Detail
-
dispose
public void dispose()
Deprecated.Description copied from interface:ICanvasPerforms all required cleanup when destroying a Canvas.
-
forceRepaint
public void forceRepaint()
Deprecated.Force repaint and ensure that GL2 rendering will occur in the GUI thread, wherever the caller stands.- Specified by:
forceRepaintin interfaceICanvas
-
screenshot
public com.jogamp.opengl.util.texture.TextureData screenshot(java.io.File file) throws java.io.IOExceptionDeprecated.- Specified by:
screenshotin interfaceICanvas- Throws:
java.io.IOException
-
screenshot
public com.jogamp.opengl.util.texture.TextureData screenshot()
Deprecated.Description copied from interface:ICanvasReturns an image with the current renderer's size- Specified by:
screenshotin interfaceICanvas
-
getDrawable
public com.jogamp.opengl.GLDrawable getDrawable()
Deprecated.Description copied from interface:ICanvasReturns the GLDrawable associated with the canvas- Specified by:
getDrawablein interfaceICanvas
-
getView
public View getView()
Deprecated.Provide a reference to the View that renders into this canvas.
-
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:
getRendererWidthin interfaceICanvas
-
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:
getRendererHeightin interfaceICanvas
-
getRenderer
public Renderer3d getRenderer()
Deprecated.- Specified by:
getRendererin interfaceICanvas
-
getDebugInfo
public java.lang.String getDebugInfo()
Deprecated.- Specified by:
getDebugInfoin interfaceICanvas
-
addMouseController
public void addMouseController(java.lang.Object o)
Deprecated.Description copied from interface:ICanvasA 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:
addMouseControllerin interfaceICanvas
-
addKeyController
public void addKeyController(java.lang.Object o)
Deprecated.Description copied from interface:ICanvasA 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:
addKeyControllerin interfaceICanvas
-
removeMouseController
public void removeMouseController(java.lang.Object o)
Deprecated.Description copied from interface:ICanvasA 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:
removeMouseControllerin interfaceICanvas
-
removeKeyController
public void removeKeyController(java.lang.Object o)
Deprecated.Description copied from interface:ICanvasA 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:
removeKeyControllerin interfaceICanvas
-
setPixelScale
public void setPixelScale(float[] scale)
Deprecated.Description copied from interface:ICanvasDefines pixel scale. On MacOS Retina displays, a X*Y chart uses a (X*2)*(Y*2) viewport. This makes some calculation based on viewport (such asCamera.screenToModel(com.jogamp.opengl.GL, com.jogamp.opengl.glu.GLU, org.jzy3d.maths.Coord3d)output wrong result. When running on Retina display, those two options fixed buggy mouse selections on Retina:- setPixelScale(new float[]{0.5f,0.5f})
- setPixelScale(new float[] { ScalableSurface.IDENTITY_PIXELSCALE,
ScalableSurface.IDENTITY_PIXELSCALE })
- Specified by:
setPixelScalein interfaceICanvas- See Also:
ScalableSurface#setSurfaceScale(float[])} in JOGL javadoc for more informations
-
-
DMelt 3.0 © DataMelt by jWork.ORG