Class SwingFileChooserDialogService

  • All Implemented Interfaces:
    net.sf.jguiraffe.gui.dlg.filechooser.FileChooserDialogService

    public class SwingFileChooserDialogService
    extends Object
    implements net.sf.jguiraffe.gui.dlg.filechooser.FileChooserDialogService

    The Swing-specific implementation of the file chooser dialog service.

    This implementation uses the JFileChooser class of Swing to display dialogs to choose files or directories.

    Since:
    1.4
    • Constructor Detail

      • SwingFileChooserDialogService

        public SwingFileChooserDialogService​(net.sf.jguiraffe.gui.app.ApplicationContext appCtx)
        Creates a new instance of SwingFileChooserDialogService and initializes it with the given application context.
        Parameters:
        appCtx - the application context
    • Method Detail

      • getApplicationContext

        public net.sf.jguiraffe.gui.app.ApplicationContext getApplicationContext()
        Returns the ApplicationContext used by service.
        Returns:
        the ApplicationContext
      • showOpenFileDialog

        public void showOpenFileDialog​(net.sf.jguiraffe.gui.dlg.filechooser.FileChooserOptions options)
        Specified by:
        showOpenFileDialog in interface net.sf.jguiraffe.gui.dlg.filechooser.FileChooserDialogService
      • showOpenMultiFileDialog

        public void showOpenMultiFileDialog​(net.sf.jguiraffe.gui.dlg.filechooser.MultiFileChooserOptions options)
        Specified by:
        showOpenMultiFileDialog in interface net.sf.jguiraffe.gui.dlg.filechooser.FileChooserDialogService
      • showSaveFileDialog

        public void showSaveFileDialog​(net.sf.jguiraffe.gui.dlg.filechooser.FileChooserOptions options)
        Specified by:
        showSaveFileDialog in interface net.sf.jguiraffe.gui.dlg.filechooser.FileChooserDialogService
      • showChooseDirectoryDialog

        public void showChooseDirectoryDialog​(net.sf.jguiraffe.gui.dlg.filechooser.DirectoryChooserOptions options)
        Specified by:
        showChooseDirectoryDialog in interface net.sf.jguiraffe.gui.dlg.filechooser.FileChooserDialogService
      • createFileChooser

        protected JFileChooser createFileChooser()
        Creates the JFileChooser object that is used to display the dialogs constructed by this class.
        Returns:
        the JFileChooser