This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 15582 - Close button on tabs
Summary: Close button on tabs
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: _ ttran
URL:
Keywords: UI
: 11563 18481 (view as bug list)
Depends on: 17127
Blocks: 4751
  Show dependency tree
 
Reported: 2001-09-18 11:28 UTC by _ tboudreau
Modified: 2008-12-23 09:53 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
prototype (22.16 KB, application/octet-stream)
2002-03-27 17:08 UTC, _ ttran
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2001-09-18 11:28:14 UTC
It would be nice to include an X close button on tabs in the Editor (e.g.
selectively - any given mode could decide whether it wants them or not).  Less
clicks than right clicking and choosing close.  Eclipse does this, and it's
pretty nice.
Comment 1 _ tboudreau 2001-11-06 13:47:44 UTC
Just got notification that 4751 got linked to this as depending on
this issue.  Don't think they're dependent, although related.  Close
tabs on the editor is a UI issue for the Editor pane (and possibly all
topcomponents that live inside a tabbed UI).  A multiple-close file
dialog is also useful but a completely seperate issue.

Comment 2 Jan Chalupa 2001-11-27 11:51:39 UTC
Target milestone -> 3.3.1.
Comment 3 Jan Chalupa 2001-11-27 11:55:04 UTC
Target milestone -> 3.3.1.
Comment 4 Jan Zajicek 2001-12-11 14:17:41 UTC
*** Issue 18481 has been marked as a duplicate of this issue. ***
Comment 5 Jan Chalupa 2002-01-11 14:00:15 UTC
Target milestone -> 3.4
Comment 6 Jan Chalupa 2002-01-11 14:04:13 UTC
Target milestone -> 3.4
Comment 7 Jan Chalupa 2002-01-11 14:05:51 UTC
Target milestone -> 3.4
Comment 8 Jan Chalupa 2002-01-11 14:09:49 UTC
Target milestone -> 3.4
Comment 9 David Simonek 2002-01-28 16:05:46 UTC
Reassigning to Marek. Marek, please evaluate these enhancements, thanks.
Comment 10 mslama 2002-01-29 13:35:58 UTC
It is clear what to do. I just do not know how to implement it.

Comment 11 David Simonek 2002-01-31 16:51:14 UTC
*** Issue 11563 has been marked as a duplicate of this issue. ***
Comment 12 _ tboudreau 2002-02-14 09:34:33 UTC
A thought as to how this could be implemented, although it is a pretty
far reaching change that could potentially introduce bugs - but in the
long term provides much more flexibility:

What about not using JTabbedPane to contain the TopComponents in the
mode (or use it, but provide a tabbed UI that actually has no tabs)?

Instead, separate the control which switches what is the current
TopComponent from the container for those TopComponents.  This would
make it much easier to implement a number of things that have been
enhancement requests in the past, but were limited by the relative
inflexibility of JTabbedPane:

 - Varying font/color of text on tabs to indicate status
 - Better pluggability of what kind of control is used to switch
between TopComponents in a Mode
 - Additional embedded controls, such as close buttons

It strikes me as a more flexible design to seperate the view (the
container) and the controller (the thing which the user interacts with
to change TopComponents [well, this is stretching MVC a little]).
Comment 13 zohar 2002-02-28 04:40:02 UTC
Why is this issue's priority going up and down like a yo-yo?
Comment 14 _ ttran 2002-02-28 14:37:11 UTC
> Why is this issue's priority going up and down like a yo-yo?

we are tickering if this issue is high enough in the plan for 3.4. 
That's why we are playing yo-yo with the prio.

See also http://core.netbeans.org/plans/
Comment 15 Peter Zavadsky 2002-03-01 10:05:09 UTC
I set the priority to P4 according the plan.
Here are the reasons why it was so low.

1) There is an internal design problem how to implement the feature.
It would be possible only subclassing the (Basic)TabbedPaneUI, to draw
the close button etc. This I fear would create potential prob when
releasing new versions of jdk (the problems we already experienced with 
ArrowsTabbedPaneUI also old PopupTabbedPaneUI.
2) So I'd rather create RFE for jdk to allow such kinds of tabs.
3) Simpy there are other RFE's which have precedence over this one and
therefore should have lower priority.

Possible solution will be still to subclass the tabbedPaneUI (which
I'd like to avoid) and also submit the RFE for jdk, but that's not
clear at the point.

Please don't change the priority again. If you think the issue is more
important, just vote for it.
Thanks

Peter
Comment 16 _ ttran 2002-03-16 20:59:36 UTC
I am assigning this issue to myself.  Not saying I'll solve it but I
would invest some time into investigating what's possible with Swing.
Comment 17 _ ttran 2002-03-27 17:08:31 UTC
Created attachment 5214 [details]
prototype
Comment 18 _ ttran 2002-03-28 15:02:25 UTC
committed initial alpha impl into cvs trunk.  The feature is disabled
by default.  To test it one must use the command line arg

     -J-Dnetbeans.tab.close.button.enabled=true
Comment 19 Jiri Skrivanek 2002-03-29 12:10:10 UTC
What about close tab by double click? 
I am not an UI expert, so I don't know if double click on tab has
reserved a special meaning and if it is acceptable by all. Possibly it
could be the second option and user could choose between close button,
double click or combination of both.
Comment 20 _ tboudreau 2002-03-29 18:20:00 UTC
No no no no no no no no.
Comment 21 _ ttran 2002-04-11 16:39:45 UTC
feature is on by default.  To turn it off use 

-J-Dnetbeans.tab.close.button.enabled=false
Comment 22 Petr Hrebejk 2002-04-24 17:13:41 UTC
Closing because the feature is implemented and working.
Comment 23 Jan Zajicek 2002-04-25 16:48:22 UTC
verifying
Comment 24 Quality Engineering 2003-07-01 16:51:01 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.