JDK-4260730 : MetalFileChooserUI can't override private createSingleClickListener
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-08-07
  • Updated: 2003-07-22
  • Resolved: 2003-07-22
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 08/07/99


I want to extend the behavior of the single click
listener so that i can programatically disable the rename
capability. 
The inner class SingleClickListener is protected
and so in a class that extends MetalFileChooserUI i can do
    protected myListener extends SingleClickListener {...}
however to get my listener installed, i need to override
    createSingleClickListener
but this is private and so i can not override it.
createSingleClickListener should be protected.

One idea is to override createList(), but it needs to set the
instance variable "list" which is private. So this can not
be done either. Changing installComponents() which invokes
createList() is not practical.
(Review ID: 93561) 
======================================================================

Comments
WORK AROUND Name: dbT83986 Date: 08/07/99 Copy the entire MetalFileChooserUI.java file and make the change. ======================================================================
11-06-2004

EVALUATION This should be investigated for a future release. Maybe we need to add an API to control editability of file names. ###@###.### 2001-11-14
14-11-2001