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


Java DestroyNotify类代码示例

本文整理汇总了Java中gnu.x11.event.DestroyNotify的典型用法代码示例。如果您正苦于以下问题:Java DestroyNotify类的具体用法?Java DestroyNotify怎么用?Java DestroyNotify使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: handleDestroyNotify

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void handleDestroyNotify(DestroyNotify destroyNotify)
{
  if (XToolkit.DEBUG)
    System.err.println("DestroyNotify event: " + destroyNotify);

  Integer key = new Integer(destroyNotify.event_window_id);
  Window awtWindow = (Window) windows.get(key);

  AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_CLOSED);
  Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
}
 
开发者ID:vilie,项目名称:javify,代码行数:12,代码来源:XEventPump.java

示例2: handleDestroyNotify

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void handleDestroyNotify(DestroyNotify destroyNotify)
{
  if (XToolkit.DEBUG)
    System.err.println("DestroyNotify event: " + destroyNotify);
  
  Integer key = new Integer(destroyNotify.event_window_id);
  Window awtWindow = (Window) windows.get(key);
  
  AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_CLOSED);
  Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:12,代码来源:XEventPump.java

示例3: unmapNotify

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void unmapNotify(UnmapNotify event) {
/* Unmapped != unmanaged, since it can be iconify-ing (or hiding 
 * in our case). We unmanage a window when it is destroyed.
 *
 * @see #when_destroy_notify(DestroyNotify)
 */
final X11Client client 
    = (X11Client)X11Client.intern(this, event.window_id());
//System.err.println("UnmapNotify: " + client);
// ignore syntatic one here.
if (event.synthetic) {
    return;
}
client.unmapNotify();

display.check_error();
       if (display.checkEventTypeWindow(DestroyNotify.CODE, client.id)) {
           return;
       }

// they withdraw it
if (client.state != X11Client.HIDDEN) {
    /* From icccm 4.1.4: For compatibility with obsolete clients, 
     * window managers should trigger the transition to the Withdrawn 
     * state on the real UnmapNotify rather than waiting for the 
     * synthetic one. They should also trigger the transition if they 
     * receive a synthetic UnmapNotify on a window for which they have 
     * not yet received a real UnmapNotify.
     *
     * Then, what's the use of synthetic UnmapNotify event?
     */
    client.state = X11Client.UNMANAGED;
    client.set_wm_state(Window.WMState.WITHDRAWN);
    client.change_save_set(true);
}
display.check_error();
   }
 
开发者ID:josmas,项目名称:openwonderland,代码行数:38,代码来源:X11WindowManager.java

示例4: destroyNotify

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void destroyNotify(DestroyNotify event) {
final X11Client client 
    = (X11Client)X11Client.intern(this, event.window_id());	

unmanage(client);
client.destroyNotify();
       client.state = X11Client.DESTROYED;
   }
 
开发者ID:josmas,项目名称:openwonderland,代码行数:9,代码来源:X11WindowManager.java

示例5: checkUnmapDestroyEvent

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private boolean checkUnmapDestroyEvent(Display display, X11Client client) {
    display.check_error();
    if (display.checkEventTypeWindow(DestroyNotify.CODE, client.id)
        || display.checkEventTypeWindow(UnmapNotify.CODE, client.id)) {
        return false;
    }
    return true;
}
 
开发者ID:josmas,项目名称:openwonderland,代码行数:9,代码来源:X11WindowManager.java

示例6: handleEvent

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void handleEvent(Event xEvent)
{
  if (XToolkit.DEBUG)
    System.err.println("fetched event: " + xEvent);

  switch (xEvent.code() & 0x7f)
  {
  case ButtonPress.CODE:
    this.handleButtonPress((ButtonPress) xEvent);
    break;
  case ButtonRelease.CODE:
    this.handleButtonRelease((ButtonRelease) xEvent);
    break;
  case MotionNotify.CODE:
    this.handleMotionNotify((MotionNotify) xEvent);
    break;
  case Expose.CODE:
    this.handleExpose((Expose) xEvent);
    break;
  case KeyPress.CODE:
  case KeyRelease.CODE:
    Integer key = new Integer(((Input) xEvent).getEventWindowID());
    Window awtWindow = (Window) windows.get(key);
    handleKeyEvent(xEvent, awtWindow);
    break;
  case DestroyNotify.CODE:
    this.handleDestroyNotify((DestroyNotify) xEvent);
    break;
  case ClientMessage.CODE:
    this.handleClientMessage((ClientMessage) xEvent);
    break;
  case PropertyNotify.CODE:
    key = new Integer (((PropertyNotify) xEvent).getWindowID());
    awtWindow = (Window) windows.get(key);
    AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_STATE_CHANGED);
    Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
    break;
  default:
    if (XToolkit.DEBUG)
      System.err.println("Unhandled X event: " + xEvent);
  }
}
 
开发者ID:vilie,项目名称:javify,代码行数:43,代码来源:XEventPump.java

示例7: handleEvent

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void handleEvent(Event xEvent)
{
  if (XToolkit.DEBUG)
    System.err.println("fetched event: " + xEvent);
  
  switch (xEvent.code() & 0x7f)
  {
  case ButtonPress.CODE:
    this.handleButtonPress((ButtonPress) xEvent);
    break;
  case ButtonRelease.CODE:
    this.handleButtonRelease((ButtonRelease) xEvent); 
    break;
  case MotionNotify.CODE:
    this.handleMotionNotify((MotionNotify) xEvent); 
    break;
  case Expose.CODE:
    this.handleExpose((Expose) xEvent);
    break;
  case KeyPress.CODE:
  case KeyRelease.CODE:
    Integer key = new Integer(((Input) xEvent).getEventWindowID());
    Window awtWindow = (Window) windows.get(key);
    handleKeyEvent(xEvent, awtWindow);
    break;
  case DestroyNotify.CODE:
    this.handleDestroyNotify((DestroyNotify) xEvent);
    break;
  case ClientMessage.CODE:
    this.handleClientMessage((ClientMessage) xEvent);
    break;
  case PropertyNotify.CODE:
    key = new Integer (((PropertyNotify) xEvent).getWindowID());
    awtWindow = (Window) windows.get(key);
    AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_STATE_CHANGED);
    Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
    break;
  default:
    if (XToolkit.DEBUG)
      System.err.println("Unhandled X event: " + xEvent);
  }
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:43,代码来源:XEventPump.java

示例8: dispatch

import gnu.x11.event.DestroyNotify; //导入依赖的package包/类
private void dispatch(Event event) {
logger.fine(event.toString());
       
switch(event.code()) {
    case ClientMessage.CODE: // un-avoidable
	clientMessage((ClientMessage)event);
	break;

    case ConfigureRequest.CODE: // Event.SUBSTRUCTURE_NOTIFY
	configureRequest((ConfigureRequest)event);
	break;

    case ConfigureNotify.CODE: // Event.SUBSTRUCTURE_NOTIFY
	configureNotify((ConfigureNotify)event);
	break;

    case DestroyNotify.CODE: // Event.SUBSTRUCTURE_NOTIFY
	destroyNotify((DestroyNotify)event);
	break;
	
    case PropertyNotify.CODE: // Event.PROPERTY_CHANGE
	propertyNotify((PropertyNotify)event);
	break;

    case MapRequest.CODE: // Event.SUBSTRUCTURE_REDIRECT
	mapRequest((MapRequest)event);
	break;
	
    case MapNotify.CODE: // Event.SUBSTRUCTURE_NOTIFY
	mapNotify((MapNotify)event);
	break;
     
    case UnmapNotify.CODE: // Event.SUBSTRUCTURE_NOTIFY
	unmapNotify((UnmapNotify)event);
	break;

    case CreateNotify.CODE: // Event.SUBSTRUCTURE_NOTIFY, ignored
	createNotify((CreateNotify)event);
	break;

    case MappingNotify.CODE: // un-avoidable, ignored
	break;

    case ReparentNotify.CODE: // nothing to do, ignored
	break;
	
    case EnterNotify.CODE:
        enterNotify((EnterNotify) event);
        break;
        
    default:
	alertUser("Unhandled event: " + event);
}
   }
 
开发者ID:josmas,项目名称:openwonderland,代码行数:55,代码来源:X11WindowManager.java


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