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.
Summary: | TabbedContainer and BasicTabDisplayerUI should support hiding of "Close" button for non TopComponent | ||
---|---|---|---|
Product: | platform | Reporter: | jmborer <jmborer> |
Component: | Window System | Assignee: | Stanislav Aubrecht <saubrecht> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
jmborer
2014-01-22 10:30:28 UTC
Why don't you use TabDisplayer.setShowCloseButton(false)? Or do you need to suppress close button for a single tab only? I need to hide the button for a single tab, that always remains at position 0. OK, you might argue that my HMI is bad. Well, possible. Meanwhile having one fixed tab and other dynamic a closeable beside it, is very easy to understand for the end user and saves a lot of space. So what I did meanwhile is make my "non-closeable" component extend TopComponent and provide my own WinsysInfoForTabbed which checks for client property TopComponent.PROP_CLOSING_DISABLED. It works, but I don't really know if there are side effects of using TopComponents inside other TopComponents and outside the windowing system of Netbeans. I know that there is TabbedPaneFactory.createCloseButtonTabbedPane(), but aside that TabbedContainer has a "greater" implementation for handling a lot of tabs, I appreciate TabbedContainer's default behaviors like, "close all" or "close all but me" features, that doesn't exist with TabbedPaneFactory. I don't know if there are better technics or APIs I could use. |