-
大小: 8.21MB文件类型: .rar金币: 2下载: 0 次发布日期: 2023-10-15
- 语言: Java
- 标签: Java SQL Server2008
资源简介

代码片段和文件信息
package com.swtdesigner;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
/**
* Utility class for managing OS resources associated with SWT controls such as
* colors fonts images etc.
*
* !!! IMPORTANT !!! Application code must explicitly invoke the dispose()
* method to release the operating system resources managed by cached objects
* when those objects and OS resources are no longer needed (e.g. on
* application shutdown)
*
* This class may be freely distributed as part of any application or plugin.
*
* Copyright (c) 2003 - 2005 Instantiations Inc.
All Rights Reserved
*
* @author scheglov_ke
* @author Dan Rubel
*/
public class SWTResourceManager {
/**
* Dispose of cached objects and their underlying OS resources. This should
* only be called when the cached objects are no longer needed (e.g. on
* application shutdown)
*/
public static void dispose() {
disposeColors();
disposeFonts();
disposeImages();
disposeCursors();
}
//////////////////////////////
// Color support
//////////////////////////////
/**
* Maps RGB values to colors
*/
private static HashMap m_ColorMap = new HashMap();
/**
* Returns the system color matching the specific ID
* @param systemColorID int The ID value for the color
* @return Color The system color matching the specific ID
*/
public static Color getColor(int systemColorID) {
Display display = Display.getCurrent();
return display.getSystemColor(systemColorID);
}
/**
* Returns a color given its red green and blue component values
* @param r int The red component of the color
* @param g int The green component of the color
* @param b int The blue component of the color
* @return Color The color matching the given red green and blue componet values
*/
public static Color getColor(int r int g int b) {
return getColor(new RGB(r g b));
}
/**
* Returns a color given its RGB value
* @param rgb RGB The RGB value of the color
* @return Color The color matching the RGB value
*/
public static Color getColor(RGB rgb) {
Color color = m_ColorMap.get(rgb);
if (color == null) {
Display display = Display.getCurrent();
color = new Color(display rgb);
m_ColorMap.put(rgb color);
}
return color;
}
/**
* Dispose of all the cached colors
*/
public static void disposeColors() {
for (Iterator iter = m_ColorMap.values().iterator(); iter.hasNext();)
iter.next().dispose();
m_ColorMap.clear();
}
//////////////////////////////
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 295 2013-12-27 22:55 magazine\.classpath
文件 304 2007-01-13 21:25 magazine\.fatjar
文件 392 2007-01-01 15:10 magazine\.project
文件 598 2013-12-27 22:55 magazine\.settings\org.eclipse.jdt.core.prefs
文件 857 2013-12-27 22:55 magazine\bin\com\swtdesigner\SWTResourceManager$1.class
文件 12989 2013-12-27 22:55 magazine\bin\com\swtdesigner\SWTResourceManager.class
文件 828 2014-01-02 15:45 magazine\bin\magazine\Department_admin$1.class
文件 4761 2014-01-02 15:45 magazine\bin\magazine\Department_admin.class
文件 987 2014-01-01 21:14 magazine\bin\magazine\Magazine_admin$1.class
文件 816 2014-01-01 21:14 magazine\bin\magazine\Magazine_admin$2.class
文件 987 2014-01-01 21:14 magazine\bin\magazine\Magazine_admin$3.class
文件 5673 2014-01-01 21:14 magazine\bin\magazine\Magazine_admin.class
文件 797 2014-01-02 17:03 magazine\bin\magazine\Main_admin$1.class
文件 803 2014-01-02 17:03 magazine\bin\magazine\Main_admin$2.class
文件 791 2014-01-02 17:03 magazine\bin\magazine\Main_admin$3.class
文件 788 2014-01-02 17:03 magazine\bin\magazine\Main_admin$4.class
文件 788 2014-01-02 17:03 magazine\bin\magazine\Main_admin$5.class
文件 791 2014-01-02 17:03 magazine\bin\magazine\Main_admin$6.class
文件 792 2014-01-02 17:03 magazine\bin\magazine\Main_admin$7.class
文件 797 2014-01-02 17:03 magazine\bin\magazine\Main_admin$8.class
文件 3978 2014-01-02 17:03 magazine\bin\magazine\Main_admin.class
文件 798 2014-01-01 21:31 magazine\bin\magazine\Order_admin$1.class
文件 7271 2014-01-01 21:31 magazine\bin\magazine\Order_admin.class
文件 1432 2014-01-03 08:33 magazine\bin\magazine\Order_query$1.class
文件 1084 2014-01-03 08:33 magazine\bin\magazine\Order_query$2.class
文件 798 2014-01-03 08:33 magazine\bin\magazine\Order_query$3.class
文件 1432 2014-01-03 08:33 magazine\bin\magazine\Order_query$4.class
文件 1432 2014-01-03 08:33 magazine\bin\magazine\Order_query$5.class
文件 6590 2014-01-03 08:33 magazine\bin\magazine\Order_query.class
文件 804 2014-01-01 21:39 magazine\bin\magazine\Order_tongji$1.class
............此处省略36个文件信息
相关资源
- 微博系统(Java源码,servlet+jsp),适
- AndroidStudio版直连sqlserver
- java串口通信全套完整代码-导入eclip
- 美食天下项目Android版源码和Web版源码
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- JSP,SQL,MVC的选课系统
- Java编写的qq聊天室
- mysql jsp网站源码下载
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
评论
共有 条评论