当前位置: 首页>>代码示例>>Java>>正文


Java Component.removeComponentListener方法代码示例

本文整理汇总了Java中java.awt.Component.removeComponentListener方法的典型用法代码示例。如果您正苦于以下问题:Java Component.removeComponentListener方法的具体用法?Java Component.removeComponentListener怎么用?Java Component.removeComponentListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.Component的用法示例。


在下文中一共展示了Component.removeComponentListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: componentResized

import java.awt.Component; //导入方法依赖的package包/类
/**
 * May be called for either component or horizontal scrollbar.
 */
public @Override void componentResized(ComponentEvent e) {
    Component c = e.getComponent();
    if (c == component) { // called for component
        // In case the caretBounds are still null
        // (component not connected to hierarchy yet or it has zero size
        // so the modelToView() returned null) re-attempt to compute the bounds.
        CaretItem caret = getLastCaretItem();
        if (caret.getCaretBounds() == null) {
            dispatchUpdate(false);
            resetBlink();
            if (caret.getCaretBounds() != null) { // detach the listener - no longer necessary
                c.removeComponentListener(this);
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:EditorCaret.java

示例2: componentResized

import java.awt.Component; //导入方法依赖的package包/类
/**
 * May be called for either component or horizontal scrollbar.
 */
public @Override void componentResized(ComponentEvent e) {
    Component c = e.getComponent();
    if (c == component) { // called for component
        // In case the caretBounds are still null
        // (component not connected to hierarchy yet or it has zero size
        // so the modelToView() returned null) re-attempt to compute the bounds.
        if (caretBounds == null) {
            dispatchUpdate(true);
            if (caretBounds != null) { // detach the listener - no longer necessary
                c.removeComponentListener(this);
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:BaseCaret.java

示例3: unregisterListeners

import java.awt.Component; //导入方法依赖的package包/类
private void unregisterListeners(Component component) {
    if (splitPaneComponentListener != null) {
        component.removeComponentListener(splitPaneComponentListener);
    }

    if (splitPaneActionListener != null) {
        if (component instanceof JTitledPanel) {
            ((JTitledPanel) component).removeActionListener(splitPaneActionListener);
        }

        //else if (component instanceof JExtendedSplitPane) ((JTitledPanel)component).removeActionListener(splitPaneActionListener);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:JExtendedSplitPane.java

示例4: removeListeners

import java.awt.Component; //导入方法依赖的package包/类
void removeListeners(Component ancestor) {
    Component a;
    for (a = ancestor; a != null; a = a.getParent()) {
        a.removeComponentListener(this);
        if (a instanceof JComponent) {
            JComponent jAncestor = (JComponent)a;
            jAncestor.removePropertyChangeListener(this);
        }
        if (a == firstInvisibleAncestor || a instanceof Window) {
            break;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:AncestorNotifier.java

示例5: onDispose

import java.awt.Component; //导入方法依赖的package包/类
@Override
protected void onDispose(Component w) {
    w.removeComponentListener(this);
}
 
开发者ID:akarnokd,项目名称:RxJava2Swing,代码行数:5,代码来源:ComponentEventObservable.java


注:本文中的java.awt.Component.removeComponentListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。