当前位置: 代码迷 >> Eclipse >> swt 中如何重写shell类中的最大化,最小化,关闭的方法
  详细解决方案

swt 中如何重写shell类中的最大化,最小化,关闭的方法

热度:116   发布时间:2016-04-23 18:48:07.0
swt 中怎么重写shell类中的最大化,最小化,关闭的方法
swt   中怎么重写shell类中的最大化,最小化,关闭的方法,我想实现的是点窗口关闭时为窗口隐藏而不是关闭,

------解决方案--------------------
不是很记得 了,
方法直接调用的
------解决方案--------------------
shell.addShellListener(new ShellAdapter()
{
/**
* Sent when a shell becomes the active window.
* The default behavior is to do nothing.
*
* @param e an event containing information about the activation
*/
public void shellActivated(ShellEvent e) {
}

/**
* Sent when a shell is closed.
* The default behavior is to do nothing.
*
* @param e an event containing information about the close
*/
public void shellClosed(ShellEvent e) {
}

/**
* Sent when a shell stops being the active window.
* The default behavior is to do nothing.
*
* @param e an event containing information about the deactivation
*/
public void shellDeactivated(ShellEvent e) {
}

/**
* Sent when a shell is un-minimized.
* The default behavior is to do nothing.
*
* @param e an event containing information about the un-minimization
*/
public void shellDeiconified(ShellEvent e) {
}

/**
* Sent when a shell is minimized.
* The default behavior is to do nothing.
*
* @param e an event containing information about the minimization
*/
public void shellIconified(ShellEvent e) {
}

});
  相关解决方案