java类java.awt.event.ContainerListener的实例源码

Container.java 文件源码 项目:cn1 阅读 34 收藏 0 点赞 0 评论 0
public void removeContainerListener(ContainerListener l) {
    // toolkit.lockAWT();
    // try {
    containerListeners.removeUserListener(l);
    // } finally {
    // toolkit.unlockAWT();
    // }
}
Container.java 文件源码 项目:cn1 阅读 25 收藏 0 点赞 0 评论 0
@SuppressWarnings("unchecked")
@Override
public <T extends EventListener> T[] getListeners(Class<T> listenerType) {
    // toolkit.lockAWT();
    // try {
    if (ContainerListener.class.isAssignableFrom(listenerType)) {
        return (T[]) getContainerListeners();
    }
    return super.getListeners(listenerType);
    // } finally {
    // toolkit.unlockAWT();
    // }
}
BasicMenuBarUITest.java 文件源码 项目:cn1 阅读 19 收藏 0 点赞 0 评论 0
public void testCreateContainerListener() {
    final ContainerListener containerListener1 = menuBarUI.createContainerListener();
    final ContainerListener containerListener2 = menuBarUI.createContainerListener();
    assertNotNull(containerListener1);
    assertSame(containerListener1, containerListener2);
    assertSame(containerListener1, menuBarUI.createChangeListener());
}
Container.java 文件源码 项目:JamVM-PH 阅读 20 收藏 0 点赞 0 评论 0
/**
 * Adds the specified container listener to this object's list of
 * container listeners.
 *
 * @param listener The listener to add.
 */
public synchronized void addContainerListener(ContainerListener listener)
{
  if (listener != null)
    {
      containerListener = AWTEventMulticaster.add(containerListener,
                                                  listener);
      newEventsOnly = true;
    }
}
Container.java 文件源码 项目:JamVM-PH 阅读 27 收藏 0 点赞 0 评论 0
/**
 * @since 1.4
 */
public synchronized ContainerListener[] getContainerListeners()
{
  return (ContainerListener[])
    AWTEventMulticaster.getListeners(containerListener,
                                     ContainerListener.class);
}
StandaloneAppletWindow.java 文件源码 项目:JamVM-PH 阅读 28 收藏 0 点赞 0 评论 0
/**
 * This method is called when a component is added to the container.
 * 
 * @param event the <code>ContainerEvent</code> indicating component
 *          addition
 */
public void componentAdded(ContainerEvent event)
{
  if (applet != null)
    {
      ContainerListener[] l = applet.getContainerListeners();
      for (int i = 0; i < l.length; i++)
        l[i].componentAdded(event);
    }
}
StandaloneAppletWindow.java 文件源码 项目:JamVM-PH 阅读 28 收藏 0 点赞 0 评论 0
/**
 * This method is called when a component is removed from the container.
 * 
 * @param event the <code>ContainerEvent</code> indicating component removal
 */
public void componentRemoved(ContainerEvent event)
{
  if (applet != null)
    {
      ContainerListener[] l = applet.getContainerListeners();
      for (int i = 0; i < l.length; i++)
        l[i].componentRemoved(event);
    }
}
PluginAppletWindow.java 文件源码 项目:JamVM-PH 阅读 20 收藏 0 点赞 0 评论 0
/**
 * This method is called when a component is added to the container.
 * 
 * @param event the <code>ContainerEvent</code> indicating component
 *          addition
 */
public void componentAdded(ContainerEvent event)
{
  if (applet != null)
    {
      ContainerListener[] l = applet.getContainerListeners();
      for (int i = 0; i < l.length; i++)
        l[i].componentAdded(event);
    }
}
PluginAppletWindow.java 文件源码 项目:JamVM-PH 阅读 31 收藏 0 点赞 0 评论 0
/**
 * This method is called when a component is removed from the container.
 * 
 * @param event the <code>ContainerEvent</code> indicating component removal
 */
public void componentRemoved(ContainerEvent event)
{
  if (applet != null)
    {
      ContainerListener[] l = applet.getContainerListeners();
      for (int i = 0; i < l.length; i++)
        l[i].componentRemoved(event);
    }
}
Container.java 文件源码 项目:classpath 阅读 29 收藏 0 点赞 0 评论 0
/**
 * Adds the specified container listener to this object's list of
 * container listeners.
 *
 * @param listener The listener to add.
 */
public synchronized void addContainerListener(ContainerListener listener)
{
  if (listener != null)
    {
      containerListener = AWTEventMulticaster.add(containerListener,
                                                  listener);
      newEventsOnly = true;
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号