本文整理匯總了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;
}
}
示例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;
}
}
}
示例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);
}
}
}
}
示例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);
}
}