Class JPanelDisplay_WM

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

public class JPanelDisplay_WM extends JInterfaceBase implements ChangeListener
The display panel control the red bounding box frame ( on/off ), texture aligned rendering mode, cubic controk, perspective and parallel viewing mode, and back ground color.
See Also:
  • Field Details

    • serialVersionUID

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

      protected JCheckBox boundingCheck
      Check box for turning box on and off.
    • colorButton

      protected JButton colorButton
      Color button for changing color.
    • colorButtonBackground

      protected JButton colorButtonBackground
      Color button for changing z color.
    • cubePanel

      protected JPanel cubePanel
      Panel for the rotation cube.
    • cubicCheck

      protected JCheckBox cubicCheck
      Check box for cubic control.
    • radioButtonGroupProjections

      protected ButtonGroup radioButtonGroupProjections
      Button group for projections.
    • radioButtonOrthographic

      protected JRadioButton radioButtonOrthographic
      Radio Button for Orthographic rendering.
    • radioButtonPerspective

      protected JRadioButton radioButtonPerspective
      Radio Button for Perspective rendering.
    • viewAlignedButton

      protected JRadioButton viewAlignedButton
      Radio Button for Perspective rendering.
    • viewButton

      protected JRadioButton viewButton
      Radio Button for Orthographic rendering.
    • viewTextureButtonGroup

      protected ButtonGroup viewTextureButtonGroup
      Button group for projections.
    • serif12

      protected Font serif12
      Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
    • serif12B

      protected Font serif12B
      Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
    • flag

      private boolean flag
      Flag indicating if the red bounding box is on or off.
    • 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.
    • cameraNearPlane

      private JSlider cameraNearPlane
      Slider for moving the camera near-plane in/out from the eye position.
    • planeConstantSlider

      private JSlider planeConstantSlider
      Slider to adjust the front clipping plane constant.
    • cameraXLabel

      private JLabel cameraXLabel
      Camera move parameter labels
    • cameraYLabel

      private JLabel cameraYLabel
      Camera move parameter labels
    • cameraZLabel

      private JLabel cameraZLabel
      Camera move parameter labels
    • xCameraMove

      private float xCameraMove
      Camera move parameter values.
    • yCameraMove

      private float yCameraMove
      Camera move parameter values.
    • zCameraMove

      private float zCameraMove
      Camera move parameter values.
    • xCameraMoveText

      private JTextField xCameraMoveText
      Camera move parameter text-field.
    • yCameraMoveText

      private JTextField yCameraMoveText
      Camera move parameter text-field.
    • zCameraMoveText

      private JTextField zCameraMoveText
      Camera move parameter text-field.
    • cameraXTurnLabel

      private JLabel cameraXTurnLabel
      Camera turn parameter labels
    • cameraYTurnLabel

      private JLabel cameraYTurnLabel
      Camera turn parameter labels
    • xCameraTurn

      private float xCameraTurn
      Camera move parameter values
    • yCameraTurn

      private float yCameraTurn
      Camera move parameter values
    • xCameraTurnText

      private JTextField xCameraTurnText
      Camera move parameter text-field
    • yCameraTurnText

      private JTextField yCameraTurnText
      Camera move parameter text-field
    • objectXRotLabel

      private JLabel objectXRotLabel
      Object rotation parameter labels.
    • objectYRotLabel

      private JLabel objectYRotLabel
      Object rotation parameter labels.
    • objectZRotLabel

      private JLabel objectZRotLabel
      Object rotation parameter labels.
    • xObjectRotateText

      private JTextField xObjectRotateText
      Object rotation parameter text-field.
    • yObjectRotateText

      private JTextField yObjectRotateText
      Object rotation parameter text-field.
    • zObjectRotateText

      private JTextField zObjectRotateText
      Object rotation parameter text-field.
    • xObjectRotate

      private float xObjectRotate
      Object rotation angle parameter values.
    • yObjectRotate

      private float yObjectRotate
      Object rotation angle parameter values.
    • zObjectRotate

      private float zObjectRotate
      Object rotation angle parameter values.
  • Constructor Details

    • JPanelDisplay_WM

      public JPanelDisplay_WM(VolumeTriPlanarInterface parent)
      Creates new dialog for turning bounding box frame on and off.
      Parameters:
      parent - parent frame.
  • Method Details

    • actionPerformed

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

      public void displayCameraParams(float[] params)
      Display camera related parameters
      Parameters:
      params -
    • displayObjectParams

      public void displayObjectParams(float[] params)
      Display object related parameters
      Parameters:
      params -
    • disposeLocal

      public void disposeLocal()
      Dispose memory.
    • loadParameters

      public void loadParameters()
      Load camera and object viewing parameters.
    • resizePanel

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

      public void saveParameters()
      Save camera and object viewing parameters.
    • getBackgroundColor

      public Color getBackgroundColor()
    • setBackgroundColor

      public void setBackgroundColor(Color c)
    • getBoundingBoxColor

      public Color getBoundingBoxColor()
    • setBoundingBoxColor

      public void setBoundingBoxColor(Color c)
    • getBoundingBox

      public boolean getBoundingBox()
    • setBoundingBox

      public void setBoundingBox(boolean value)
    • getShowOrientationCube

      public boolean getShowOrientationCube()
    • setShowOrientationCube

      public void setShowOrientationCube(boolean value)
    • getPerspective

      public boolean getPerspective()
    • setPerspective

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

      private void init()
      Initializes GUI components.
    • stateChanged

      public void stateChanged(ChangeEvent arg0)
      Specified by:
      stateChanged in interface ChangeListener