Class JPanelDisplay

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

public class JPanelDisplay extends JPanelRendererJ3D implements KeyListener
The display panel control the red bounding box frame ( on/off ), texture aligned rendering mode, cubic controk, perspective and parrallel 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.
    • colorChooser

      protected ViewJColorChooser colorChooser
      Color chooser dialog.
    • 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.
    • coarseValue

      private float coarseValue
      Coarse and fine value.
    • fineValue

      private float fineValue
      Coarse and fine value.
    • fine

      private JTextField fine
      Coarse and fine value text field.
    • coarse

      private JTextField coarse
      Coarse and fine value text field.
    • fineLabel

      private JLabel fineLabel
      Coarse and fine value label.
    • coarseLabel

      private JLabel coarseLabel
      Coarse and fine value label.
    • 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 JPanelDisplay.DrawingPanel scrollPanel
      Scroll panel that holding the all the control components.
  • Constructor Details

    • JPanelDisplay

      public JPanelDisplay(RenderViewBase parent)
      Creates new dialog for turning bounding box frame on and off.
      Parameters:
      parent - Should be of type ViewJFrameSurfaceRenderer
  • 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
      Specified by:
      actionPerformed in class JPanelRendererBase
      Parameters:
      event - Event that triggered function.
    • dispose

      public void dispose()
      Dispose memory.
    • getCoarseVal

      public float getCoarseVal()
      Get the coarse value.
      Returns:
      float coarse value.
    • getFineVal

      public float getFineVal()
      Get the fine value.
      Returns:
      float fine value.
    • getMainPanel

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

      public void keyPressed(KeyEvent e)
      Unchanged.
      Specified by:
      keyPressed in interface KeyListener
      Overrides:
      keyPressed in class JPanelRendererBase
      Parameters:
      e - DOCUMENT ME!
    • keyReleased

      public void keyReleased(KeyEvent e)
      Unchanged.
      Specified by:
      keyReleased in interface KeyListener
      Overrides:
      keyReleased in class JPanelRendererBase
      Parameters:
      e - DOCUMENT ME!
    • keyTyped

      public void keyTyped(KeyEvent evt)
      When the user enter the coarse and fine value, invoke this event to update fine or coarse sampling.
      Specified by:
      keyTyped in interface KeyListener
      Overrides:
      keyTyped in class JPanelRendererBase
      Parameters:
      evt - key event
    • 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 - int width
      frameHeight - int height
    • setColorButton

      public void setColorButton(Color _color)
      Set the color for the color button.
      Parameters:
      _color - Color
    • setEnable

      public void setEnable(boolean flag)
      Set the radio button for view volume aligned enable or not.
      Parameters:
      flag - true enable and false disable.
    • setTextEnabled

      public void setTextEnabled(boolean flag)
      Enable the the fine or coarse labels and text fields with given flag value.
      Parameters:
      flag - true enable, false disable.
    • setBoxColor

      protected void setBoxColor(JButton button, Color color)
      Calls the appropriate method in the parent frame.
      Parameters:
      button - DOCUMENT ME!
      color - Color to set box frame to.
    • init

      private void init()
      Initializes GUI components.