类java.awt.event.ContainerEvent源码实例Demo

下面列出了怎么用java.awt.event.ContainerEvent的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: weblaf   文件: WebAccordionModel.java
@Override
public void componentRemoved ( final ContainerEvent e )
{
    // Removing state for the removed pane
    final AccordionPane pane = ( AccordionPane ) e.getChild ();
    states.remove ( pane.getId () );

    // Validating states
    validateStates ();

    // Inform layout about removal
    if ( accordion != null )
    {
        final AccordionLayout layout = accordion.getLayout ();
        if ( layout != null )
        {
            layout.paneRemoved ( accordion, pane );
        }
    }
}
 
源代码2 项目: tn5250j   文件: Wizard.java
public void componentAdded(ContainerEvent e) {
   if (e.getChild() instanceof WizardPage) {
      WizardPage wp = (WizardPage)e.getChild();
      JButton b;
      b = wp.getNextButton();
      if (b != null) {
         b.addActionListener(nextListener);
      }
      b = wp.getPreviousButton();
      if (b != null) {
         b.addActionListener(previousListener);
      }
      b = wp.getFinishButton();
      if (b != null) {
         b.addActionListener(finishListener);
      }
      b = wp.getCancelButton();
      if (b != null) {
         b.addActionListener(cancelListener);
      }
      b = wp.getHelpButton();
      if (b != null) {
         b.addActionListener(helpListener);
      }
   }
}
 
源代码3 项目: tn5250j   文件: Wizard.java
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);
      }
   }
}
 
源代码4 项目: iBioSim   文件: CloseTabPaneUI.java
@Override
public void componentAdded(ContainerEvent e) {
	JTabbedPane tp = (JTabbedPane) e.getContainer();
	Component child = e.getChild();
	if (child instanceof UIResource) {
		return;
	}
	int index = tp.indexOfComponent(child);
	String title = tp.getTitleAt(index);
	boolean isHTML = BasicHTML.isHTMLString(title);
	if (isHTML) {
		if (htmlViews == null) { // Initialize vector
			htmlViews = createHTMLVector();
		}
		else { // Vector already exists
			View v = BasicHTML.createHTMLView(tp, title);
			htmlViews.insertElementAt(v, index);
		}
	}
	else { // Not HTML
		if (htmlViews != null) { // Add placeholder
			htmlViews.insertElementAt(null, index);
		} // else nada!
	}
}
 
源代码5 项目: jdk8u-jdk   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码7 项目: TencentKona-8   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码8 项目: jdk8u60   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码9 项目: JDKSourceCode1.8   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码10 项目: lizzie   文件: BasicLizziePaneUI.java
public void componentAdded(ContainerEvent evt) {
  Component c = evt.getChild();

  if (lizziePaneFocusListener != null) {
    c.addFocusListener(lizziePaneFocusListener);
  }
}
 
源代码11 项目: netbeans   文件: AbstractMenuFactory.java
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);
}
 
源代码12 项目: netbeans   文件: PlainAquaToolbarUI.java
public void componentAdded(ContainerEvent e) {
    Container c = (Container) e.getSource();
    boolean isEditorToolbar = "editorToolbar".equals (c.getName());
    installButtonUI (e.getChild(), isEditorToolbar);
    if (isEditorToolbar) {
        //It's an editor toolbar.  Aqua's combo box ui paints outside
        //of its literal component bounds, and doesn't honor opacity.
        //Need to ensure the toolbar is tall enough that its border is
        //not hidden.
        Dimension min = new Dimension (32, 34);
        ((JComponent)e.getContainer()).setPreferredSize(min);
    }
}
 
源代码13 项目: netbeans   文件: UndoRedoSupport.java
@Override
public void componentAdded(ContainerEvent e) {
    Component c = e.getChild();
    while(((c = c.getParent()) != null)) {
        if(c instanceof TopComponent) {
            RequestProcessor.Task t = (RequestProcessor.Task) ((TopComponent)c).getClientProperty(REGISTER_TASK);
            if(t != null) {
                t.schedule(1000);
            } 
            break;
        }
    }
}
 
源代码14 项目: netbeans   文件: HyperlinkSupport.java
@Override
public void componentAdded(ContainerEvent e) {
    Component c = e.getChild();
    while(((c = c.getParent()) != null)) {
        if(c instanceof TopComponent) {
            RequestProcessor.Task t = (RequestProcessor.Task) ((TopComponent)c).getClientProperty(REGISTER_TASK);
            if(t != null) {
                t.schedule(1000);
            } 
            break;
        }
    }
}
 
源代码15 项目: Bytecoder   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码16 项目: openjdk-8-source   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码17 项目: orbit-image-analysis   文件: JButtonBar.java
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);
  }
}
 
源代码18 项目: openjdk-8   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码19 项目: beautyeye   文件: BEToolBarUI.java
public void componentRemoved(ContainerEvent evt) {
    Component c = evt.getChild();

    if (toolBarFocusListener != null) {
        c.removeFocusListener(toolBarFocusListener);
    }

    // Revert the button border
    setBorderToNormal(c);
}
 
源代码20 项目: seaglass   文件: SeaGlassDesktopPaneUI.java
public void componentRemoved(ContainerEvent e) {
    if (e.getChild() instanceof JInternalFrame) {
        JInternalFrame f = (JInternalFrame) e.getChild();
        if (!f.isIcon()) {
            // Frame was removed without using setClosed(true)
            remove(f.getDesktopIcon());
            f.removeComponentListener(this);
            revalidate();
            repaint();
        }
    }
}
 
源代码21 项目: jdk8u_jdk   文件: SynthScrollPaneUI.java
public void componentAdded(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().addFocusListener(this);
        viewportViewHasFocus = e.getChild().isFocusOwner();
        scrollpane.repaint();
    }
}
 
源代码22 项目: weblaf   文件: WMenuBarInputListener.java
@Override
public void componentAdded ( final ContainerEvent e )
{
    final Component child = e.getChild ();
    if ( child instanceof JMenu )
    {
        ( ( JMenu ) child ).getModel ().addChangeListener ( WMenuBarInputListener.this );
    }
}
 
源代码23 项目: binnavi   文件: CGraphWindow.java
@Override
public void componentAdded(final ContainerEvent event) {
  for (final IGraphWindowListener listener : m_graphPanelListener) {
    // ESCA-JAVA0166: Catch Exception because we are calling a listener function
    try {
      listener.graphPanelOpened((CGraphPanel) event.getChild());
    } catch (final Exception e) {
      CUtilityFunctions.logException(e);
    }
  }
}
 
源代码24 项目: BurpTabEssentials   文件: TabWatcher.java
@Override
public void componentRemoved(ContainerEvent e) {
    removeListenerFromTabbedPanels((JTabbedPane) e.getContainer(), e.getChild());
}
 
源代码25 项目: jdk1.8-source-analysis   文件: SynthScrollPaneUI.java
public void componentRemoved(ContainerEvent e) {
    if (e.getChild() instanceof JTextComponent) {
        e.getChild().removeFocusListener(this);
    }
}
 
源代码26 项目: FlatLaf   文件: FlatScrollPaneUI.java
@Override
public void componentAdded( ContainerEvent e ) {
	e.getChild().addFocusListener( this );
}
 
源代码27 项目: rest-client   文件: EscapableDialog.java
@Override
public void componentRemoved(ContainerEvent e) {
    registerKeyAction(e.getChild());
}
 
源代码28 项目: ontopia   文件: HighlightNode.java
@Override
public void componentAdded(ContainerEvent e) {
  listenTo(e.getComponent());
}
 
源代码29 项目: SNT   文件: ClarifyingKeyListener.java
@Override
public void componentRemoved(final ContainerEvent e) {
	removeKeyAndContainerListenerRecursively(e.getChild());
}
 
源代码30 项目: ghidra   文件: FileOpenDropHandler.java
@Override
public void componentAdded(ContainerEvent e) {
	initializeComponents(e.getChild());
}