Class JPanelSculptor_WM

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JPanelSculptor_WM extends JInterfaceBase

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
      Window width information for Sculpting.
    • m_iSculptWidth

      int m_iSculptWidth
      Window width 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_kApplyAllButton

      private JButton m_kApplyAllButton
      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_kUndoSculptButton

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

      private JButton m_kUndoAllButton
    • 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 JInterfaceBase.DrawingPanel scrollPanel
      Scroll panel that holding the all the control components.
    • toolbarBuilder

      private ViewToolBarBuilder toolbarBuilder
      Toolbar builder reference.
  • Constructor Details

    • JPanelSculptor_WM

      public JPanelSculptor_WM(VolumeTriPlanarInterface kVolumeViewer, boolean bIs4D)
      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.
      Parameters:
      e - ActionEvent
    • applySculptRegion

      public void applySculptRegion(boolean bAll)
      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()
      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.
    • init

      public void init(boolean bIs4D)
      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.
      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.
    • getSculptShape

      public int getSculptShape()
    • undoSculptRegion

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

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable