Package ffx.ui
Class GraphicsCanvas
java.lang.Object
java.awt.Component
java.awt.Canvas
org.jogamp.java3d.Canvas3D
ffx.ui.GraphicsCanvas
- All Implemented Interfaces:
ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
The GraphicsCanvas class provides a Canvas on which to render 3D Graphics. The following display
types are currently supported: Wireframe, Ball and Stick, Spacefill/CPK, RMIN and Tube.
- Author:
- Michael J. Schnieders
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The ImageFormat enum lists supported image formats.static enum
The LeftButtonMode enum describes what the left mouse button does.static enum
The MouseMode enum describes what system is affected by mouse drags.Nested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvas
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class org.jogamp.java3d.Canvas3D
FIELD_ALL, FIELD_LEFT, FIELD_RIGHT
Fields inherited from class java.awt.Component
accessibleContext, 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
colorWaitgetNavigationvoid
void
void
postSwap()
void
selected()
selectedvoid
setCaptures
(boolean c) setCapturesvoid
setColorvoid
setColorModel
(String model, MSNode node) Operates on the passed node.void
setPositionvoid
setPosition
(MSNode node) setPositionvoid
void
setViewModel
(String model, MSNode node) Operates on the supplied node.toString()
void
updateScene
(MSNode n, boolean t, boolean v, RendererCache.ViewModel newViewModel, boolean c, RendererCache.ColorModel newColorModel) updateScenevoid
updateScene
(ArrayList<MSNode> n, boolean t, boolean v, RendererCache.ViewModel newViewModel, boolean c, RendererCache.ColorModel newColorModel) updateScenevoid
viewWaitMethods inherited from class org.jogamp.java3d.Canvas3D
addNotify, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelHeight, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getPixelWidth, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, isOffScreen, isRendererRunning, isShadingLanguageSupported, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Constructor Details
-
GraphicsCanvas
Constructor for GraphicsCanvas.- Parameters:
mainlPanel
- aMainPanel
object.
-
-
Method Details
-
actionPerformed
Handles ActionEvents from the Selection, Display, Color, Options, and Picking Menus.
- Specified by:
actionPerformed
in interfaceActionListener
-
colorWait
colorWait- Parameters:
colorMode
- aString
object.
-
paint
- Overrides:
paint
in classorg.jogamp.java3d.Canvas3D
-
postRender
public void postRender()Labels are drawn in postRender.
- Overrides:
postRender
in classorg.jogamp.java3d.Canvas3D
-
postSwap
public void postSwap()Image capture from the 3D Canvas is done in postSwap.
- Overrides:
postSwap
in classorg.jogamp.java3d.Canvas3D
-
selected
public void selected()selected -
setCaptures
public void setCaptures(boolean c) setCaptures- Parameters:
c
- a boolean.
-
setColor
setColor- Parameters:
model
- aString
object.
-
setColorModel
Operates on the passed node.- Parameters:
model
- Stringnode
- aMSNode
object.
-
setPosition
public void setPosition()setPosition -
setPosition
setPosition- Parameters:
node
- aMSNode
object.
-
setView
- Parameters:
model
- aString
object.
-
setViewModel
Operates on the supplied node.- Parameters:
model
- Stringnode
- aMSNode
object.
-
toString
-
updateScene
public void updateScene(ArrayList<MSNode> n, boolean t, boolean v, RendererCache.ViewModel newViewModel, boolean c, RendererCache.ColorModel newColorModel) updateScene- Parameters:
n
- aArrayList
object.t
- a boolean.v
- a boolean.newViewModel
- aRendererCache.ViewModel
object.c
- a boolean.newColorModel
- aRendererCache.ColorModel
object.
-
updateScene
public void updateScene(MSNode n, boolean t, boolean v, RendererCache.ViewModel newViewModel, boolean c, RendererCache.ColorModel newColorModel) updateScene- Parameters:
n
- aMSNode
object.t
- a boolean.v
- a boolean.newViewModel
- aRendererCache.ViewModel
object.c
- a boolean.newColorModel
- aRendererCache.ColorModel
object.
-
viewWait
viewWait- Parameters:
viewMode
- aString
object.
-