當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。