Bug 156049 - UI Widgets should have Context Menu including Cut/Copy/Paste, etc
UI Widgets should have Context Menu including Cut/Copy/Paste, etc
Status: RESOLVED WONTFIX
Product: ide
Classification: Unclassified
Component: Code
5.x
PC Windows XP
: P3 with 2 votes (vote)
: TBD
Assigned To: issues@ide
issues@ide
issue_reviewed
:
: 157016 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-24 18:19 UTC by mbarnes
Modified: 2012-08-23 18:27 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 mbarnes 2008-12-24 18:19:43 UTC
I would argue that most modern GUI users expect to be able to move their
cursor over a UI WIdget and pop up a menu to find options to copy, cut,
and paste the data (text) between that Widget and the system clip board.

But NetBeans provides this in only a very small subset of places where it
should.  At the very least, *EVERY* Text Field, Text Area, and Label
should provide this.

When I write a Swing App, I typically use my own extension of JLabel,
for instance, that automatically provides its own Context Menu, with a
property that will turn it on or off.  Ditto for JTextField, JTextArea,
etc, etc.  (Of course, since JLabel is typically read-only, it allows
only "Copy".

It's just weird to right-click on a text-entry field and get... nothing.
Comment 1 Peter Pis 2008-12-30 09:05:22 UTC
Reassigning to form.
Comment 2 Jiri Vagner 2009-01-02 09:29:17 UTC
You want to use cut-copy-paste actions while editing values inside Properties view. Did I understand your enhancement 
request correctly?
Comment 3 mbarnes 2009-01-02 13:23:24 UTC
No, that's not really what I'm suggesting...

I'm suggesting that *all* widgets on the *entire* UI should have at
least Copy, and any that are editable should also have Cut & Paste.

At the very least all Text Fields.  But Labels, Combo Box, Tables, etc,
as well.

I am reminded of this need every time I click the "Find" key in the
text editor and then right-click on it to paste text from another
window.  And another time is when I roll my cursor over a Tab in
the Text Editor and can't copy the filename into the clip board.

I have my own library of Swing UI Class extensions that pop up a
Context Menu when the user clicks the Popup Trigger. And when I
write a Swing app, I use these classes so that the user can
readily do Cut/Copy/Paste on all JTextFields, for instance,
without having to use keyboard short-cuts or items on the Edit
Menu on the Menu Bar.

I am suggesting that NB might benefit from something similar.

Why the Swing LAFs don't provide this automatically I just do
not understand...
Comment 4 Jiri Vagner 2009-01-02 14:27:40 UTC
> I am reminded of this need every time I click the "Find" key in the
> text editor and then right-click on it to paste text from another
> window.  And another time is when I roll my cursor over a Tab in
> the Text Editor and can't copy the filename into the clip board.

:D

I agree with you, but this is issue report tool only for netbeans ide, not for jdk and swing.

Please report a bug to http://bugs.sun.com/  (Category: Java SE, Subcategory: classes_swing)
I found something ... http://bugs.sun.com/view_bug.do?bug_id=4634626.
Well you can vote for an existing bug or you can file new one.

Thank you for your response.
Comment 5 mbarnes 2009-01-02 16:29:34 UTC
First off, I don't know why this was moved from "ide UI" to "form ui".

But Wow!  Your reply is truly Amazing, regardless.

That's a very interesting response, just calling it a bug in Swing.
Does that mean that if you find some other "bug" or missing feature
in Swing, you won't bother to program around that, either?

I started writing GUIs using AWT and started programming in Swing when
it first came out, and if I hadn't programmed around the many, many,
many bugs and missing features that those early releases had, I might
as well have just quit programming in Java as well.  Imagine what it
was like before Events and Event Listeners came into being!

Swing has never done any context menus of any kind by default.  It
merely provides the means for the programmer to do it if they wish.  

And I opened this as an enhancement request, not a bug.

It's a flat-out usability issue with any GUI.  As a programmer,
I find it my job to make the software I write, at the very least,
to follow standard and/or expected behavior regardless of the
platform or infrastructure.  So it means I have to do a little
more programming.  I'm writing it to be useful.

Netbeans has a context menu with copy/cut/paste in some places,
and not in others. I wouldn't call that good design.

Saying that Swing doesn't do it for me by default, so it's
just too bad that my software doesn't work the way it should,
is not very responsive to the user needs, to say the least.
That would be like saying Swing isn't Thread-safe, so it's
just too bad that the UI doesn't paint or respond to any
user input while my GUI software is busy running some long-
running process.  Why should I bother to create Threads and
update the UI in the Event Queue?

I will just leave my admonishments at that.

Additionally, the bug you cite is itself also an enhancement
request, and it merely asks for the ability to do context menus,
with only the mechanism that pops up the menu decided by the
plaf.  Note that the issue was closed as fixed in 1.5. Do you
think perhaps that's when method isPopupTrigger() was added to
class java.awt.MouseEvent???

Comment 6 Jiri Vagner 2009-01-02 20:33:26 UTC
> I'm suggesting that *all* widgets on the *entire* UI should have at
> least Copy, and any that are editable should also have Cut & Paste.
> At the very least all Text Fields.  But Labels, Combo Box, Tables, etc,
> as well.

I thought that you were talking about UI created using GUI Designer and standard Swing UI widgets. I'm sorry, I didn't
understand it correctly. 

> First off, I don't know why this was moved from "ide UI" to "form ui".

Yes, now I see that this issue has nothing to do with GUI Builder. > Reassigning back to ide
Comment 7 mbarnes 2009-01-02 21:05:31 UTC
Oh, my goodness!!!  That's funny.  So easy to misunderstand things out of context, no?

Yeah, it's the NetBeans UI *itself* I was asking about....  :-)
Comment 8 Peter Pis 2009-01-18 21:59:52 UTC
*** Issue 157016 has been marked as a duplicate of this issue. ***
Comment 9 Marian Mirilovic 2010-04-09 07:35:39 UTC
No plan to do it in near future
Comment 10 mark_barnes 2012-08-23 18:27:57 UTC
(In reply to comment #9)
> No plan to do it in near future

Fortunately, there's a plugin that does the job: Text Popup Menu


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