Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to connect model to GUI using JFace?
How to connect model to GUI using JFace? [message #464652] Mon, 28 November 2005 00:34 Go to next message
Grzegorz Zieliñski is currently offline Grzegorz Zieliñski
Messages: 41
Registered: July 2009
Member
Hi.

I have some model class, eg.

public class Contact() {

private String lastName;
private String firstName;

public String getLastName() {
return lastName;
}

public String setLastName(String newName) {
lastName = newName;
}

...

}

How to connect it to the GUI using JFace?
I know I'll have to create interface, add listener registration to Contact()
class,
create content provider class, and use/create some viewer class.
The problem is: how to use TextViewer class? How to actually create text
boxes
on canvas and connect them to the model?

Thank you for quick answer.

Grzegorz Zieliński
g_zielinski<at>intechion.pl
Re: How to connect model to GUI using JFace? [message #464657 is a reply to message #464652] Mon, 28 November 2005 08:15 Go to previous messageGo to next message
Roland Tepp is currently offline Roland Tepp
Messages: 336
Registered: July 2009
Senior Member
You might want to take a look at the "Sweet" framework:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104570

Grzegorz Zieliński kirjutas mulle ühel talvisel päeval midagi seesugust:
> Hi.
>
> I have some model class, eg.
> public class Contact() {
>
> private String lastName;
> private String firstName;
>
> public String getLastName() {
> return lastName;
> }
>
> public String setLastName(String newName) {
> lastName = newName;
> }
>
> ...
>
> }
>
> How to connect it to the GUI using JFace?
> I know I'll have to create interface, add listener registration to
> Contact() class, create content provider class, and use/create some
> viewer class.
> The problem is: how to use TextViewer class? How to actually create text
> boxes on canvas and connect them to the model?
>
> Thank you for quick answer.
>
> Grzegorz Zieliński
> g_zielinski<at>intechion.pl
>
>

--
Roland Tepp
Re: How to connect model to GUI using JFace? [message #464658 is a reply to message #464657] Mon, 28 November 2005 08:17 Go to previous messageGo to next message
Roland Tepp is currently offline Roland Tepp
Messages: 336
Registered: July 2009
Senior Member
Even better documentation could be found at
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-home/databinding-proposal/databinding.html


Roland Tepp kirjutas mulle ühel talvisel päeval midagi seesugust:
> You might want to take a look at the "Sweet" framework:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=104570
>
> Grzegorz Zieliński kirjutas mulle ühel talvisel päeval midagi seesugust:
>> Hi.
>>
>> I have some model class, eg.
>> public class Contact() {
>>
>> private String lastName;
>> private String firstName;
>>
>> public String getLastName() {
>> return lastName;
>> }
>>
>> public String setLastName(String newName) {
>> lastName = newName;
>> }
>>
>> ...
>>
>> }
>>
>> How to connect it to the GUI using JFace?
>> I know I'll have to create interface, add listener registration to
>> Contact() class, create content provider class, and use/create some
>> viewer class.
>> The problem is: how to use TextViewer class? How to actually create
>> text boxes on canvas and connect them to the model?
>>
>> Thank you for quick answer.
>>
>> Grzegorz Zieliński
>> g_zielinski<at>intechion.pl
>>
>>
>

--
Roland Tepp
Re: How to connect model to GUI using JFace? [message #464659 is a reply to message #464658] Mon, 28 November 2005 11:43 Go to previous messageGo to next message
Grzegorz Zieliñski is currently offline Grzegorz Zieliñski
Messages: 41
Registered: July 2009
Member
Hello Roland,

> Even better documentation could be found at
> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-ho
> me/ databinding-proposal/databinding.html
>
> Roland Tepp kirjutas mulle ühel talvisel päeval midagi seesugus t:
>
>> You might want to take a look at the "Sweet" framework:
>> https://bugs.eclipse.org/bugs/show bug.cgi?id=104570
>>

Thank you, this looks great. There is only one problem: if I understand right,

it's still under development and still not implemented. And I have to solve
the problem right now.
Does anybody have example how to use TextViewer?

Grzegorz Zieliński
g_zielinski<at>intechion.pl
Re: How to connect model to GUI using JFace? [message #464916 is a reply to message #464659] Thu, 01 December 2005 11:45 Go to previous message
Roland Tepp is currently offline Roland Tepp
Messages: 336
Registered: July 2009
Senior Member
Oh, but it *is* implemented!

It isn't publicly released yet - yes, but the implementation should be
mostly there.
All you need to do is to check it out from CVS and start using it...
... and if there is something that You need that is not present ... well
that's why it is an OpenSource project ;)

Grzegorz Zieliński kirjutas mulle ühel talvisel päeval midagi seesugust:
> Hello Roland,
>
>> Even better documentation could be found at
>> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-ui-ho
>> me/ databinding-proposal/databinding.html
>>
>> Roland Tepp kirjutas mulle ühel talvisel päeval midagi seesugus t:
>>
>>> You might want to take a look at the "Sweet" framework:
>>> https://bugs.eclipse.org/bugs/show bug.cgi?id=104570
>>>
>
> Thank you, this looks great. There is only one problem: if I understand
> right,
> it's still under development and still not implemented. And I have to
> solve the problem right now.
> Does anybody have example how to use TextViewer?
>
> Grzegorz Zieliński
> g_zielinski<at>intechion.pl
>
>

--
Roland Tepp
Previous Topic:changing FormColors
Next Topic:ViewForm Troubles
Goto Forum:
  


Current Time: Wed Oct 01 08:12:15 GMT 2014

Powered by FUDForum. Page generated in 0.01812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software