src/share/classes/javax/swing/JFileChooser.java

Print this page
rev 10121 : 8046485: Add missing @since tag under javax.swing.*
Reviewed-by:


  69  *    FileNameExtensionFilter filter = new FileNameExtensionFilter(
  70  *        "JPG & GIF Images", "jpg", "gif");
  71  *    chooser.setFileFilter(filter);
  72  *    int returnVal = chooser.showOpenDialog(parent);
  73  *    if(returnVal == JFileChooser.APPROVE_OPTION) {
  74  *       System.out.println("You chose to open this file: " +
  75  *            chooser.getSelectedFile().getName());
  76  *    }
  77  * </pre>
  78  * <p>
  79  * <strong>Warning:</strong> Swing is not thread safe. For more
  80  * information see <a
  81  * href="package-summary.html#threading">Swing's Threading
  82  * Policy</a>.
  83  *
  84  * @beaninfo
  85  *   attribute: isContainer false
  86  * description: A component which allows for the interactive selection of a file.
  87  *
  88  * @author Jeff Dinkins
  89  *
  90  */
  91 @SuppressWarnings("serial") // Superclass is not serializable across versions
  92 public class JFileChooser extends JComponent implements Accessible {
  93 
  94     /**
  95      * @see #getUIClassID
  96      * @see #readObject
  97      */
  98     private static final String uiClassID = "FileChooserUI";
  99 
 100     // ************************
 101     // ***** Dialog Types *****
 102     // ************************
 103 
 104     /**
 105      * Type value indicating that the <code>JFileChooser</code> supports an
 106      * "Open" file operation.
 107      */
 108     public static final int OPEN_DIALOG = 0;
 109 




  69  *    FileNameExtensionFilter filter = new FileNameExtensionFilter(
  70  *        "JPG &amp; GIF Images", "jpg", "gif");
  71  *    chooser.setFileFilter(filter);
  72  *    int returnVal = chooser.showOpenDialog(parent);
  73  *    if(returnVal == JFileChooser.APPROVE_OPTION) {
  74  *       System.out.println("You chose to open this file: " +
  75  *            chooser.getSelectedFile().getName());
  76  *    }
  77  * </pre>
  78  * <p>
  79  * <strong>Warning:</strong> Swing is not thread safe. For more
  80  * information see <a
  81  * href="package-summary.html#threading">Swing's Threading
  82  * Policy</a>.
  83  *
  84  * @beaninfo
  85  *   attribute: isContainer false
  86  * description: A component which allows for the interactive selection of a file.
  87  *
  88  * @author Jeff Dinkins
  89  * @since 1.2
  90  */
  91 @SuppressWarnings("serial") // Superclass is not serializable across versions
  92 public class JFileChooser extends JComponent implements Accessible {
  93 
  94     /**
  95      * @see #getUIClassID
  96      * @see #readObject
  97      */
  98     private static final String uiClassID = "FileChooserUI";
  99 
 100     // ************************
 101     // ***** Dialog Types *****
 102     // ************************
 103 
 104     /**
 105      * Type value indicating that the <code>JFileChooser</code> supports an
 106      * "Open" file operation.
 107      */
 108     public static final int OPEN_DIALOG = 0;
 109