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

Summary: API to hide the title bar in a TopComponent
Product: platform Reporter: adel <adel>
Component: Window SystemAssignee: Stanislav Aubrecht <saubrecht>
Status: NEW ---    
Severity: blocker CC: geertjan, jglick, jheilmann, saubrecht, tdudgeon
Priority: P3 Keywords: API, UI
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 50354    

Description adel 2003-12-15 15:17:45 UTC
This issue emerged from the current discussion:
http://www.netbeans.org/servlets/ReadMsg?
msgId=641700&listName=nbui

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