本文整理汇总了Java中javax.swing.event.InternalFrameEvent.INTERNAL_FRAME_CLOSED属性的典型用法代码示例。如果您正苦于以下问题:Java InternalFrameEvent.INTERNAL_FRAME_CLOSED属性的具体用法?Java InternalFrameEvent.INTERNAL_FRAME_CLOSED怎么用?Java InternalFrameEvent.INTERNAL_FRAME_CLOSED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.swing.event.InternalFrameEvent
的用法示例。
在下文中一共展示了InternalFrameEvent.INTERNAL_FRAME_CLOSED属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fireInternalFrameEvent
/**
* This method fires an InternalFrameEvent to the listeners.
*
* @param id The type of event being fired. See InternalFrameEvent.
*/
protected void fireInternalFrameEvent(int id)
{
Object[] ifListeners = listenerList.getListenerList();
InternalFrameEvent evt = new InternalFrameEvent(this, id);
switch (id)
{
case InternalFrameEvent.INTERNAL_FRAME_CLOSING:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1])
.internalFrameClosing(evt);
}
break;
case InternalFrameEvent.INTERNAL_FRAME_ACTIVATED:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1])
.internalFrameActivated(evt);
}
break;
case InternalFrameEvent.INTERNAL_FRAME_CLOSED:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1]).internalFrameClosed(evt);
}
break;
case InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1])
.internalFrameDeactivated(evt);
}
break;
case InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1])
.internalFrameDeiconified(evt);
}
break;
case InternalFrameEvent.INTERNAL_FRAME_ICONIFIED:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1])
.internalFrameIconified(evt);
}
break;
case InternalFrameEvent.INTERNAL_FRAME_OPENED:
for (int i = ifListeners.length - 2; i >= 0; i -= 2)
{
if (ifListeners[i] == InternalFrameListener.class)
((InternalFrameListener) ifListeners[i + 1]).internalFrameOpened(evt);
}
break;
}
}