Package com.metsci.glimpse.core.canvas
Class SwingLightweightGlimpseCanvas
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- com.metsci.glimpse.core.canvas.SwingLightweightGlimpseCanvas
-
- All Implemented Interfaces:
GlimpseCanvas,GlimpseTarget,ImageObserver,MenuContainer,Serializable,Accessible
@Deprecated public class SwingLightweightGlimpseCanvas extends JPanel implements GlimpseCanvas
Deprecated.A Swing GlimpseCanvas implementation which draws to aGLCanvas. This Canvas implementation is not as well supported as the newer JOGLNewtCanvasAWT. For this reason,NewtSwingGlimpseCanvasshould generally be preferred over this class.- Author:
- ulman
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Component
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
Constructor Summary
Constructors Constructor Description SwingLightweightGlimpseCanvas()Deprecated.SwingLightweightGlimpseCanvas(boolean setNoEraseBackgroundProperty, com.jogamp.opengl.GLProfile glProfile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead.SwingLightweightGlimpseCanvas(boolean setNoEraseBackgroundProperty, String profile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead.SwingLightweightGlimpseCanvas(com.jogamp.opengl.GLContext context)Deprecated.SwingLightweightGlimpseCanvas(com.jogamp.opengl.GLProfile glProfile)Deprecated.SwingLightweightGlimpseCanvas(com.jogamp.opengl.GLProfile glProfile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead.SwingLightweightGlimpseCanvas(String profile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDisposeListener(com.jogamp.opengl.GLRunnable runnable)Deprecated.Called whenGLEventListener.dispose(GLAutoDrawable)event is fired by theGLAutoDrawableassociated with the GlimpseCanvas.voidaddKeyListener(KeyListener listener)Deprecated.voidaddLayout(GlimpseLayout layout)Deprecated.Adds a sub-layout to this GlimpseTarget which will only paint in a region of this GlimpseTarget based on its layout constraints.voidaddLayout(GlimpseLayout layout, int zOrder)Deprecated.voidaddMouseListener(MouseListener listener)Deprecated.voidaddMouseMotionListener(MouseMotionListener listener)Deprecated.voidaddMouseWheelListener(MouseWheelListener listener)Deprecated.voiddestroy()Deprecated.Destroys the native surface which this canvas draws to.voiddispose()Deprecated.A convenience method which is equivalent to:disposeAttached( ); destroy( );voiddisposeAttached()Deprecated.Disposes native resources of GlimpseLayouts and GlimpsePainters associated with the GlimpseCanvas.voiddisposePainter(GlimpsePainter painter)Deprecated.CallsGlimpsePainter.dispose(GlimpseContext)the next time the GLContext associated with this GlimpseCanvas is active.DimensiongetDimension()Deprecated.com.jogamp.opengl.GLContextgetGLContext()Deprecated.com.jogamp.opengl.GLAutoDrawablegetGLDrawable()Deprecated.GlimpseContextgetGlimpseContext()Deprecated.com.jogamp.opengl.GLProfilegetGLProfile()Deprecated.float[]getSurfaceScale()Deprecated.Returns the scale factors needed to convert the _native_ pixel coordinates to the _window_ pixel coordinates.GlimpseBoundsgetTargetBounds()Deprecated.GlimpseBoundsgetTargetBounds(GlimpseTargetStack stack)Deprecated.Returns the cached or calculated bounds of this GlimpseTarget for a particular context.List<GlimpseTarget>getTargetChildren()Deprecated.booleanisDestroyed()Deprecated.booleanisEventConsumer()Deprecated.Sets whether this GlimpseTarget hides events from GlimpseTargets under it.booleanisEventGenerator()Deprecated.Sets whether this GlimpseTarget generates GlimpseMouseEvents.voidpaint()Deprecated.Lays out anyGlimpseLayoutinstances attached to the GlimpseCanvas and paints allGlimpsePainterinstances attached to the GlimpseLayouts.voidremoveAllLayouts()Deprecated.Clears the canvas, removing all attached GlimpseLayouts.voidremoveKeyListener(KeyListener listener)Deprecated.voidremoveLayout(GlimpseLayout layout)Deprecated.Removes a previously added layout from this GlimpseTarget.voidremoveMouseListener(MouseListener listener)Deprecated.voidremoveMouseMotionListener(MouseMotionListener listener)Deprecated.voidremoveMouseWheelListener(MouseWheelListener listener)Deprecated.voidsetEventConsumer(boolean consume)Deprecated.Set whether or not this GlimpseTarget will consume or pass through mouse events.voidsetEventGenerator(boolean generate)Deprecated.Set whether or not this GlimpseTarget will generate GlimpseMouseEvents.voidsetLookAndFeel(LookAndFeel laf)Deprecated.Sets the LookAndFeel for this GlimpseTarget and all child GlimpseTargets.voidsetZOrder(GlimpseLayout layout, int zOrder)Deprecated.StringtoString()Deprecated.-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, 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, 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, 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, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, 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 com.metsci.glimpse.core.canvas.GlimpseCanvas
getDpi
-
Methods inherited from interface com.metsci.glimpse.core.context.GlimpseTarget
isVisible
-
-
-
-
Constructor Detail
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas()
Deprecated.
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas(com.jogamp.opengl.GLContext context)
Deprecated.
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas(com.jogamp.opengl.GLProfile glProfile)
Deprecated.
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas(com.jogamp.opengl.GLProfile glProfile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead. The context implicitly provides a GLProfile.
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas(String profile, com.jogamp.opengl.GLContext context)
Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead. The context implicitly provides a GLProfile.
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas(boolean setNoEraseBackgroundProperty, String profile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead. The context implicitly provides a GLProfile.
-
SwingLightweightGlimpseCanvas
public SwingLightweightGlimpseCanvas(boolean setNoEraseBackgroundProperty, com.jogamp.opengl.GLProfile glProfile, com.jogamp.opengl.GLContext context)Deprecated.UseSwingLightweightGlimpseCanvas(GLContext)instead. The context implicitly provides a GLProfile.
-
-
Method Detail
-
addMouseListener
public void addMouseListener(MouseListener listener)
Deprecated.- Overrides:
addMouseListenerin classComponent
-
addMouseMotionListener
public void addMouseMotionListener(MouseMotionListener listener)
Deprecated.- Overrides:
addMouseMotionListenerin classComponent
-
addMouseWheelListener
public void addMouseWheelListener(MouseWheelListener listener)
Deprecated.- Overrides:
addMouseWheelListenerin classComponent
-
removeMouseListener
public void removeMouseListener(MouseListener listener)
Deprecated.- Overrides:
removeMouseListenerin classComponent
-
removeMouseMotionListener
public void removeMouseMotionListener(MouseMotionListener listener)
Deprecated.- Overrides:
removeMouseMotionListenerin classComponent
-
removeMouseWheelListener
public void removeMouseWheelListener(MouseWheelListener listener)
Deprecated.- Overrides:
removeMouseWheelListenerin classComponent
-
addKeyListener
public void addKeyListener(KeyListener listener)
Deprecated.- Overrides:
addKeyListenerin classComponent
-
removeKeyListener
public void removeKeyListener(KeyListener listener)
Deprecated.- Overrides:
removeKeyListenerin classComponent
-
getGLProfile
public com.jogamp.opengl.GLProfile getGLProfile()
Deprecated.- Specified by:
getGLProfilein interfaceGlimpseCanvas
-
getGLDrawable
public com.jogamp.opengl.GLAutoDrawable getGLDrawable()
Deprecated.- Specified by:
getGLDrawablein interfaceGlimpseCanvas
-
getGlimpseContext
public GlimpseContext getGlimpseContext()
Deprecated.- Specified by:
getGlimpseContextin interfaceGlimpseCanvas
-
setLookAndFeel
public void setLookAndFeel(LookAndFeel laf)
Deprecated.Description copied from interface:GlimpseTargetSets the LookAndFeel for this GlimpseTarget and all child GlimpseTargets.- Specified by:
setLookAndFeelin interfaceGlimpseTarget
-
addLayout
public void addLayout(GlimpseLayout layout)
Deprecated.Description copied from interface:GlimpseTargetAdds a sub-layout to this GlimpseTarget which will only paint in a region of this GlimpseTarget based on its layout constraints. This same GlimpseLayout may be a child of any number of different GlimpseTargets.- Specified by:
addLayoutin interfaceGlimpseTarget
-
addLayout
public void addLayout(GlimpseLayout layout, int zOrder)
Deprecated.- Specified by:
addLayoutin interfaceGlimpseTarget
-
setZOrder
public void setZOrder(GlimpseLayout layout, int zOrder)
Deprecated.- Specified by:
setZOrderin interfaceGlimpseTarget
-
removeLayout
public void removeLayout(GlimpseLayout layout)
Deprecated.Description copied from interface:GlimpseTargetRemoves a previously added layout from this GlimpseTarget.- Specified by:
removeLayoutin interfaceGlimpseTarget
-
removeAllLayouts
public void removeAllLayouts()
Deprecated.Description copied from interface:GlimpseTargetClears the canvas, removing all attached GlimpseLayouts.- Specified by:
removeAllLayoutsin interfaceGlimpseTarget
-
getTargetChildren
public List<GlimpseTarget> getTargetChildren()
Deprecated.- Specified by:
getTargetChildrenin interfaceGlimpseTarget- Returns:
- the list of children added through addLayout( GlimpseLayout ).
-
getDimension
public Dimension getDimension()
Deprecated.
-
getTargetBounds
public GlimpseBounds getTargetBounds(GlimpseTargetStack stack)
Deprecated.Description copied from interface:GlimpseTargetReturns the cached or calculated bounds of this GlimpseTarget for a particular context.- Specified by:
getTargetBoundsin interfaceGlimpseTarget- Returns:
- the bounds for the given stack
-
getTargetBounds
public GlimpseBounds getTargetBounds()
Deprecated.- Specified by:
getTargetBoundsin interfaceGlimpseCanvas
-
paint
public void paint()
Deprecated.Description copied from interface:GlimpseCanvasLays out anyGlimpseLayoutinstances attached to the GlimpseCanvas and paints allGlimpsePainterinstances attached to the GlimpseLayouts.- Specified by:
paintin interfaceGlimpseCanvas
-
getGLContext
public com.jogamp.opengl.GLContext getGLContext()
Deprecated.- Specified by:
getGLContextin interfaceGlimpseCanvas
-
isEventConsumer
public boolean isEventConsumer()
Deprecated.Description copied from interface:GlimpseTargetSets whether this GlimpseTarget hides events from GlimpseTargets under it. This value does not determine whether or not the GlimpseTarget will generate GlimpseMouseEvents (see {@link #isEventGenerator()).- Specified by:
isEventConsumerin interfaceGlimpseTarget- Returns:
- whether this target hides events from targets under it
-
setEventConsumer
public void setEventConsumer(boolean consume)
Deprecated.Description copied from interface:GlimpseTargetSet whether or not this GlimpseTarget will consume or pass through mouse events.- Specified by:
setEventConsumerin interfaceGlimpseTarget
-
isEventGenerator
public boolean isEventGenerator()
Deprecated.Description copied from interface:GlimpseTargetSets whether this GlimpseTarget generates GlimpseMouseEvents. This value does not determine whether or not GlimpseTargets underneath this GlimpseTarget will also generate GlimpseMouseEvents (seeGlimpseTarget.isEventConsumer()).- Specified by:
isEventGeneratorin interfaceGlimpseTarget- Returns:
- whether this target will generate GlimpseMouseEvents
-
setEventGenerator
public void setEventGenerator(boolean generate)
Deprecated.Description copied from interface:GlimpseTargetSet whether or not this GlimpseTarget will generate GlimpseMouseEvents.- Specified by:
setEventGeneratorin interfaceGlimpseTarget
-
isDestroyed
public boolean isDestroyed()
Deprecated.- Specified by:
isDestroyedin interfaceGlimpseCanvas- Returns:
- whether or not
#dispose()has been successfully called. Once true, this GlimpseCanvas is no longer valid for rendering.
-
destroy
public void destroy()
Deprecated.Description copied from interface:GlimpseCanvasDestroys the native surface which this canvas draws to. Does not dispose of GL resources associated with GlimpsePainters and GlimpseLayouts attached to the GlimpseCanvas (as these may be attached to other GlimpseCanvases as well). Disposing of Glimpse resources can be done via#disposeAttached().- Specified by:
destroyin interfaceGlimpseCanvas- See Also:
GlimpseCanvas.disposeAttached()
-
addDisposeListener
public void addDisposeListener(com.jogamp.opengl.GLRunnable runnable)
Deprecated.Description copied from interface:GlimpseCanvasCalled whenGLEventListener.dispose(GLAutoDrawable)event is fired by theGLAutoDrawableassociated with the GlimpseCanvas. This can happen for reasons other than the window containing the GlimpseCanvas being closed (for example, moving the window between physical monitors or moving the container between docks in a docking framework). Thus, GlimpsePainters and GlimpseLayouts attached to this GlimpseCanvas should generally not be disposed when this callback occurs.- Specified by:
addDisposeListenerin interfaceGlimpseCanvas
-
dispose
public void dispose()
Deprecated.Description copied from interface:GlimpseCanvasA convenience method which is equivalent to:disposeAttached( ); destroy( );- Specified by:
disposein interfaceGlimpseCanvas
-
disposeAttached
public void disposeAttached()
Deprecated.Description copied from interface:GlimpseCanvasDisposes native resources of GlimpseLayouts and GlimpsePainters associated with the GlimpseCanvas.- Specified by:
disposeAttachedin interfaceGlimpseCanvas- See Also:
GlimpseCanvas.destroy()
-
disposePainter
public void disposePainter(GlimpsePainter painter)
Deprecated.Description copied from interface:GlimpseCanvasCalls
GlimpsePainter.dispose(GlimpseContext)the next time the GLContext associated with this GlimpseCanvas is active. Generally this call is equivalent to:this.getGLDrawable( ).invoke( false, new GLRunnable( ) {- Specified by:
disposePainterin interfaceGlimpseCanvas
-
getSurfaceScale
public float[] getSurfaceScale()
Deprecated.Description copied from interface:GlimpseCanvasReturns the scale factors needed to convert the _native_ pixel coordinates to the _window_ pixel coordinates. This only really matters on displays like like Macbook Retina.- Specified by:
getSurfaceScalein interfaceGlimpseCanvas- Returns:
- the scale factors as {scaleX, scaleY}
-
-