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 final class SubComponent { |
1557 |
private final String displayName; |
1558 |
private final String description; |
1559 |
private final boolean active; |
1560 |
private final ActionListener activator; |
1561 |
|
1562 |
/** |
1563 |
* C'tor |
1564 |
* @param displayName Subcomponent's display name. |
1565 |
* @param activator ActionListener to invoke when the sub-component needs |
1566 |
* to be actived. |
1567 |
* @param active True if the given sub-component is currently active, |
1568 |
* e.g. multiview sub-tab is selected. |
1569 |
*/ |
1570 |
public SubComponent( String displayName, ActionListener activator, boolean active ) { |
1571 |
this( displayName, null, activator, active ); |
1572 |
} |
1573 |
|
1574 |
/** |
1575 |
* C'tor |
1576 |
* @param displayName Subcomponent's display name. |
1577 |
* @param description Short description to show in a tooltip. |
1578 |
* @param activator ActionListener to invoke when the sub-component needs |
1579 |
* to be actived. |
1580 |
* @param active True if the given sub-component is currently active, |
1581 |
* e.g. multiview sub-tab is selected. |
1582 |
*/ |
1583 |
public SubComponent( String displayName, String description, ActionListener activator, boolean active ) { |
1584 |
this.displayName = displayName; |
1585 |
this.description = description; |
1586 |
this.active = active; |
1587 |
this.activator = activator; |
1588 |
} |
1589 |
|
1590 |
/** |
1591 |
* @return True if this sub-component is the active/selected one. |
1592 |
*/ |
1593 |
public final boolean isActive() { |
1594 |
return active; |
1595 |
} |
1596 |
|
1597 |
public final String getDescription() { |
1598 |
return description; |
1599 |
} |
1600 |
|
1601 |
public final String getDisplayName() { |
1602 |
return displayName; |
1603 |
} |
1604 |
|
1605 |
/** |
1606 |
* Make this sub-component the active/selected one. |
1607 |
*/ |
1608 |
public final void activate() { |
1609 |
activator.actionPerformed( new ActionEvent( this, 0, "activate") ); //NOI18N |
1610 |
} |
1611 |
} |
1612 |
|
1542 |
private class AttentionGetter implements ActionListener { |
1613 |
private class AttentionGetter implements ActionListener { |
1543 |
Timer timer = null; |
1614 |
Timer timer = null; |
1544 |
|
1615 |
|