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

public class URIChooser extends JDialog implements ActionMap
This class is a dialog used to enter an URI or to choose a local file.
See Also:
  • Field Details

    • OK_OPTION

      public static final int OK_OPTION
      The return value if 'OK' is chosen.
      See Also:
    • CANCEL_OPTION

      public static final int CANCEL_OPTION
      The return value if 'Cancel' is chosen.
      See Also:
    • RESOURCES

      protected static final String RESOURCES
      The resource file name
      See Also:
    • bundle

      protected static ResourceBundle bundle
      The resource bundle
    • resources

      protected static ResourceManager resources
      The resource manager
    • buttonFactory

      protected ButtonFactory buttonFactory
      The button factory
    • textField

      protected JTextField textField
      The text field
    • okButton

      protected JButton okButton
      The OK button
    • clearButton

      protected JButton clearButton
      The Clear button
    • currentPath

      protected String currentPath
      The current path.
    • fileFilter

      protected FileFilter fileFilter
      The file filter.
    • returnCode

      protected int returnCode
      The last return code.
    • chosenPath

      protected String chosenPath
      The last chosen path.
    • listeners

      protected Map<String,AbstractAction> listeners
      The map that contains the listeners
  • Constructor Details

    • URIChooser

      public URIChooser(JDialog d)
      Creates a new URIChooser.
      Parameters:
      d - the parent dialog
    • URIChooser

      public URIChooser(JFrame f)
      Creates a new URIChooser.
      Parameters:
      f - the parent frame
  • Method Details

    • showDialog

      public int showDialog()
      Shows the dialog.
      Returns:
      OK_OPTION or CANCEL_OPTION.
    • getText

      public String getText()
      Returns the text entered by the user.
    • setFileFilter

      public void setFileFilter(FileFilter ff)
      Sets the file filter to use with the file selector.
    • initialize

      protected void initialize()
      Initializes the dialog
    • createURISelectionPanel

      protected JPanel createURISelectionPanel()
      Creates the URI selection panel
    • createButtonsPanel

      protected JPanel createButtonsPanel()
      Creates the buttons panel
    • updateOKButtonAction

      protected void updateOKButtonAction()
      To update the state of the OK button
    • updateClearButtonAction

      protected void updateClearButtonAction()
      To update the state of the Clear button
    • getAction

      public Action getAction(String key) throws MissingListenerException
      Returns the action associated with the given string or null on error
      Specified by:
      getAction in interface ActionMap
      Parameters:
      key - the key mapped with the action to get
      Throws:
      MissingListenerException - if the action is not found