Class J3DPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class J3DPanel extends JPanel
The J3DPanel class extends JPanel and serves as the main drawing surface for the 3D engine. It overrides the `paint` method to handle rendering of 3D objects, axes, and selection UI.
See Also:
  • Field Details

  • Constructor Details

    • J3DPanel

      public J3DPanel()
  • Method Details

    • applySelectionAreaOffset

      public ScreenPoint[] applySelectionAreaOffset(ScreenPoint[] sA)
      Applies the JMenuBar offset to the selection square so it line sup with the mouse cursor. Also adheres to the fact that a selection may have not previously changed by storing it statically.
      Parameters:
      sA - The selection area
      Returns:
      The new adjusted selection area
    • registerRunnable

      public void registerRunnable(Runnable runnable)
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class JComponent
    • exportAs

      public void exportAs(String extension, File file) throws Exception
      Exports the current panel view as an image file of the specified type.
      Parameters:
      extension - The extension of the image file to be exported.
      file - The file to which the image will be exported.
      Throws:
      Exception - If an error occurs during the export process.