home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.metal;
-
- import java.awt.Component;
- import java.io.File;
- import javax.swing.DefaultListCellRenderer;
- import javax.swing.Icon;
- import javax.swing.JLabel;
- import javax.swing.JList;
-
- class MetalFileChooserUI$DirectoryComboBoxRenderer extends DefaultListCellRenderer {
- // $FF: renamed from: ii javax.swing.plaf.metal.MetalFileChooserUI.IndentIcon
- MetalFileChooserUI.IndentIcon field_0;
- // $FF: synthetic field
- private final MetalFileChooserUI this$0;
-
- MetalFileChooserUI$DirectoryComboBoxRenderer(MetalFileChooserUI var1) {
- this.this$0 = var1;
- this.field_0 = new MetalFileChooserUI.IndentIcon(this.this$0);
- }
-
- public Component getListCellRendererComponent(JList var1, Object var2, int var3, boolean var4, boolean var5) {
- super.getListCellRendererComponent(var1, var2, var3, var4, var5);
- File var6 = (File)var2;
- if (var6 == null) {
- ((JLabel)this).setText("");
- return this;
- } else {
- ((JLabel)this).setText(this.this$0.getFileChooser().getName(var6));
- int var7 = 0;
- if (var3 != -1) {
- for(File var8 = var6; var8.getParent() != null; var8 = this.this$0.getFileChooser().getFileSystemView().createFileObject(var8.getParent())) {
- ++var7;
- }
- }
-
- Icon var9 = this.this$0.getFileChooser().getIcon(var6);
- this.field_0.icon = var9;
- this.field_0.depth = var7;
- ((JLabel)this).setIcon(this.field_0);
- return this;
- }
- }
- }
-