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


Java ComponentListener.componentHidden方法代码示例

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


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

示例1: firePaletteEvent

import java.awt.event.ComponentListener; //导入方法依赖的package包/类
/**
 * Fire a component event to the Layer component listeners, with the palette
 * as the component, letting them know if it's visible or not.
 */
public void firePaletteEvent(ComponentEvent event) {
    if (localHackList == null) {
        return;
    }

    palette = (Container) event.getSource();
    int eventType = event.getID();
    for (ComponentListener listener : localHackList) {
        if (eventType == ComponentEvent.COMPONENT_HIDDEN) {
            listener.componentHidden(event);
        } else if (eventType == ComponentEvent.COMPONENT_SHOWN) {
            listener.componentShown(event);
        }
    }

    if (eventType == ComponentEvent.COMPONENT_HIDDEN) {
        palette = null;
    }
}
 
开发者ID:d2fn,项目名称:passage,代码行数:24,代码来源:Layer.java

示例2: processComponentEventImpl

import java.awt.event.ComponentListener; //导入方法依赖的package包/类
private void processComponentEventImpl(ComponentEvent e, Collection<ComponentListener> c) {
    for (ComponentListener listener : c) {
        switch (e.getID()) {
            case ComponentEvent.COMPONENT_HIDDEN:
                listener.componentHidden(e);
                break;
            case ComponentEvent.COMPONENT_MOVED:
                listener.componentMoved(e);
                break;
            case ComponentEvent.COMPONENT_RESIZED:
                listener.componentResized(e);
                break;
            case ComponentEvent.COMPONENT_SHOWN:
                listener.componentShown(e);
                break;
        }
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:Component.java

示例3: fireHiddenEvent

import java.awt.event.ComponentListener; //导入方法依赖的package包/类
protected void fireHiddenEvent() {
    ComponentListener[] listeners = getComponentListeners();
    if (listeners != null) {
        ComponentEvent e = new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN);
        for (ComponentListener l : listeners) {
            if (l != null) {
                l.componentHidden(e);
            }
        }
    }
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:12,代码来源:JCalendarPanel.java

示例4: notifyHideHack

import java.awt.event.ComponentListener; //导入方法依赖的package包/类
/**
 * Part of a layer hack to notify the component listener when the component
 * is hidden. These components don't receive the ComponentHidden
 * notification. Remove when it works.
 */
public void notifyHideHack() {
    if (localHackList == null) {
        return;
    }

    ComponentEvent ce = new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN);

    for (ComponentListener listener : localHackList) {
        listener.componentHidden(ce);
    }
}
 
开发者ID:d2fn,项目名称:passage,代码行数:17,代码来源:Layer.java


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