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

public class JPanelClip_WM extends JInterfaceBase implements ChangeListener
See Also:
  • Field Details

    • serialVersionUID

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

      public static final int CLIP_X
      See Also:
    • CLIP_X_INV

      public static final int CLIP_X_INV
      See Also:
    • CLIP_Y

      public static final int CLIP_Y
      See Also:
    • CLIP_Y_INV

      public static final int CLIP_Y_INV
      See Also:
    • CLIP_Z

      public static final int CLIP_Z
      See Also:
    • CLIP_Z_INV

      public static final int CLIP_Z_INV
      See Also:
    • CLIP_EYE

      public static final int CLIP_EYE
      See Also:
    • CLIP_EYE_INV

      public static final int CLIP_EYE_INV
      See Also:
    • CLIP_A

      public static final int CLIP_A
      See Also:
    • MAX_CLIP_PLANES

      public static final int MAX_CLIP_PLANES
      See Also:
    • clipValue

      private int[] clipValue
    • enableClip

      private JCheckBox[] enableClip
    • displayClip

      private JCheckBox[] displayClip
    • clipSlider

      private JSlider[] clipSlider
    • clipColor

      private JButton[] clipColor
    • thicknessSlider

      private JSlider thicknessSlider
    • extract

      private JButton[] extract
    • clipPanel

      private JPanel[] clipPanel
    • clipText

      private JTextField[] clipText
    • clipLabel

      private JLabel[] clipLabel
    • labelStart

      private JLabel[] labelStart
    • labelMid

      private JLabel[] labelMid
    • labelEnd

      private JLabel[] labelEnd
    • scroller

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

      private JPanel scrollPanel
      Scroll panel that holding all the control components.
    • tabbedPane

      private JTabbedPane tabbedPane
      Tabbed Panel that hold the each clipping planes control box.
  • Constructor Details

    • JPanelClip_WM

      public JPanelClip_WM(VolumeTriPlanarInterface kVolumeViewer)
      3D clipping dialog control.
      Parameters:
      kVolumeViewer - parent frame.
    • JPanelClip_WM

      public JPanelClip_WM(VolumeTriPlanarRender rayBasedRenderWM)
      3D clipping dialog control.
      Parameters:
      kVolumeViewer - parent frame.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Changes color of slices box frame and button if color button was pressed; turns bounding box on and off if checkbox was pressed.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - Event that triggered function.
    • buildPanel

      public void buildPanel(int i, String kName, int iMax, Color kColor)
      Build x slider control panel.
    • disable6Planes

      public void disable6Planes()
      Disable the 6 clipping planes.
    • enableListeners

      private void enableListeners(boolean listen)
    • disableClipA

      public void disableClipA()
      Disable the arbitrary clipping.
    • disableClipPlanes

      public void disableClipPlanes()
      Disable clipping planes when dialog window closed.
    • disableClipPlanesArbi

      public void disableClipPlanesArbi()
      Disable arbitrary clipping planes.
    • displayClip

      private void displayClip(int i)
    • enableClip

      private void enableClip(int i)
    • disposeLocal

      public void disposeLocal()
      Dispose memory.
    • getClipEnabled

      public boolean[] getClipEnabled()
    • setClipEnabled

      public void setClipEnabled(boolean[] abEnabled)
    • getClipDisplayed

      public boolean[] getClipDisplayed()
    • setClipDisplayed

      public void setClipDisplayed(boolean[] abDisplayed)
    • getClipValues

      public int[] getClipValues()
    • setClipValues

      public void setClipValues(int[] newValues)
    • getClipColors

      public Color[] getClipColors()
    • setClipColors

      public void setClipColors(Color[] akColors)
    • getAVisible

      public boolean getAVisible()
      Return check box arbitrary selection value.
      Returns:
      boxA.isSelected() box arbitrary selection value.
    • init

      public void init()
      Initializes GUI components.
    • invokeClippingPlanes

      public void invokeClippingPlanes()
      Invokes all the 6 clipping when 6 clipping checkbox is checked.
    • resizePanel

      public void resizePanel(int panelWidth, int frameHeight)
      Resizig the control panel with ViewJFrameVolumeView's frame width and height.
      Parameters:
      panelWidth - panel width
      frameHeight - parent frame height.
    • setClipColor

      public void setClipColor(int i, Color color)
      Parameters:
      i - index.
      color - new color.
    • setRenderer

      public void setRenderer(VolumeTriPlanarRender rayBasedRenderWM)
    • setRenderer

      public void setRenderer(VolumeTriPlanarRender rayBasedRenderWM, boolean rebuild)
    • setSliderEnabled

      public void setSliderEnabled(int i, boolean flag)
      Sets the x slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Sets how the image plane should be displayed depending on value of slider.
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      e - Event that triggered this function.
    • windowClosing

      public void windowClosing(WindowEvent e)
      Closing the mouse recorder window frame.
      Parameters:
      e - Window event.
    • setButtonColor

      public void setButtonColor(JButton _button, Color _color)
      Description copied from class: JInterfaceBase
      Set the color of the button. Derived classes may also perform other functions.
      Overrides:
      setButtonColor in class JInterfaceBase
      Parameters:
      _button - button.
      _color - color.
    • addControlPanel

      private void addControlPanel(JPanel panel, Component c, GridBagConstraints gbc, int x, int y, int w, int h)
      Helper method that adds components to the control panel for the grid bag layout.
      Parameters:
      panel - control panel.
      c - Component added to the control panel.
      gbc - GridBagConstraints of added component.
      x - Gridx location
      y - Gridy location
      w - Gridwidth
      h - Gridheight