Class JPanelSculptor

All Implemented Interfaces:
ActionListener, FocusListener, ItemListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class JPanelSculptor extends JPanelRendererJ3D

Title: JPanelSculptor

Description: Sculptor panel draws the sculptor and apply the sculptor to the whole volume region.

Author:
Alexandra Bokinsky, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • m_iSculptHeight

      int m_iSculptHeight
      DOCUMENT ME!
    • m_iSculptWidth

      int m_iSculptWidth
      Window information for Sculpting:.
    • lineButton

      private JToggleButton lineButton
      Line shape button.
    • m_kApplySculptButton

      private JButton m_kApplySculptButton
      Button to apply sculpt region to the volume.
    • m_kClearDrawOutlineButton

      private JButton m_kClearDrawOutlineButton
      Button for clearing the sculpt region.
    • m_kDrawOutlineButton

      private JToggleButton m_kDrawOutlineButton
      Toggle button is down while the mouse is used to draw the sculpt outline.
    • m_kInvertOutlineButton

      private JButton m_kInvertOutlineButton
      Button for inverting the sculpt region.
    • m_kSaveSculptButton

      private JButton m_kSaveSculptButton
      Button to save the sculpt image.
    • m_kTextureSculptor

      private TextureSculptor m_kTextureSculptor
      DOCUMENT ME!
    • m_kUndoSculptButton

      private JButton m_kUndoSculptButton
      Button to undo the sculpt and restor the original volume.
    • m_kVolumeSculptor

      private VolumeSculptor m_kVolumeSculptor
      Sculptor object enables, draws and sculpts the volume based on the outline region drawn on screen. Handles drawing the sculpt region.
    • mainPanel

      private JPanel mainPanel
      Control panel for volume sculpting.
    • rectButton

      private JToggleButton rectButton
      Rectangle shape button.
    • scroller

      private JScrollPane scroller
      The scroll pane holding the panel content. Useful when the screen is small.
    • scrollPanel

      private JPanelSculptor.DrawingPanel scrollPanel
      Scroll panel that holding the all the control components.
    • surRender

      private SurfaceRender surRender
      SurfaceRender reference.
    • toolbarBuilder

      private ViewToolBarBuilder toolbarBuilder
      Toolbar builder reference.
  • Constructor Details

    • JPanelSculptor

      public JPanelSculptor(RenderViewBase parent)
      Contructor. Called from the surface render to create the sculptor control panel.
      Parameters:
      parent - surface render
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Command processor to handle the geodesic button events.
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class JPanelRendererBase
      Parameters:
      e - ActionEvent
    • applySculptRegion

      public void applySculptRegion()
      Cull the sculpt region through the 3D volume.
    • clearSculptRegion

      public void clearSculptRegion()
      clearwSculptRegion: called when the "Clear Outline" Button is pressed.
    • disposeLocal

      public void disposeLocal(boolean flag)
      Sets all variables to null, disposes, and garbage collects.
      Parameters:
      flag - dispose super or not, not used now.
    • drawSculptRegion

      public void drawSculptRegion()
      drawSculptRegion: called when the "Draw Sculpt Outline" Button is pressed.
    • getMainPanel

      public JPanel getMainPanel()
      Get the main control panel.
      Specified by:
      getMainPanel in class JPanelRendererBase
      Returns:
      mainPanel main control panel
    • init

      public void init()
      Initialize the buttons layout.
    • invertSculptRegion

      public void invertSculptRegion()
      clearwSculptRegion: called when the "Clear Outline" Button is pressed.
    • resizePanel

      public void resizePanel(int panelWidth, int frameHeight)
      Resizig the control panel with ViewJFrameVolumeView's frame width and height.
      Overrides:
      resizePanel in class JPanelRendererBase
      Parameters:
      panelWidth - panel width
      frameHeight - panel height
    • setFrameSize

      public void setFrameSize(int width, int height)
      Initialize the sculpt region size. ViewJFrameVolumeView call this method to init the region.
      Parameters:
      width - region width
      height - region height
    • setSculptShape

      public void setSculptShape(int shape)
      Set the sculpt shape, either lines or rectangle.
      Parameters:
      shape - shape number, 0 for lines, 1 for rectangle.
    • setVolumeSculptor

      public void setVolumeSculptor(VolumeRenderer _rayBasedRender)
      Initialize the raycast based volume render with the sculptor.
      Parameters:
      _rayBasedRender - VolumeRenderer
    • undoSculptRegion

      public void undoSculptRegion()
      undoSculptRegion: called when the "Undo Sculpt" Button is pressed.
    • finalize

      protected void finalize() throws Throwable
      Calls disposeLocal.
      Overrides:
      finalize in class JPanelRendererBase
      Throws:
      Throwable - DOCUMENT ME!