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

public class GraphicsCanvas extends org.jogamp.java3d.Canvas3D implements ActionListener
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:
  • Constructor Details

    • GraphicsCanvas

      public GraphicsCanvas(MainPanel mainlPanel)
      Constructor for GraphicsCanvas.
      Parameters:
      mainlPanel - a MainPanel object.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent evt)

      Handles ActionEvents from the Selection, Display, Color, Options, and Picking Menus.

      Specified by:
      actionPerformed in interface ActionListener
    • colorWait

      public void colorWait(String colorMode)
      colorWait
      Parameters:
      colorMode - a String object.
    • getNavigation

      public GraphicsAxis getNavigation()
      getNavigation
      Returns:
      a GraphicsAxis object.
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class org.jogamp.java3d.Canvas3D
    • postRender

      public void postRender()

      Labels are drawn in postRender.

      Overrides:
      postRender in class org.jogamp.java3d.Canvas3D
    • postSwap

      public void postSwap()

      Image capture from the 3D Canvas is done in postSwap.

      Overrides:
      postSwap in class org.jogamp.java3d.Canvas3D
    • selected

      public void selected()
      selected
    • setCaptures

      public void setCaptures(boolean c)
      setCaptures
      Parameters:
      c - a boolean.
    • setColor

      public void setColor(String model)
      setColor
      Parameters:
      model - a String object.
    • setColorModel

      public void setColorModel(String model, MSNode node)
      Operates on the passed node.
      Parameters:
      model - String
      node - a MSNode object.
    • setPosition

      public void setPosition()
      setPosition
    • setPosition

      public void setPosition(MSNode node)
      setPosition
      Parameters:
      node - a MSNode object.
    • setView

      public void setView(String model)
      Parameters:
      model - a String object.
    • setViewModel

      public void setViewModel(String model, MSNode node)
      Operates on the supplied node.
      Parameters:
      model - String
      node - a MSNode object.
    • toString

      public String toString()
      Overrides:
      toString in class Component
    • updateScene

      public void updateScene(ArrayList<MSNode> n, boolean t, boolean v, RendererCache.ViewModel newViewModel, boolean c, RendererCache.ColorModel newColorModel)
      updateScene
      Parameters:
      n - a ArrayList object.
      t - a boolean.
      v - a boolean.
      newViewModel - a RendererCache.ViewModel object.
      c - a boolean.
      newColorModel - a RendererCache.ColorModel object.
    • updateScene

      public void updateScene(MSNode n, boolean t, boolean v, RendererCache.ViewModel newViewModel, boolean c, RendererCache.ColorModel newColorModel)
      updateScene
      Parameters:
      n - a MSNode object.
      t - a boolean.
      v - a boolean.
      newViewModel - a RendererCache.ViewModel object.
      c - a boolean.
      newColorModel - a RendererCache.ColorModel object.
    • viewWait

      public void viewWait(String viewMode)
      viewWait
      Parameters:
      viewMode - a String object.