Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 164578
Collapse All | Expand All

(-)openide.awt/apichanges.xml (+14 lines)
 Lines 47-52    Link Here 
47
<apidef name="awt">AWT API</apidef>
47
<apidef name="awt">AWT API</apidef>
48
</apidefs>
48
</apidefs>
49
<changes>
49
<changes>
50
    <change id="Hide-close-button-in-CloseButtonTabbedPane">
51
        <api name="awt"/>
52
        <summary>API to hide close button in CloseButtonTabbedPane</summary>
53
        <version major="7" minor="8"/>
54
        <date day="6" month="5" year="2009"/>
55
        <author login="jbecicka"/>
56
        <compatibility addition="yes" binary="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
57
        <description>
58
            Added possibility to hide close button in CloseButtonTabbedPane
59
            through tab's client property
60
            component.putClientProperty(TabbedPaneFactory.NO_CLOSE_BUTTON, Boolean.TRUE)
61
        </description>
62
        <issue number="164578"/>
63
    </change>
50
    <change id="AlwaysEnabledAction-extra-properties-and-name-sync">
64
    <change id="AlwaysEnabledAction-extra-properties-and-name-sync">
51
        <api name="awt"/>
65
        <api name="awt"/>
52
        <summary>AlwaysEnabledAction extra properties and Action.NAME synchronization</summary>
66
        <summary>AlwaysEnabledAction extra properties and Action.NAME synchronization</summary>
(-)openide.awt/nbproject/project.properties (-1 / +1 lines)
 Lines 44-47    Link Here 
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
46
46
47
spec.version.base=7.7.0
47
spec.version.base=7.8.0
(-)openide.awt/src/org/openide/awt/CloseButtonTabbedPane.java (+8 lines)
 Lines 169-174    Link Here 
169
    }
169
    }
170
170
171
    private Rectangle getCloseButtonBoundsAt(int i) {
171
    private Rectangle getCloseButtonBoundsAt(int i) {
172
        Component c = findTabAt(i);
173
        //if NO_CLOSE_BUTTON -> return null
174
        if (c!=null && c instanceof JComponent) {
175
            Object prop = ((JComponent) c).getClientProperty(TabbedPaneFactory.NO_CLOSE_BUTTON);
176
            if (prop!=null && prop instanceof Boolean && (Boolean) prop) {
177
                return null;
178
            }
179
        }
172
        Rectangle b = getBoundsAt(i);
180
        Rectangle b = getBoundsAt(i);
173
        if (b == null)
181
        if (b == null)
174
            return null;
182
            return null;
(-)openide.awt/src/org/openide/awt/TabbedPaneFactory.java (+11 lines)
 Lines 56-61    Link Here 
56
     * when the user clicks close button on a tab.
56
     * when the user clicks close button on a tab.
57
     */
57
     */
58
    public static final String PROP_CLOSE = CloseButtonTabbedPane.PROP_CLOSE;
58
    public static final String PROP_CLOSE = CloseButtonTabbedPane.PROP_CLOSE;
59
60
    /**
61
     * To hide close button feature on specific tab, put value Boolean.TRUE
62
     * as a client property of your tab:<br>
63
     * <pre>
64
     * component.putClientProperty(TabbedPaneFactory.NO_CLOSE_BUTTON, Boolean.TRUE)
65
     * </pre>
66
     * @since 7.8
67
     */
68
    public static final String NO_CLOSE_BUTTON = "noCloseButton";
59
    
69
    
60
    /** Creates a new instance of TabbedPaneFactory */
70
    /** Creates a new instance of TabbedPaneFactory */
61
    private TabbedPaneFactory() {
71
    private TabbedPaneFactory() {
 Lines 68-73    Link Here 
68
     * value is the inner component inside the clicked tab.
78
     * value is the inner component inside the clicked tab.
69
     * 
79
     * 
70
     * @return Special TabbedPane with closeable tabs.
80
     * @return Special TabbedPane with closeable tabs.
81
     * @see TabbedPaneFactory#NO_CLOSE_BUTTON
71
     */
82
     */
72
    public static JTabbedPane createCloseButtonTabbedPane() {
83
    public static JTabbedPane createCloseButtonTabbedPane() {
73
        return new CloseButtonTabbedPane();
84
        return new CloseButtonTabbedPane();

Return to bug 164578
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