Package com.jme3.awt

Class AWTSettingsDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public final class AWTSettingsDialog extends JFrame
SettingsDialog displays a Swing dialog box to interactively configure the AppSettings of a desktop application before start() is invoked. The AppSettings instance to be configured is passed to the constructor.
Author:
Mark Powell, Eric Woroshow, Joshua Slack - reworked for proper use of GL commands.
See Also:
  • Field Details

  • Constructor Details

    • AWTSettingsDialog

      protected AWTSettingsDialog(com.jme3.system.AppSettings source, String imageFile, boolean loadSettings)
      Instantiate a SettingsDialog for the primary display.
      Parameters:
      source - the AppSettings (not null)
      imageFile - the image file to use as the title of the dialog; null will result in to image being displayed
      loadSettings - if true, copy the settings, otherwise merge them
      Throws:
      IllegalArgumentException - if the source is null
    • AWTSettingsDialog

      protected AWTSettingsDialog(com.jme3.system.AppSettings source, URL imageFile, boolean loadSettings)
      /** Instantiate a SettingsDialog for the primary display.
      Parameters:
      source - the AppSettings object (not null)
      imageFile - the image file to use as the title of the dialog; null will result in to image being displayed
      loadSettings - if true, copy the settings, otherwise merge them
      Throws:
      IllegalArgumentException - if the source is null
  • Method Details

    • showDialog

      public static boolean showDialog(com.jme3.system.AppSettings sourceSettings)
    • showDialog

      public static boolean showDialog(com.jme3.system.AppSettings sourceSettings, boolean loadSettings)
    • showDialog

      public static boolean showDialog(com.jme3.system.AppSettings sourceSettings, String imageFile, boolean loadSettings)
    • showDialog

      public static boolean showDialog(com.jme3.system.AppSettings sourceSettings, URL imageFile, boolean loadSettings)
    • setSelectionListener

      public void setSelectionListener(AWTSettingsDialog.SelectionListener sl)
    • getUserSelection

      public int getUserSelection()
    • getMinWidth

      public int getMinWidth()
    • setMinWidth

      public void setMinWidth(int minWidth)
    • getMinHeight

      public int getMinHeight()
    • setMinHeight

      public void setMinHeight(int minHeight)
    • setImage

      public void setImage(String image)
      setImage sets the background image of the dialog.
      Parameters:
      image - String representing the image file.
    • setImage

      public void setImage(URL image)
      setImage sets the background image of this dialog.
      Parameters:
      image - URL pointing to the image file.
    • showDialog

      public void showDialog()
      showDialog sets this dialog as visible, and brings it to the front.