removeContainerListener ( )源码实例Demo

java.awt.Container#removeContainerListener ( )源码实例Demo

下面列出了java.awt.Container#removeContainerListener ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ghidra   文件: FileOpenDropHandler.java
private void deinitializeComponents(Component comp) {
	if (comp instanceof CellRendererPane) {
		return;
	}

	if (comp instanceof Container) {
		Container c = (Container) comp;
		c.removeContainerListener(this);
		Component comps[] = c.getComponents();
		for (Component element : comps) {
			deinitializeComponents(element);
		}
	}
	DropTarget dt = comp.getDropTarget();
	if (dt instanceof CascadedDropTarget) {
		CascadedDropTarget target = (CascadedDropTarget) dt;
		DropTarget newTarget = target.removeDropTarget(globalDropTarget);
		comp.setDropTarget(newTarget);
	}
}
 
源代码2 项目: netbeans   文件: HyperlinkSupport.java
private void registerChildren(Component c, IssueLinker issueLinker) {
    if(c instanceof Container) {
        Container container = (Container) c;
        container.removeContainerListener(regListener);
        container.addContainerListener(regListener);
        
        Component[] components = container.getComponents();
        for (Component cmp : components) {
            registerChildren(cmp, issueLinker);
        }
    } if(c instanceof JTextPane) {
        JTextPane tp = (JTextPane) c;
        if(!tp.isEditable()) {
            registerTask.add(tp, issueLinker);
        }
    }
}
 
源代码3 项目: visualvm   文件: ReplaceDialog.java
private void registerKeyAction(Component c) {
    if (c instanceof ReplaceDialog == false) {
        c.removeKeyListener(this);
        c.addKeyListener(this);
    }

    if (c instanceof Container) {
        Container cnt = (Container) c;
        cnt.removeContainerListener(this);
        cnt.addContainerListener(this);
        Component[] ch = cnt.getComponents();
        for (int i = 0; i < ch.length; i++) {
            registerKeyAction(ch[i]);
        }
    }
}
 
源代码4 项目: rest-client   文件: EscapableDialog.java
private void registerKeyAction(Component c) {
    if (c instanceof EscapableDialog == false) {
        c.removeKeyListener(this);
        c.addKeyListener(this);
    }

    if (c instanceof Container) {
        Container cnt = (Container) c;
        cnt.removeContainerListener(this);
        cnt.addContainerListener(this);
        Component[] ch = cnt.getComponents();
        for (int i = 0; i < ch.length; i++) {
            registerKeyAction(ch[i]);
        }
    }
}
 
源代码5 项目: pumpernickel   文件: DescendantListener.java
private void processRemoval(Component c) {
	if (components.remove(c)) {
		unregister(c);
		if (c instanceof Container) {
			Container container = (Container) c;
			container.removeContainerListener(containerListener);
			for (Component child : container.getComponents()) {
				processRemoval(child);
			}
		}
	}
}
 
源代码6 项目: pumpernickel   文件: MagnificationPanel.java
private void removeMouseListeners(Component c) {
	c.removeMouseMotionListener(mouseListener);
	c.removeMouseListener(mouseListener);
	if (c instanceof Container) {
		Container c2 = (Container) c;
		c2.removeContainerListener(containerListener);
		for (Component child : c2.getComponents()) {
			addMouseListeners(child);
		}
	}
}
 
源代码7 项目: SNT   文件: ClarifyingKeyListener.java
private void removeKeyAndContainerListenerRecursively(final Component c) {
	c.removeKeyListener(this);
	if (c instanceof Container) {
		final Container container = (Container) c;
		container.removeContainerListener(this);
		final Component[] children = container.getComponents();
		for (int i = 0; i < children.length; i++) {
			removeKeyAndContainerListenerRecursively(children[i]);
		}
	}
}