Class DisplayPanel3D

All Implemented Interfaces:
MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class DisplayPanel3D
extends JPanel
implements MouseListener
A panel for displaying 3D content, with a toolbar and popup menu to control the view.

NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
See Also:
Serialized Form
  • Constructor Details

    • DisplayPanel3D

      public DisplayPanel3D​(Panel3D content)
      Creates a new display panel for the given content, with a toolbar and popup menu configured.
      Parameters:
      content - the content (null not permitted).
    • DisplayPanel3D

      public DisplayPanel3D​(Panel3D content, boolean toolbar, boolean popupMenu)
      Creates a new display panel.
      Parameters:
      content - the content (null not permitted).
      toolbar - toolbar?
      popupMenu - popup menu?
  • Method Details

    • getFontAwesomeFont

      public static Font getFontAwesomeFont​(int size)
      Returns a font for "Font Awesome" (http://fontawesome.io) at the specified size.
      Parameters:
      size - the point size.
      Returns:
      A font.
    • getContent

      public Panel3D getContent()
      Returns a reference to the content panel.
      Returns:
      A reference to the content panel.
    • setExportFormats

      public void setExportFormats​(ExportFormat... formats)
      Sets the list of export formats that will be shown in the popup menu. If you provide an empty list, there will be no export submenu in the popup menu.
      Parameters:
      formats - the list of formats (null not permitted).
      Since:
      1.2
    • mouseClicked

      public void mouseClicked​(MouseEvent e)
      This method does nothing.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      e - the mouse event.
    • mousePressed

      public void mousePressed​(MouseEvent e)
      Checks if the popup is triggered in which case it is displayed.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      e - the mouse event.
    • mouseReleased

      public void mouseReleased​(MouseEvent e)
      Checks if the popup is triggered in which case it is displayed.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - the mouse event.
    • mouseEntered

      public void mouseEntered​(MouseEvent e)
      This method does nothing.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - the mouse event.
    • mouseExited

      public void mouseExited​(MouseEvent e)
      This method does nothing.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - the mouse event.