Re: Sorting JFileChooser
- From: "jozeph78" <joseph.hirn@xxxxxxxxx>
- Date: 14 Feb 2006 07:30:05 -0800
Andrey, you are correct! Only instead of override it to do nothing, I
have it do my special sort and then leave FileSystemView alone. It's
funny how many threads on this issue point people towards that class
but all sorting done on the getFiles method is completely redone in the
BasicDirectoryModel. What I am trying to override the sort method, but
it's not easy.
here are my steps. I'll post if it works.
1. Extend BasicDirectoryModel to CustomSortBasicDirectoryModel and
override sort(Vector v) to get the sorting I desire.
2. Extend BasicFileChooserUI to CustomSortBasicFileChooserUI and
override getModel() to return CustomSortBasicFileModel.
3. Call setUI(myCustomSortBasicFileChooserUI) in the
JFileChooserDialog. Hopefully the UpdateUI method isn't called
indirectly on the JFileChooser or else I'll have to extend and override
that method also.
..... Swing is a pain in my ass. I will post if it works.
.
- Follow-Ups:
- Re: Sorting JFileChooser
- From: jozeph78
- Re: Sorting JFileChooser
- From: Roedy Green
- Re: Sorting JFileChooser
- References:
- Sorting JFileChooser
- From: jozeph78
- Re: Sorting JFileChooser
- From: Roedy Green
- Re: Sorting JFileChooser
- From: jozeph78
- Re: Sorting JFileChooser
- From: jozeph78
- Re: Sorting JFileChooser
- From: Andrey Kuznetsov
- Re: Sorting JFileChooser
- From: Andrey Kuznetsov
- Re: Sorting JFileChooser
- From: Andrey Kuznetsov
- Sorting JFileChooser
- Prev by Date: Re: JOptionPane.showConfirmDialog, getting rid of hotkeys or changing them..
- Next by Date: Re: Customizing a Cell in a JTable
- Previous by thread: Re: Sorting JFileChooser
- Next by thread: Re: Sorting JFileChooser
- Index(es):
Relevant Pages
|