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 38117 - API to hide the title bar in a TopComponent
Summary: API to hide the title bar in a TopComponent
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Stanislav Aubrecht
Keywords: API, UI
Depends on:
Blocks: 50354
  Show dependency tree
Reported: 2003-12-15 15:17 UTC by adel
Modified: 2011-08-24 13:59 UTC (History)
5 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description adel 2003-12-15 15:17:45 UTC
This issue emerged from the current discussion:

Add a client property for a top component to Hide 
the Title bar when its displayed alone in a view 
mode. Something like HIDE_WHEN_ALONE client 
property for hiding the tabs in old winsys.
Comment 1 David Simonek 2008-10-17 12:47:18 UTC
Hello, i think this request is still valid. Can anybody please reiterate in what situations would such API be useful? I
can perhaps imagine some topcomponent which typically stands alone and its content is so intuitive that it doesn't need
a tab with name or its name is already included in its content. Could you please add more examples so that we know why
we will implement such API? Thank you.
Comment 2 venkatramakkineni 2009-01-08 06:03:00 UTC
Due to the lack of proper Toolbar API, if one wants to implement their own toolbars, which normally don't have title
bars, this feature would be quite useful.
Comment 3 Geertjan Wielenga 2009-01-27 09:53:14 UTC
This would be great to have. One of our customers (Instant JChem) needs it for the welcome screen. The welcome screen is
undocked by default, i.e., the user should see it when the application starts. However, now it has two title bars: the
title bar from the OS and the title bar from the TopComponent. If something like "setUndecorated(true)" or some kind of
property could be set to hide the TopComponent title bar, this requirement for our customer would be satisfied.
Comment 4 Jesse Glick 2011-08-23 14:21:02 UTC
Applies whenever an undocked mode (displayed in its own JFrame) contains just one TopComponent. Two possible solutions (and perhaps different apps need both):

1. Set the frame to be undecorated, so that only NB/Swing controls are shown. Gives the NB Platform the most control, but you lose any nice features the native window system might have. (For example, in GNOME you can use the native window menu to set "Only on This Workspace" vs. "Always on Visible Workspace".)

2. Remove the NB decorations, leaving only the native controls. Unfortunately AWT appears to offer no way to inject additional controls (buttons or menu items) into native window controls, so:

2a. Completely remove NB decorations and hope that native frame actions - drag, minimize, maximize, close, etc. - do everything that is needed. No TopComponent.getActions context menu. No explicit dock action (maybe drag-and-drop can substitute, or maybe a native minimize could act as a dock into a sliding sidebar).

2b. Partially hide the NB decorations so they can still be accessed when needed but are not in the way and consuming space otherwise. Perhaps could be autohide, made visible in a popup when the mouse moves near the native window bar; perhaps could be in a floating palette-type window.
Comment 5 Stanislav Aubrecht 2011-08-24 13:59:46 UTC
patch is welcome