Class JPanelDisplay_WM

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class JPanelDisplay_WM
    extends JInterfaceBase
    implements javax.swing.event.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:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JDialog

        javax.swing.JDialog.AccessibleJDialog
      • Nested classes/interfaces inherited from class java.awt.Dialog

        java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.JCheckBox boundingCheck
      Check box for turning box on and off.
      private javax.swing.JSlider cameraNearPlane
      Slider for moving the camera near-plane in/out from the eye position.
      private javax.swing.JLabel cameraXLabel
      Camera move parameter labels
      private javax.swing.JLabel cameraXTurnLabel
      Camera turn parameter labels
      private javax.swing.JLabel cameraYLabel
      Camera move parameter labels
      private javax.swing.JLabel cameraYTurnLabel
      Camera turn parameter labels
      private javax.swing.JLabel cameraZLabel
      Camera move parameter labels
      protected javax.swing.JButton colorButton
      Color button for changing color.
      protected javax.swing.JButton colorButtonBackground
      Color button for changing z color.
      protected javax.swing.JPanel cubePanel
      Panel for the rotation cube.
      protected javax.swing.JCheckBox cubicCheck
      Check box for cubic control.
      private boolean flag
      Flag indicating if the red bounding box is on or off.
      private javax.swing.JLabel objectXRotLabel
      Object rotation parameter labels.
      private javax.swing.JLabel objectYRotLabel
      Object rotation parameter labels.
      private javax.swing.JLabel objectZRotLabel
      Object rotation parameter labels.
      private javax.swing.JSlider planeConstantSlider
      Slider to adjust the front clipping plane constant.
      protected javax.swing.ButtonGroup radioButtonGroupProjections
      Button group for projections.
      protected javax.swing.JRadioButton radioButtonOrthographic
      Radio Button for Orthographic rendering.
      protected javax.swing.JRadioButton radioButtonPerspective
      Radio Button for Perspective rendering.
      private javax.swing.JScrollPane scroller
      The scroll pane holding the panel content.
      private JInterfaceBase.DrawingPanel scrollPanel
      Scroll panel that holding the all the control components.
      private static long serialVersionUID
      Use serialVersionUID for interoperability.
      protected java.awt.Font serif12
      Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
      protected java.awt.Font serif12B
      Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
      protected javax.swing.JRadioButton viewAlignedButton
      Radio Button for Perspective rendering.
      protected javax.swing.JRadioButton viewButton
      Radio Button for Orthographic rendering.
      protected javax.swing.ButtonGroup viewTextureButtonGroup
      Button group for projections.
      private float xCameraMove
      Camera move parameter values.
      private javax.swing.JTextField xCameraMoveText
      Camera move parameter text-field.
      private float xCameraTurn
      Camera move parameter values
      private javax.swing.JTextField xCameraTurnText
      Camera move parameter text-field
      private float xObjectRotate
      Object rotation angle parameter values.
      private javax.swing.JTextField xObjectRotateText
      Object rotation parameter text-field.
      private float yCameraMove
      Camera move parameter values.
      private javax.swing.JTextField yCameraMoveText
      Camera move parameter text-field.
      private float yCameraTurn
      Camera move parameter values
      private javax.swing.JTextField yCameraTurnText
      Camera move parameter text-field
      private float yObjectRotate
      Object rotation angle parameter values.
      private javax.swing.JTextField yObjectRotateText
      Object rotation parameter text-field.
      private float zCameraMove
      Camera move parameter values.
      private javax.swing.JTextField zCameraMoveText
      Camera move parameter text-field.
      private float zObjectRotate
      Object rotation angle parameter values.
      private javax.swing.JTextField zObjectRotateText
      Object rotation parameter text-field.
      • Fields inherited from class javax.swing.JDialog

        accessibleContext, rootPane, rootPaneCheckingEnabled
      • Fields inherited from class java.awt.Dialog

        DEFAULT_MODALITY_TYPE
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface javax.swing.WindowConstants

        DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.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.
      void displayCameraParams​(float[] params)
      Display camera related parameters
      void displayObjectParams​(float[] params)
      Display object related parameters
      void disposeLocal()
      Dispose memory.
      java.awt.Color getBackgroundColor()  
      boolean getBoundingBox()  
      java.awt.Color getBoundingBoxColor()  
      boolean getPerspective()  
      boolean getShowOrientationCube()  
      private void init()
      Initializes GUI components.
      void loadParameters()
      Load camera and object viewing parameters.
      void resizePanel​(int panelWidth, int frameHeight)
      Resizing the control panel with ViewJFrameVolumeView's frame width and height.
      void saveParameters()
      Save camera and object viewing parameters.
      void setBackgroundColor​(java.awt.Color c)  
      void setBoundingBox​(boolean value)  
      void setBoundingBoxColor​(java.awt.Color c)  
      void setButtonColor​(javax.swing.JButton _button, java.awt.Color _color)
      Set the color of the button.
      void setPerspective​(boolean value)  
      void setShowOrientationCube​(boolean value)  
      void stateChanged​(javax.swing.event.ChangeEvent arg0)  
      • Methods inherited from class javax.swing.JDialog

        addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • Methods inherited from class java.awt.Dialog

        addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
      • Methods inherited from class java.awt.Window

        addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

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

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

        protected javax.swing.JButton colorButton
        Color button for changing color.
      • colorButtonBackground

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

        protected javax.swing.JPanel cubePanel
        Panel for the rotation cube.
      • cubicCheck

        protected javax.swing.JCheckBox cubicCheck
        Check box for cubic control.
      • radioButtonGroupProjections

        protected javax.swing.ButtonGroup radioButtonGroupProjections
        Button group for projections.
      • radioButtonOrthographic

        protected javax.swing.JRadioButton radioButtonOrthographic
        Radio Button for Orthographic rendering.
      • radioButtonPerspective

        protected javax.swing.JRadioButton radioButtonPerspective
        Radio Button for Perspective rendering.
      • viewAlignedButton

        protected javax.swing.JRadioButton viewAlignedButton
        Radio Button for Perspective rendering.
      • viewButton

        protected javax.swing.JRadioButton viewButton
        Radio Button for Orthographic rendering.
      • viewTextureButtonGroup

        protected javax.swing.ButtonGroup viewTextureButtonGroup
        Button group for projections.
      • serif12

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

        protected java.awt.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 javax.swing.JScrollPane scroller
        The scroll pane holding the panel content. Useful when the screen is small.
      • cameraNearPlane

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

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

        private javax.swing.JLabel cameraXLabel
        Camera move parameter labels
      • cameraYLabel

        private javax.swing.JLabel cameraYLabel
        Camera move parameter labels
      • cameraZLabel

        private javax.swing.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 javax.swing.JTextField xCameraMoveText
        Camera move parameter text-field.
      • yCameraMoveText

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

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

        private javax.swing.JLabel cameraXTurnLabel
        Camera turn parameter labels
      • cameraYTurnLabel

        private javax.swing.JLabel cameraYTurnLabel
        Camera turn parameter labels
      • xCameraTurn

        private float xCameraTurn
        Camera move parameter values
      • yCameraTurn

        private float yCameraTurn
        Camera move parameter values
      • xCameraTurnText

        private javax.swing.JTextField xCameraTurnText
        Camera move parameter text-field
      • yCameraTurnText

        private javax.swing.JTextField yCameraTurnText
        Camera move parameter text-field
      • objectXRotLabel

        private javax.swing.JLabel objectXRotLabel
        Object rotation parameter labels.
      • objectYRotLabel

        private javax.swing.JLabel objectYRotLabel
        Object rotation parameter labels.
      • objectZRotLabel

        private javax.swing.JLabel objectZRotLabel
        Object rotation parameter labels.
      • xObjectRotateText

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

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

        private javax.swing.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 Detail

      • JPanelDisplay_WM

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

      • actionPerformed

        public void actionPerformed​(java.awt.event.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 java.awt.event.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 java.awt.Color getBackgroundColor()
      • setBackgroundColor

        public void setBackgroundColor​(java.awt.Color c)
      • getBoundingBoxColor

        public java.awt.Color getBoundingBoxColor()
      • setBoundingBoxColor

        public void setBoundingBoxColor​(java.awt.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​(javax.swing.JButton _button,
                                   java.awt.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​(javax.swing.event.ChangeEvent arg0)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener