Java Code Examples for java.awt.event.ContainerEvent#getChild()
The following examples show how to use
java.awt.event.ContainerEvent#getChild() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CloseTabPaneUI.java From iBioSim with Apache License 2.0 | 6 votes |
@Override public void componentRemoved(ContainerEvent e) { JTabbedPane tp = (JTabbedPane) e.getContainer(); Component child = e.getChild(); if (child instanceof UIResource) { return; } // NOTE 4/15/2002 (joutwate): // This fix is implemented using client properties since there is // currently no IndexPropertyChangeEvent. Once // IndexPropertyChangeEvents have been added this code should be // modified to use it. Integer indexObj = (Integer) tp.getClientProperty("__index_to_remove__"); if (indexObj != null) { int index = indexObj.intValue(); if (htmlViews != null && htmlViews.size() >= index) { htmlViews.removeElementAt(index); } } }
Example 2
Source File: SeaGlassDesktopPaneUI.java From seaglass with Apache License 2.0 | 6 votes |
public void componentAdded(ContainerEvent e) { if (e.getChild() instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) e.getChild(); JInternalFrame.JDesktopIcon desktopIcon = f.getDesktopIcon(); for (Component comp : getComponents()) { if (comp == desktopIcon) { // We have it already return; } } add(desktopIcon); f.addComponentListener(this); if (getComponentCount() == 1) { adjustSize(); } } }
Example 3
Source File: Wizard.java From tn5250j with GNU General Public License v2.0 | 6 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof WizardPage) { WizardPage wp = (WizardPage)e.getChild(); JButton b; b = wp.getNextButton(); if (b != null) { b.removeActionListener(nextListener); } b = wp.getPreviousButton(); if (b != null) { b.removeActionListener(previousListener); } b = wp.getFinishButton(); if (b != null) { b.removeActionListener(finishListener); } b = wp.getCancelButton(); if (b != null) { b.removeActionListener(cancelListener); } b = wp.getHelpButton(); if (b != null) { b.removeActionListener(helpListener); } } }
Example 4
Source File: SeaGlassScrollPaneUI.java From seaglass with Apache License 2.0 | 5 votes |
public void componentAdded(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().addFocusListener(this); viewportViewHasFocus = e.getChild().isFocusOwner(); scrollpane.repaint(); } }
Example 5
Source File: BEToolBarUI.java From beautyeye with Apache License 2.0 | 5 votes |
public void componentRemoved(ContainerEvent evt) { Component c = evt.getChild(); if (toolBarFocusListener != null) { c.removeFocusListener(toolBarFocusListener); } // Revert the button border setBorderToNormal(c); }
Example 6
Source File: SynthScrollPaneUI.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void componentAdded(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().addFocusListener(this); viewportViewHasFocus = e.getChild().isFocusOwner(); scrollpane.repaint(); } }
Example 7
Source File: AbstractMenuFactory.java From netbeans with Apache License 2.0 | 5 votes |
public void componentAdded(ContainerEvent e) { JMenu menu = (JMenu) e.getContainer(); JComponent item = (JComponent) e.getChild(); //Mark the child as belonging to the parent container context String containerContext = getContainerContext(menu); item.putClientProperty (KEY_CONTAINERCONTEXT, containerContext); }
Example 8
Source File: SynthScrollPaneUI.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void componentAdded(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().addFocusListener(this); viewportViewHasFocus = e.getChild().isFocusOwner(); scrollpane.repaint(); } }
Example 9
Source File: JButtonBar.java From orbit-image-analysis with GNU General Public License v3.0 | 5 votes |
public void componentAdded(ContainerEvent e) { JButtonBar container = (JButtonBar)e.getContainer(); if (e.getChild() instanceof AbstractButton) { ((ButtonBarUI)container.ui).installButtonBarUI( (AbstractButton)e.getChild()); ((AbstractButton)e.getChild()).addPropertyChangeListener( "UI", JButtonBar.uiUpdater); } }
Example 10
Source File: BasicLizziePaneUI.java From lizzie with GNU General Public License v3.0 | 5 votes |
public void componentRemoved(ContainerEvent evt) { Component c = evt.getChild(); if (lizziePaneFocusListener != null) { c.removeFocusListener(lizziePaneFocusListener); } }
Example 11
Source File: SynthScrollPaneUI.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public void componentAdded(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().addFocusListener(this); viewportViewHasFocus = e.getChild().isFocusOwner(); scrollpane.repaint(); } }
Example 12
Source File: SynthScrollPaneUI.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void componentAdded(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().addFocusListener(this); viewportViewHasFocus = e.getChild().isFocusOwner(); scrollpane.repaint(); } }
Example 13
Source File: JButtonBar.java From orbit-image-analysis with GNU General Public License v3.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof AbstractButton) { ((AbstractButton)e.getChild()).removePropertyChangeListener("UI", JButtonBar.uiUpdater); } }
Example 14
Source File: SynthScrollPaneUI.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().removeFocusListener(this); } }
Example 15
Source File: SynthScrollPaneUI.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().removeFocusListener(this); } }
Example 16
Source File: SynthScrollPaneUI.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().removeFocusListener(this); } }
Example 17
Source File: DesktopScrollPane.java From mars-sim with GNU General Public License v3.0 | 4 votes |
private void onComponentRemoted(ContainerEvent event) { Component removedComponent = event.getChild(); if (removedComponent instanceof JInternalFrame) removedComponent.removeComponentListener(componentListener); }
Example 18
Source File: SynthScrollPaneUI.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().removeFocusListener(this); } }
Example 19
Source File: SynthScrollPaneUI.java From Bytecoder with Apache License 2.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().removeFocusListener(this); } }
Example 20
Source File: SynthScrollPaneUI.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public void componentRemoved(ContainerEvent e) { if (e.getChild() instanceof JTextComponent) { e.getChild().removeFocusListener(this); } }