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


Java InternalFrameEvent.INTERNAL_FRAME_CLOSING属性代码示例

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


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

示例1: postClosingEvent

/**
 * Post a WINDOW_CLOSING-like event to the frame, so that it can
 * be treated like a regular Frame.
 */
protected void postClosingEvent(JInternalFrame frame) {
    InternalFrameEvent e = new InternalFrameEvent(
        frame, InternalFrameEvent.INTERNAL_FRAME_CLOSING);
    // Try posting event, unless there's a SecurityManager.
    try {
        Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);
    } catch (SecurityException se) {
        frame.dispatchEvent(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:BasicInternalFrameTitlePane.java

示例2: postClosingEvent

/**
 * Post a WINDOW_CLOSING-like event to the frame, so that it can
 * be treated like a regular {@code Frame}.
 *
 * @param frame an instance of {@code JInternalFrame}
 */
protected void postClosingEvent(JInternalFrame frame) {
    InternalFrameEvent e = new InternalFrameEvent(
        frame, InternalFrameEvent.INTERNAL_FRAME_CLOSING);
    // Try posting event, unless there's a SecurityManager.
    try {
        Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);
    } catch (SecurityException se) {
        frame.dispatchEvent(e);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:BasicInternalFrameTitlePane.java

示例3: 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;
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:67,代码来源:JInternalFrame.java


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