< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java

Print this page
rev 14722 : imported patch 8153362


 906     public String getDirectoryName() {
 907         // PENDING(jeff) - get the name from the directory combobox
 908         return null;
 909     }
 910 
 911     /**
 912      * Sets the directory name.
 913      *
 914      * @param dirname the directory name
 915      */
 916     public void setDirectoryName(String dirname) {
 917         // PENDING(jeff) - set the name in the directory combobox
 918     }
 919 
 920     /**
 921      * Constructs a new instance of {@code DirectoryComboBoxRenderer}.
 922      *
 923      * @param fc a {@code JFileChooser}
 924      * @return a new instance of {@code DirectoryComboBoxRenderer}
 925      */

 926     protected DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc) {
 927         return new DirectoryComboBoxRenderer();
 928     }
 929 
 930     //
 931     // Renderer for DirectoryComboBox
 932     //
 933     @SuppressWarnings("serial") // Superclass is not serializable across versions
 934     class DirectoryComboBoxRenderer extends DefaultListCellRenderer  {
 935         IndentIcon ii = new IndentIcon();
 936         public Component getListCellRendererComponent(JList<?> list, Object value,
 937                                                       int index, boolean isSelected,
 938                                                       boolean cellHasFocus) {
 939 
 940             super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
 941 
 942             if (value == null) {
 943                 setText("");
 944                 return this;
 945             }




 906     public String getDirectoryName() {
 907         // PENDING(jeff) - get the name from the directory combobox
 908         return null;
 909     }
 910 
 911     /**
 912      * Sets the directory name.
 913      *
 914      * @param dirname the directory name
 915      */
 916     public void setDirectoryName(String dirname) {
 917         // PENDING(jeff) - set the name in the directory combobox
 918     }
 919 
 920     /**
 921      * Constructs a new instance of {@code DirectoryComboBoxRenderer}.
 922      *
 923      * @param fc a {@code JFileChooser}
 924      * @return a new instance of {@code DirectoryComboBoxRenderer}
 925      */
 926      @SuppressWarnings("unexportedinapi")
 927      protected DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc) {
 928         return new DirectoryComboBoxRenderer();
 929     }
 930 
 931     //
 932     // Renderer for DirectoryComboBox
 933     //
 934     @SuppressWarnings("serial") // Superclass is not serializable across versions
 935     class DirectoryComboBoxRenderer extends DefaultListCellRenderer  {
 936         IndentIcon ii = new IndentIcon();
 937         public Component getListCellRendererComponent(JList<?> list, Object value,
 938                                                       int index, boolean isSelected,
 939                                                       boolean cellHasFocus) {
 940 
 941             super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
 942 
 943             if (value == null) {
 944                 setText("");
 945                 return this;
 946             }


< prev index next >