Bug 180053 - Centralized method for select-all-on-focus behavior in text fields
Centralized method for select-all-on-focus behavior in text fields
Status: NEW
Product: platform
Classification: Unclassified
Component: -- Other --
6.x
PC Windows XP
: P3 (vote)
: TBD
Assigned To: issues@platform
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-31 17:12 UTC by _ tboudreau
Modified: 2010-02-01 02:33 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2010-01-31 17:12:48 UTC
Almost all text fields in NetBeans UI contain code which adds a focus listener to text fields and calls selectAll() on focus gained.  But everyone has to write their own code to do it.  I am already doing this with a utility method for all of the Java Card modules.

There are also requests to disable this behavior for unix-style middle-button paste users.  A central location for managing this behavior would make that possible.

I'm proposing adding a method Utilities.configureSelectAllOnFocus(JTextComponent).

Hopefully, if Jackpot is up to it (or if not, with lots of grepping) all or most such instances can be found in a pass over the codebase, and quite likely a number of inner FocusListener classes can be eliminated.
Comment 1 Stanislav Aubrecht 2010-02-01 02:33:51 UTC
sounds like a new feature to me...


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo