Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 60862 - Provide an API for adding icon in the output window tab
Provide an API for adding icon in the output window tab
Product: platform
Classification: Unclassified
Component: Output Window
All All
: P1 (vote)
: 6.x
Assigned To: t_h
Depends on:
  Show dependency treegraph
Reported: 2005-07-12 10:10 UTC by Sherold Dev
Modified: 2009-02-23 13:54 UTC (History)
3 users (show)

See Also:

api+impl diff (8.40 KB, patch)
2006-08-22 14:14 UTC, Milos Kleint
Details | Diff
Little trick how to make the API return final class from methods that used to return InputOutput, IOProvider.getDefault is simplified, would need a bridge for old API (23.59 KB, application/octet-stream)
2006-08-29 19:05 UTC, Jaroslav Tulach

Note You need to log in before you can comment on or make changes to this bug.
Description Sherold Dev 2005-07-12 10:10:29 UTC
Please provide an API for adding icon in the output window tab.

As part of the server ui redesign (see, we have decided to
show server status icon in the output window tab. The icon should be placed
before the output window tab name and it should be possible to changed this icon
to reflect the current server state. See the server ui spec for how the output
window should look like:
Comment 1 Milos Kleint 2006-01-12 10:28:18 UTC
this is still important?
Comment 2 Sherold Dev 2006-01-12 12:39:38 UTC
yes, this issue is still important for us. the current server output
implementation is kind of unfinished w/o the status icon. with the status icon
it should be much easier to find/discover the server output tab among the other
output tabs.
Comment 3 Milos Kleint 2006-01-12 13:47:12 UTC

from API point of view it should be a fairly straightforward change. Adding a
icon  setting method to InputOutput.

Where I see a problem is the case where a single output tab is visible, in such
case the tabs are gone altogether and the output takes whole space, The tab's
name becomes the output window's name. That cannot be done with the icon. 1.
output window's icon is only visible in sliding mode and is already occupied and
should not change. 
Comment 4 Sherold Dev 2006-01-12 17:51:22 UTC
I know about this limitation, but I don't think it should be a big problem. If
there is only a single output tab, it won't be covered by a different tab and
the hard to find problem will thus disappear.

It is clear that it would be better if the status icon could be there always,
but even without it in the single tab mode the usability of the server output
window will improve a lot, IMO.
Comment 5 Milos Kleint 2006-01-13 14:25:23 UTC
Ok, I've sketched out the API and implementation as well, seems to work fine,
except for the macosx where it never paints the icon, but shows empty space. A
simple swing JTabbedPane application with icons works fine on macosx. mystery...
Comment 6 _ tboudreau 2006-08-17 16:25:30 UTC
Re the mystery, probably CloseButtonTabbedPane is somehow the culprit - maybe
test it compared with a JTabbedPane in isolation.

Given the number of API requests here, it might be nice to actually deprecate
the whole IO API and provide something more suitable to how the output window is
used today - we're adding an awful lot of funky methods to IOProvider, and it
seems like some kind of output descriptor would be cleaner.
Comment 7 Milos Kleint 2006-08-22 14:14:42 UTC
Created attachment 33157 [details]
api+impl diff
Comment 8 Milos Kleint 2006-08-22 14:23:24 UTC
please review this minor change to the output apis. It allows to set icon to
InputOutput to show output's status.

There is one known issue on macosx. when the output is running we show the tab's
title as html. it seems that under such conditions, the icon is not painting. I
filed a bug against apple's jdk.
Comment 9 Jaroslav Tulach 2006-08-22 14:51:33 UTC
TCR: Please do not add new methods into already published interfaces, thanks.
Comment 10 Milos Kleint 2006-08-29 09:13:22 UTC
jtulach: Thanks for noticing this incompatibility, I will need to update the
arch/apichange document. However there is hardly any other way. And given that
the interface and whole IO spi is to be implemented by just a known and limited
set of modules, I don't see a problem with it.

1. Adding it to OutputWriter just because it's an abstract class is equivalent
to the proposed solution.
2. creating yet another interface and force people to cast it or create
additional set of factory methods in IOProvider is possible but requires more
work. Additionally it's a one time solution and can hardly be used multiple
times anyway..

Comment 11 Jaroslav Tulach 2006-08-29 18:35:37 UTC
I am not sure, but I have a feeling that you still want to add new method into 
the interface. If you insisted o adding that method, I would have to replace 
API_REVIEW_FAST with API_REVIEW. As the change would not be compatible, 
neither non-controversial.

Anyway, having standard review for this API would be beneficial. Not only the 
InputOutput is non-extensible in compatible way, but also the whole API 
resides in a package shared with Windows API and it is desirable to create new 
one in or anything like that. So if you decide to use this 
issue as opportunity to do a little rewrite, I'll try to participate and help.

If you decide that you still want to do a fast track than I suggest to create 
new "public final class IO" that would replace the deprecated InputOutput and 
be extensible in future. However there are multiple options how to do this, so 
I leave the details for later discussions. 
Comment 12 Jaroslav Tulach 2006-08-29 19:05:47 UTC
Created attachment 33369 [details]
Little trick how to make the API return final class from methods that used to return InputOutput, IOProvider.getDefault is simplified, would need a bridge for old API
Comment 13 Milos Kleint 2006-08-30 07:17:36 UTC
well, let's just pull the issue from review for now.
Comment 14 Antonin Nebuzelsky 2006-12-19 12:57:12 UTC
Not easy for 6.0. Output API is not extensible in this direction. Keeping this
enhancement open for future, when we will evalute complete Output API redesign.
Comment 15 Antonin Nebuzelsky 2008-02-07 15:52:46 UTC
Reassigning to new module owner Tomas Holy.
Comment 16 t_h 2009-02-23 13:54:17 UTC
core-main #3234c129f8ca

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