View | Details | Raw Unified | Return to bug 209051 | Differences between
and this patch

Collapse All | Expand All

(-)a/openide.windows/apichanges.xml (+14 lines)
 Lines 50-55    Link Here 
50
<apidef name="winsys">Window System API</apidef>
50
<apidef name="winsys">Window System API</apidef>
51
</apidefs>
51
</apidefs>
52
<changes>
52
<changes>
53
<change id="topcomponent.subcomponents">
54
    <api name="winsys"/>
55
    <summary>Added method TopComponent.getSubComponents.</summary>
56
    <version major="6" minor="52"/>
57
    <date day="6" month="3" year="2012"/>
58
    <author login="saubrecht"/>
59
    <compatibility addition="yes" source="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
60
    <description>
61
        <p>The new method can be used to access for example inner tabs in a
62
        multiview window.</p>
63
    </description>
64
    <class package="org.openide.windows" name="TopComponent"/>
65
    <issue number="209051"/>
66
</change>
53
<change id="topcomponent.busy">
67
<change id="topcomponent.busy">
54
    <api name="winsys"/>
68
    <api name="winsys"/>
55
    <summary>Added method TopComponent.makeBusy(boolean).</summary>
69
    <summary>Added method TopComponent.makeBusy(boolean).</summary>
(-)a/openide.windows/manifest.mf (-1 / +1 lines)
 Lines 1-6    Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.windows
2
OpenIDE-Module: org.openide.windows
3
OpenIDE-Module-Specification-Version: 6.51
3
OpenIDE-Module-Specification-Version: 6.52
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
6
(-)a/openide.windows/src/org/openide/windows/TopComponent.java (-8 / +71 lines)
 Lines 80-92    Link Here 
80
import javax.accessibility.Accessible;
80
import javax.accessibility.Accessible;
81
import javax.accessibility.AccessibleContext;
81
import javax.accessibility.AccessibleContext;
82
import javax.accessibility.AccessibleRole;
82
import javax.accessibility.AccessibleRole;
83
import javax.swing.AbstractAction;
83
import javax.swing.*;
84
import javax.swing.Action;
85
import javax.swing.ActionMap;
86
import javax.swing.JComponent;
87
import javax.swing.KeyStroke;
88
import javax.swing.SwingUtilities;
89
import javax.swing.Timer;
90
import javax.swing.plaf.basic.BasicHTML;
84
import javax.swing.plaf.basic.BasicHTML;
91
import javax.swing.text.Keymap;
85
import javax.swing.text.Keymap;
92
import org.openide.awt.ActionID;
86
import org.openide.awt.ActionID;
 Lines 1033-1039    Link Here 
1033
    public String getHtmlDisplayName() {
1027
    public String getHtmlDisplayName() {
1034
        return htmlDisplayName;
1028
        return htmlDisplayName;
1035
    }
1029
    }
1036
    
1030
1037
1031
1038
    /** Sets toolTip for this <code>TopComponent</code>, adds notification
1032
    /** Sets toolTip for this <code>TopComponent</code>, adds notification
1039
     * about the change to its <code>WindowManager.TopComponentManager</code>. */
1033
     * about the change to its <code>WindowManager.TopComponentManager</code>. */
 Lines 1394-1399    Link Here 
1394
        this.nodeName = nodeName;
1388
        this.nodeName = nodeName;
1395
    }
1389
    }
1396
1390
1391
    /**
1392
     * Retrieves sub-components this TopComponent contains. The resulting array
1393
     * is a snapshot valid at the time of the call and shouldn't be held for too long.
1394
     * This method can be called from EDT only.
1395
     * 
1396
     * @return Array of internal sub-components or an empty array if the TopComponent
1397
     * has no internal sub-components.
1398
     * @since 6.52
1399
     */
1400
    public SubComponent[] getSubComponents() {
1401
        return new SubComponent[0];
1402
    }
1403
1397
    /** Each top component that wishes to be cloned should implement
1404
    /** Each top component that wishes to be cloned should implement
1398
    * this interface, so CloneAction can check it and call the cloneComponent
1405
    * this interface, so CloneAction can check it and call the cloneComponent
1399
    * method.
1406
    * method.
 Lines 1539-1544    Link Here 
1539
        public void removePropertyChangeListener(PropertyChangeListener l);
1546
        public void removePropertyChangeListener(PropertyChangeListener l);
1540
    }
1547
    }
1541
1548
1549
    /**
1550
     * Representation of a visual sub-component displayed in a TopComponent,
1551
     * for example sub-tabs in a multiview window.
1552
     *
1553
     * @see #getSubComponents()
1554
     * @since 6.52
1555
     */
1556
    public static abstract class SubComponent {
1557
        private final String displayName;
1558
        private final String description;
1559
        private boolean active;
1560
1561
        /**
1562
         * C'tor
1563
         * @param displayName Subcomponent's display name.
1564
         * @param active True if the given sub-component is currently active,
1565
         * e.g. multiview sub-tab is selected.
1566
         */
1567
        protected SubComponent( String displayName, boolean active ) {
1568
            this( displayName, null, active );
1569
        }
1570
1571
        /**
1572
         * C'tor
1573
         * @param displayName Subcomponent's display name.
1574
         * @param description Short description to show in a tooltip.
1575
         * @param active True if the given sub-component is currently active,
1576
         * e.g. multiview sub-tab is selected.
1577
         */
1578
        public SubComponent( String displayName, String description, boolean active ) {
1579
            this.displayName = displayName;
1580
            this.description = description;
1581
            this.active = active;
1582
        }
1583
1584
        /**
1585
         * @return True if this sub-component is the active/selected one.
1586
         */
1587
        public final boolean isActive() {
1588
            return active;
1589
        }
1590
1591
        public final String getDescription() {
1592
            return description;
1593
        }
1594
1595
        public final String getDisplayName() {
1596
            return displayName;
1597
        }
1598
1599
        /**
1600
         * Make this sub-component the active/selected one.
1601
         */
1602
        public abstract void activate();
1603
    }
1604
1542
    private class AttentionGetter implements ActionListener {
1605
    private class AttentionGetter implements ActionListener {
1543
        Timer timer = null;
1606
        Timer timer = null;
1544
1607

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