diff options
author | Anthony Balkissoon <abalkiss@redhat.com> | 2005-11-01 18:02:25 +0000 |
---|---|---|
committer | Anthony Balkissoon <abalkiss@redhat.com> | 2005-11-01 18:02:25 +0000 |
commit | 824eeae3f416aa2b2631e45bb2e6abfdaea494ac (patch) | |
tree | 65b5875a9d23fa886511ff707bd64dec24d62f0e | |
parent | 357f2f6b1a3710684ade7a4b99ce9d40d298661c (diff) | |
download | classpath-824eeae3f416aa2b2631e45bb2e6abfdaea494ac.tar.gz |
2005-11-01 Anthony Balkissoon <abalkiss@redhat.com>
* javax/swing/JFileChooser.java:
(getDialogTitle): Allow return of null.
(getApproveButtonText): Likewise.
(getFileView): Likewise.
(getName): First try using the JFileChooser's FileView, if null, then
pass call to UI.
(getDescription): Likewise.
(getTypeDescription): Likewise.
(getIcon): Likewise.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | javax/swing/JFileChooser.java | 43 |
2 files changed, 39 insertions, 16 deletions
@@ -1,5 +1,17 @@ 2005-11-01 Anthony Balkissoon <abalkiss@redhat.com> + * javax/swing/JFileChooser.java: + (getDialogTitle): Allow return of null. + (getApproveButtonText): Likewise. + (getFileView): Likewise. + (getName): First try using the JFileChooser's FileView, if null, then + pass call to UI. + (getDescription): Likewise. + (getTypeDescription): Likewise. + (getIcon): Likewise. + +2005-11-01 Anthony Balkissoon <abalkiss@redhat.com> + * javax/swing/JTable.java: (JTable(TableModel, TableColumnModel, ListSelectionModel)): Set the model before calling initializeLocalVars. diff --git a/javax/swing/JFileChooser.java b/javax/swing/JFileChooser.java index 99aa956ae..1598641f1 100644 --- a/javax/swing/JFileChooser.java +++ b/javax/swing/JFileChooser.java @@ -828,10 +828,7 @@ public class JFileChooser extends JComponent implements Accessible */ public String getDialogTitle() { - if (dialogTitle == null) - return getUI().getDialogTitle(this); - else - return dialogTitle; + return dialogTitle; } /** @@ -942,10 +939,7 @@ public class JFileChooser extends JComponent implements Accessible */ public String getApproveButtonText() { - if (approveButtonText == null) - return getUI().getApproveButtonText(this); - else - return approveButtonText; + return approveButtonText; } /** @@ -1264,10 +1258,7 @@ public class JFileChooser extends JComponent implements Accessible */ public FileView getFileView() { - if (fv == null) - return getUI().getFileView(this); - else - return fv; + return fv; } /** @@ -1280,7 +1271,12 @@ public class JFileChooser extends JComponent implements Accessible */ public String getName(File f) { - return getFileView().getName(f); + String name = null; + if (fv != null) + name = fv.getName(f); + if (name == null) + name = getUI().getFileView(this).getName(f); + return name; } /** @@ -1293,7 +1289,12 @@ public class JFileChooser extends JComponent implements Accessible */ public String getDescription(File f) { - return getFileView().getDescription(f); + String result = null; + if (fv != null) + result = fv.getDescription(f); + if (result == null) + result = getUI().getFileView(this).getDescription(f); + return result; } /** @@ -1306,7 +1307,12 @@ public class JFileChooser extends JComponent implements Accessible */ public String getTypeDescription(File f) { - return getFileView().getTypeDescription(f); + String result = null; + if (fv != null) + result = getFileView().getTypeDescription(f); + if (result == null) + result = getUI().getFileView(this).getTypeDescription(f); + return result; } /** @@ -1318,7 +1324,12 @@ public class JFileChooser extends JComponent implements Accessible */ public Icon getIcon(File f) { - return getFileView().getIcon(f); + Icon result = null; + if (fv != null) + result = fv.getIcon(f); + if (result == null) + result = getUI().getFileView(this).getIcon(f); + return result; } /** |