i am in a process of making an automation tool. I choose Eclipse RCP to develop that.
i have hardly any knowledge on RCP/swings/UI creation in java but good in core java.
I followed a tutorial from internet and created a simple RCP app which has two views and a simple menu. i have gained knowledge on the basic thing like workbenchadvisor,actionbaradvisor , viewpart and also on dragdroplister.
I want to create simple graphic components on one view which can be dragged and droppped to other view.
what should create the grphical components with ? swings or something else..
and how to implement the dragdrop for that components..
Please help
thanks for the reply i created drag and drop for buttons.i am able build my own figures using GEF but when i include org.eclipse.draw2d package in my project. its throughs error 'Missing constarint:Import Package:org.eclipse.draw2d:version="0.0.0" ' can some one tell me what would have gone wrong and also i have two views. i should be able to move my figures any where in that view. i know this can开发者_如何学C be done in perspectives but not sure how it can be done ![alt text][1]
First of all, when developing an Eclipse RCP application, you don't use Swing. You use SWT.
You use a SWT Canvas widget to draw graphics.
You're going to have to code your own drag and drop, since you're dragging and dropping graphics.
Here's something to get you started with SWT graphics:
Graphics Context - Quick on the draw
SWT Snippets - Do a find on "Drag and Drop".
I'd also add this tutorial about Drag and Drop in SWT Depending on the complexity of the graphics you have to develop I also suggest evaluating GEF and it's graphic library Draw2D: http://www.eclipse.org/gef/
This is a simple tutorial about Draw2D
精彩评论