1.产生随机颜色
//产生随机颜色
private Color createRandomColor() {
return new Color(null,
(new Double(Math.random() * 128)).intValue() + 128,
(new Double(Math.random() * 128)).intValue() + 128,
(new Double(Math.random() * 128)).intValue() + 128);
}
2.RCP程序的启动过程。。了解这个过程可以大概知道一些配置应该在哪做
1).During the startup of an Eclipse RCP application the Eclipse runtime will evaluate which class is defined via the "org.eclipse.core.runtime.application"extension point.
2).This class will then be loaded. This class creates and runs a Workbench. The Workbench is configured via a WorkbenchAdvisor. The Workbench will start a WorkbenchWindow which is configured via a WorkbenchWindowAdvisor. This WorkbenchWindow will create the toolbar of the application which can get configured at startup via the ActionBarAdvisor.
3).Each adviser allow to configure certain behavior of the application, e.g. the WorkbenchAdvisor allows to perform certain actions at startup or shutdown by overriding the methods preStartUp() and preShutdown().
分享到:
相关推荐
同时,文档还可能包含示例代码和常见问题解答,帮助开发者解决开发过程中遇到的问题。 总之,Eclipse GEF和Draw2D是Eclipse生态中强大的图形编辑工具,结合RCP,可以创建出专业级的图形化应用程序。通过深入研究...
- **操作系统**: Windows XP (Windows 2000用户可能遇到问题,将在后续部分提供解决方案) - **Java Development Kit (JDK)**: 版本1.5及以上,这是为了避免在使用EMF处理XML模型时出现问题。 - **Eclipse**: 版本...
本教程的初衷是解决作者们在开发GEF应用时遇到的诸多问题。在互联网上以及相关书籍(如IBM Redbook)中找到的主要文档更多地集中在GEF的理论概念上,而非具体如何使用GEF类的实际应用案例。因此,本教程旨在通过实际...
虽然也提到了Windows 2000可能会遇到一些问题,但并未具体说明解决方案。对于Windows 2000用户,可能需要额外的研究或寻求社区支持来解决潜在的兼容性问题。 - **JDK版本**: 推荐使用JDK 1.5及以上版本。这是因为较...
尽管在开发过程中可能会遇到一些挑战,但通过本教程提供的指南,可以有效地解决这些问题。 #### 五、参考资料 - [IBM Redbook on GEF](http://www.redbooks.ibm.com/redbooks/pdfs/sg247391.pdf) - [Eclipse GEF...