[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ve-dev] Re: how to add swt widgets to GEF?
|
I totally know your problem. Visual editor is a very complex peace of
software. In my diploma thesis there were a lot of times, where I wanted
to find out how visual editor is doing this and that. Every time I found
new unexpected things.
1. Proxys are used by visual editor to talk to the elements of the
background application. Proxy in this context is not meant as a proxy
server, but as a representative for a remote object. The object is remote
because the background application runs in a different virtual machine.
Perhaps that two different virtual machines are used, because it makes it
easier to fit different gui frameworks in the future.
2-4: I did use getImage(Control control, int maxWidth, int maxHeight,
boolean includeChildren) method of the os-specific ImageCapture classes
(e.g. org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture). The other
ImageCapture class you mentioned is very complex, but not needed when you
don't use a different vm to execute the background application. I also
reduced the class os it has only two methods:
public getImage(Control control, int maxWidth, int maxHeight, boolean
includeChildren)
private Image getImage(Control aControl, int maxWidth, int maxHeight)
After that you can create a Shell (the background application) from your
gef application and take screenshots from it by using the getImage method.
Bye,
Florian
Am 11.07.2007, 19:58 Uhr, schrieb minghui liu <lmhf004@xxxxxxxxx>:
hi:
Thank you very much!
i have checked out the Visual editor's sources from CVS,and find the
place
which you told me .
and i have read the source code of imagecapture for several days.but i
don't know how to use it in my project , ve use lots of java technologes
which i have don't konw ,
1."proxy " --Agents must be used?
2."Control"
Shell shell = new Shell();
captureImage(shell, ......);
is this right?
3.os = new DataOutputStream(vmServer.requestStream(callbackID,
ImageDataConstants.IMAGE_DATA_COLLECTION));
"vmServer" how to init ?
4. org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture or
org.eclipse.ve.internal.swt.targetvm.ImageCapture
which class to be used ?
org.eclipse.ve.internal.swt.targetvm.ImageCapture
class may be used in ve.
can you explain to how to use in detail? i'm very urgent .I have spent a
lot of time in this problem.
thanks
lmh