< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java

Print this page




 749         }
 750     }
 751 
 752     /**
 753      * A selection listener.
 754      */
 755     protected class SelectionListener implements ListSelectionListener {
 756         // NOTE: This class exists only for backward compatibility. All
 757         // its functionality has been moved into Handler. If you need to add
 758         // new functionality add it to the Handler, but make sure this
 759         // class calls into the Handler.
 760         /** {@inheritDoc} */
 761         public void valueChanged(ListSelectionEvent e) {
 762             getHandler().valueChanged(e);
 763         }
 764     }
 765 
 766     /**
 767      * Property to remember whether a directory is currently selected in the UI.
 768      *
 769      * @return <code>true</code> iff a directory is currently selected.
 770      * @since 1.4
 771      */
 772     protected boolean isDirectorySelected() {
 773         return directorySelected;
 774     }
 775 
 776     /**
 777      * Property to remember whether a directory is currently selected in the UI.
 778      * This is normally called by the UI on a selection event.
 779      *
 780      * @param b iff a directory is currently selected.
 781      * @since 1.4
 782      */
 783     protected void setDirectorySelected(boolean b) {
 784         directorySelected = b;
 785     }
 786 
 787     /**
 788      * Property to remember the directory that is currently selected in the UI.
 789      *
 790      * @return the value of the <code>directory</code> property
 791      * @see #setDirectory
 792      * @since 1.4
 793      */
 794     protected File getDirectory() {
 795         return directory;
 796     }
 797 
 798     /**
 799      * Property to remember the directory that is currently selected in the UI.
 800      * This is normally called by the UI on a selection event.
 801      *
 802      * @param f the <code>File</code> object representing the directory that is
 803      *          currently selected
 804      * @since 1.4
 805      */
 806     protected void setDirectory(File f) {
 807         directory = f;
 808     }
 809 
 810     /**
 811      * Returns the mnemonic for the given key.
 812      */
 813     private int getMnemonic(String key, Locale l) {
 814         return SwingUtilities2.getUIDefaultsInt(key, l);
 815     }
 816 
 817     // *******************************************************
 818     // ************ FileChooser UI PLAF methods **************
 819     // *******************************************************
 820 
 821     /**
 822      * Returns the default accept all file filter




 749         }
 750     }
 751 
 752     /**
 753      * A selection listener.
 754      */
 755     protected class SelectionListener implements ListSelectionListener {
 756         // NOTE: This class exists only for backward compatibility. All
 757         // its functionality has been moved into Handler. If you need to add
 758         // new functionality add it to the Handler, but make sure this
 759         // class calls into the Handler.
 760         /** {@inheritDoc} */
 761         public void valueChanged(ListSelectionEvent e) {
 762             getHandler().valueChanged(e);
 763         }
 764     }
 765 
 766     /**
 767      * Property to remember whether a directory is currently selected in the UI.
 768      *
 769      * @return {@code true} iff a directory is currently selected.
 770      * @since 1.4
 771      */
 772     protected boolean isDirectorySelected() {
 773         return directorySelected;
 774     }
 775 
 776     /**
 777      * Property to remember whether a directory is currently selected in the UI.
 778      * This is normally called by the UI on a selection event.
 779      *
 780      * @param b iff a directory is currently selected.
 781      * @since 1.4
 782      */
 783     protected void setDirectorySelected(boolean b) {
 784         directorySelected = b;
 785     }
 786 
 787     /**
 788      * Property to remember the directory that is currently selected in the UI.
 789      *
 790      * @return the value of the {@code directory} property
 791      * @see #setDirectory
 792      * @since 1.4
 793      */
 794     protected File getDirectory() {
 795         return directory;
 796     }
 797 
 798     /**
 799      * Property to remember the directory that is currently selected in the UI.
 800      * This is normally called by the UI on a selection event.
 801      *
 802      * @param f the {@code File} object representing the directory that is
 803      *          currently selected
 804      * @since 1.4
 805      */
 806     protected void setDirectory(File f) {
 807         directory = f;
 808     }
 809 
 810     /**
 811      * Returns the mnemonic for the given key.
 812      */
 813     private int getMnemonic(String key, Locale l) {
 814         return SwingUtilities2.getUIDefaultsInt(key, l);
 815     }
 816 
 817     // *******************************************************
 818     // ************ FileChooser UI PLAF methods **************
 819     // *******************************************************
 820 
 821     /**
 822      * Returns the default accept all file filter


< prev index next >