本文整理汇总了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);
}
}