锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美视频一二三,久草精品视频,久久久亚洲天堂http://www.aygfsteel.com/cuiyuelei/category/19562.html絎戞笎涓嶉椈澹版笎鎮(zhèn)?澶氭儏鍗磋鏃犳儏鎭?zh-cnSun, 07 Mar 2010 14:13:29 GMTSun, 07 Mar 2010 14:13:29 GMT60- 縐瘡鐨勪竴浜涘疄鐢ㄥ伐鍏風被錛堟寔緇坊鍔?.....錛?/title>http://www.aygfsteel.com/cuiyuelei/archive/2010/03/07/314745.html鍌湀娉?Jaclick)鍌湀娉?Jaclick)Sun, 07 Mar 2010 04:42:00 GMThttp://www.aygfsteel.com/cuiyuelei/archive/2010/03/07/314745.htmlhttp://www.aygfsteel.com/cuiyuelei/comments/314745.htmlhttp://www.aygfsteel.com/cuiyuelei/archive/2010/03/07/314745.html#Feedback0http://www.aygfsteel.com/cuiyuelei/comments/commentRss/314745.htmlhttp://www.aygfsteel.com/cuiyuelei/services/trackbacks/314745.html
Image鍥劇墖璧勬簮鑾峰彇鍙婇噴鏀懼伐鍏風被錛宔clipse寮鍙戦伩鍏嶄笉浜嗕嬌鐢ㄥぇ閲忕殑鍥劇墖璧勬簮錛?font face="Tahoma">CacheImage鍙互甯垜浠畬鎴愯繖欏瑰伐浣滐紝浣跨敤璧鋒潵鐩稿綋鏂逛究銆?br />
import
聽java.util.HashMap;
import
聽java.util.Iterator;
import
聽java.util.Map;
import
聽org.eclipse.swt.graphics.Image;
import
聽org.eclipse.ui.plugin.AbstractUIPlugin;


public
聽
class
聽CacheImage聽
{
聽
private
聽
final
聽Map
<
String,聽Image
>
聽imageMap聽
=
聽
new
聽HashMap
<
String,聽Image
>
();

聽
private
聽
static
聽CacheImage聽INSTANCE;


聽
private
聽CacheImage()聽
{
聽}
聽
//
聽鍗曚緥妯″紡錛岃幏寰桟acheImage瀹炰緥
聽
public
聽
static
聽CacheImage聽getINSTANCE()聽
{
聽聽
if
聽(INSTANCE聽
==
聽
null
)
聽聽聽INSTANCE聽
=
聽
new
聽CacheImage();
聽聽
return
聽INSTANCE;
聽}
聽
//
聽鑾峰緱鍥懼儚
聽
public
聽Image聽getImage(String聽applicationID,String聽imageName)聽
{
聽聽
if
聽(imageName聽
==
聽
null
)
聽聽聽
return
聽
null
;
聽聽Image聽image聽
=
聽(Image)聽imageMap.get(imageName);

聽聽
if
聽(image聽
==
聽
null
)聽
{
聽聽聽image聽
=
AbstractUIPlugin.imageDescriptorFromPlugin(
聽聽聽聽聽applicationID,imageName).createImage();
聽聽聽imageMap.put(imageName,聽image);
聽聽}
聽聽
return
聽image;
聽}
聽
//
聽閲婃斁鍥懼儚璧勬簮
聽
public
聽
void
聽dispose()聽
{
聽聽Iterator聽iterator聽
=
聽imageMap.values().iterator();
聽聽
while
聽(iterator.hasNext())
聽聽聽((Image)聽iterator.next()).dispose();
聽聽imageMap.clear();
聽}
}
紿楀彛灞呬腑宸ュ叿綾?br />
import
聽org.eclipse.swt.graphics.Rectangle;
import
聽org.eclipse.swt.widgets.Display;
import
聽org.eclipse.swt.widgets.Shell;


public
聽
class
聽CenterUtil聽
{

聽聽聽聽
public
聽
static
聽
void
聽centerShell(Display聽display,Shell聽shell)
{
聽聽聽聽聽聽聽聽聽Rectangle聽displayBounds聽
=
聽display.getPrimaryMonitor().getBounds();
聽聽聽聽聽聽聽聽聽Rectangle聽shellBounds聽
=
聽shell.getBounds();
聽聽聽聽聽聽聽聽聽
int
聽x聽
=
聽displayBounds.x聽
+
聽(displayBounds.width聽
-
聽shellBounds.width)
>>
1
;
聽聽聽聽聽聽聽聽聽
int
聽y聽
=
聽displayBounds.y聽
+
聽(displayBounds.height聽
-
聽shellBounds.height)
>>
1
;
聽聽聽聽聽聽聽聽聽shell.setLocation(x,聽y);
聽聽聽聽聽}
聽}

]]>
主站蜘蛛池模板:
乌什县|
永春县|
余干县|
收藏|
五峰|
镇平县|
湾仔区|
霞浦县|
略阳县|
铁岭县|
牡丹江市|
奉化市|
浮梁县|
宁武县|
闻喜县|
泽普县|
西充县|
获嘉县|
大丰市|
达日县|
枣庄市|
包头市|
金川县|
抚松县|
叙永县|
寿阳县|
封开县|
海淀区|
汝阳县|
富源县|
新和县|
苍南县|
东阿县|
雷波县|
水富县|
延川县|
会理县|
清远市|
通城县|
闽侯县|
沂源县|