?? cfshell.java
字號:
package com.cn.darkblue.window;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import com.cn.darkblue.helper.IGroupChat;
import com.cn.darkblue.helper.IPGResource;
import com.cn.darkblue.util.CFResource;
public class CFShell extends Shell {
private static final Log log = LogFactory.getLog(CFShell.class);
/**
* Create the shell
* @param display
* @param style
*/
public CFShell(Display display, int style) {
super(display, style);
createContents();
setLayout(new GridLayout());
CFResource.getInstance().getShellCache().add(this);
}
/**
* Create contents of the window
*/
protected void createContents() {
setText(" 組創建 ");
setSize(400, 300);
}
@Override
public void close() {
try{
CFResource.getInstance().getShellCache().remove(this);//從緩存中移除
log.info(this.toString()+" UI 已從緩存中移除 ");
if(this instanceof IGroupChat)
CFResource.getInstance().getGroupItrtWins().remove(this);
if(this instanceof ChatWin){
ChatWin win = (ChatWin)this;
IPGResource res = (IPGResource)CFResource.getInstance().getJoinPGMap().get(win.getGroup());
res.getOScreens().remove(win.getChater());
}
}catch(Exception e){
e.printStackTrace();
}
super.close();
super.dispose();
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -