Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Need help on JEM and proxy stuffs.

Hi Joe,

Thanks for the quick reply! Here're some more details which might
clarify my problem :

On 월, 2005-08-08 at 20:31 +0100, Joe Winchester wrote:

> So if your classes don't extend AWT or SWT are they Java classes ? 
> At the moment the VE works by having a Java design time
> representation 
> of the parsed code.  Most of the time the design time representation
> is the 
> runtime set of widgets, so if the code is for Swing the design time
> VE  
> uses Swing, SWT uses SWT, etc...  For the cases where the runtime
> isn't Java 
> there is one team extending the VE that have created their own set of
> SWT peers 
> that match those of their runtime, and the reason they can do this is
> because their 
> particular language runtime uses native widgets so SWT was a good
> match. 
> 
> If your runtime isn't Java what is it ?   
> 
Yes, my runtime is in Java, but as they run at server they don't have
direct visual representation. It's a typical RIA(rich internet
application) type GUI toolkit (a bit similar to ULC) which enables
server-side developers to code multi-threaded client-server applications
just as they're coding local AWT or Swing applications.

Here's the 'HelloWorld' example of our toolkit :

public class HelloWorld extends Frame {
  public HelloWorld(Application application, boolean isMainWindow) {
    super(application, isMainWindow);
  }

  protected void addAllComponents() {
    Label label = new Label(new LayoutPlacement(1, 1, 1, 1), "Hello
World!", this);
    label.setWeightY(1);
    label.setWeightX(1);
    label.setFill(Component.FILL_BOTH);

    getMainPanel().addComponent(label);
  }
}

As you can see, it has very similar API with AWT/Swing. The only
difference is that widgets are deployes on server side, so the GUI
server automatically handles communication with the client to create
corresponding AWT widgets on the client side.

The client side API is not public and should not be accessed by
developers, so I need to make VE handle the server side widgets instead
of client side ones. The problem is,

(1) Server side widgets don't have empty public constructor. As you can
see from the above example, all widget classes require reference to top
level window instance of Application(interface) instance as a
constructor argument.

(2) Instantiating server side widgets triggers various native method
calls so it's not possible to do that outside the GUI server. And it's
not viable to startup or communicate with it from Java application.

> >So my question is,
> >(1) Is it possible to extend VE without using the
> >actual target widget instances? (i.e. replacing them
> >with vanilla java beans with similar properties) 
> 
> Yes - I think what you're angling at is the preferred technique to do
> what you want, which is 
> to fake out the target VM so that the design time classes are a set of
> classes that have the same 
> visual characteristics as the runtime, but can piggy back the VE
> framework that allows rendering  
> into GEF and layout manager stuff.

Yes, I don't care about capturing live image since I can emulate visual
aspects with GEF alone. Only problem is that I can't use the real
instance of the class being edited in VE for above mentioned reasons.
I'd be happy if I could just use vanilla Java Beans instead which have
similar properties with the target widget class they're representing.
But I have no idea if it's the best or even viable approach to solve
this problem, or how to begin messing with the target VM classes.

> For the JEM documentation we don't have a lot.  The best place to look
> is probably to do the visual editor tutorial 
> that touches on the model.  There is a tutorial being put together at
> the moment that covers the model in more depth 
> and we'll post to this newsgroup once it is ready for review. 

Sounds great! I'm looking forward to read it as soon as it's avaiable :)


Thanks again for the detailed reply. Feels like finally I'm seeing light
at the end of a long and dark tunnel :)

Best regards,

Xavier Cho


	

	
		
________________________________________________________
무료 1GB용량!, 더 이상 용량 고민없는 - 야후! 메일 (http://mail.yahoo.co.kr) 
최신 휴대폰 정보, 벨소리, 캐릭터, 문자메세지 - 야후! 모바일 (http://kr.mobile.yahoo.com) 
대한민국 블로그가 모인 곳! - 야후! 피플링(http://kr.ring.yahoo.com)


Back to the top