Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Widget Update Patterns?
SWT Widget Update Patterns? [message #441261] Thu, 12 August 2004 16:33 Go to next message
Eclipse UserFriend
Originally posted by: matthew.hanson.micorp.com

Hi--

I am looking for advise on standardized approaches to notifying more than
one widget in our SWT/JFace app. It seems that there are times when we
will need to modify UI elements (labels, text, images) for disparate parts
of the ApplicationWindow, be it children contained in a Composite (most
often elements from one SashForm updating elements from another), elements
in a Viewer (may or may not require a refresh), elements in a toolbar,
text in the status line, etc.

Hoping a ficticious example may help. The user populates a Text field on
one SashForm and submits a Button. Let's say this action must update a
Label above the button (same Composite), change the status line text, add
a button to the toolbar, change the text on a TabItem child of a Composite
for another SashForm, etc. There are a lot of unrelated UI components
that must be updated.

I haven't found a built-in framework within SWT/JFace that eases this
chained update/notification. Using the listener interface will, of
course, work, but I have nightmares of the maintenance of listener code
that much have knowledge of all of the UI components that need updating
upon the submit of that button.

Is this mess generally use some high-level container with the various
components exposed for update? Configure these relationships via widget
properties, or even configuration files? Or just a lot of code?

Any pointers or references to available information would be appreciated.

Thanks!
Matt Hanson
Re: SWT Widget Update Patterns? [message #441394 is a reply to message #441261] Fri, 13 August 2004 15:16 Go to previous messageGo to next message
Carolyn MacLeod is currently offline Carolyn MacLeodFriend
Messages: 149
Registered: July 2009
Senior Member
I haven't read this book, but maybe these guys have something for you:
http://www.amazon.com/exec/obidos/tg/detail/-/0321205758/qid =1075410339//ref=sr_8_xs_ap_i1_xgl14/102-4141515-1386563?v=g lance&s=books&n=507846
(perhaps in Chapter 34, the SWT chapter)

From a purely SWT perspective, it looks to me like you just gotta write a
lot of code... listeners are the only way you are going to get the user's
input, and if you're the application, you've just got to do the work to
propagate the info... <g>

Good luck,
Carolyn

"Matthew Hanson" <matthew.hanson@micorp.com> wrote in message
news:cfg64r$6lo$1@eclipse.org...
> Hi--
>
> I am looking for advise on standardized approaches to notifying more than
> one widget in our SWT/JFace app. It seems that there are times when we
> will need to modify UI elements (labels, text, images) for disparate parts
> of the ApplicationWindow, be it children contained in a Composite (most
> often elements from one SashForm updating elements from another), elements
> in a Viewer (may or may not require a refresh), elements in a toolbar,
> text in the status line, etc.
>
> Hoping a ficticious example may help. The user populates a Text field on
> one SashForm and submits a Button. Let's say this action must update a
> Label above the button (same Composite), change the status line text, add
> a button to the toolbar, change the text on a TabItem child of a Composite
> for another SashForm, etc. There are a lot of unrelated UI components
> that must be updated.
>
> I haven't found a built-in framework within SWT/JFace that eases this
> chained update/notification. Using the listener interface will, of
> course, work, but I have nightmares of the maintenance of listener code
> that much have knowledge of all of the UI components that need updating
> upon the submit of that button.
>
> Is this mess generally use some high-level container with the various
> components exposed for update? Configure these relationships via widget
> properties, or even configuration files? Or just a lot of code?
>
> Any pointers or references to available information would be appreciated.
>
> Thanks!
> Matt Hanson
>
Re: SWT Widget Update Patterns? [message #441407 is a reply to message #441394] Fri, 13 August 2004 17:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matthew.hanson.micorp.com

Thanks - I'll check it out... Appreciate the help

Carolyn MacLeod wrote:

> I haven't read this book, but maybe these guys have something for you:
>
http://www.amazon.com/exec/obidos/tg/detail/-/0321205758/qid =1075410339//ref=sr_8_xs_ap_i1_xgl14/102-4141515-1386563?v=g lance&s=books&n=507846
> (perhaps in Chapter 34, the SWT chapter)

> From a purely SWT perspective, it looks to me like you just gotta write a
> lot of code... listeners are the only way you are going to get the user's
> input, and if you're the application, you've just got to do the work to
> propagate the info... <g>

> Good luck,
> Carolyn

> "Matthew Hanson" <matthew.hanson@micorp.com> wrote in message
> news:cfg64r$6lo$1@eclipse.org...
> > Hi--
> >
> > I am looking for advise on standardized approaches to notifying more than
> > one widget in our SWT/JFace app. It seems that there are times when we
> > will need to modify UI elements (labels, text, images) for disparate parts
> > of the ApplicationWindow, be it children contained in a Composite (most
> > often elements from one SashForm updating elements from another), elements
> > in a Viewer (may or may not require a refresh), elements in a toolbar,
> > text in the status line, etc.
> >
> > Hoping a ficticious example may help. The user populates a Text field on
> > one SashForm and submits a Button. Let's say this action must update a
> > Label above the button (same Composite), change the status line text, add
> > a button to the toolbar, change the text on a TabItem child of a Composite
> > for another SashForm, etc. There are a lot of unrelated UI components
> > that must be updated.
> >
> > I haven't found a built-in framework within SWT/JFace that eases this
> > chained update/notification. Using the listener interface will, of
> > course, work, but I have nightmares of the maintenance of listener code
> > that much have knowledge of all of the UI components that need updating
> > upon the submit of that button.
> >
> > Is this mess generally use some high-level container with the various
> > components exposed for update? Configure these relationships via widget
> > properties, or even configuration files? Or just a lot of code?
> >
> > Any pointers or references to available information would be appreciated.
> >
> > Thanks!
> > Matt Hanson
> >
Re: SWT Widget Update Patterns? [message #441428 is a reply to message #441394] Sun, 15 August 2004 22:58 Go to previous messageGo to next message
Michael Brown is currently offline Michael BrownFriend
Messages: 20
Registered: July 2009
Junior Member
Here's a couple of other books that look real interesting to me:

http://www.amazon.com/exec/obidos/ASIN/0321256638/qid=109261 0159/sr=2-1/ref=sr_2_1/104-7944631-5743133

http://www.amazon.com/exec/obidos/ASIN/1590593251/qid=109261 0159/sr=2-2/ref=sr_2_2/104-7944631-5743133

These would have a good bit more than 10 pages on SWT and JFace and
presumably be more general than just plugins. I've ordered the second one
and am awaiting delivery. I'm considering also ordering the first.

Mike




"Carolyn MacLeod" <Carolyn_MacLeod@ca.ibm.com> wrote in message
news:cfilqt$mfv$1@eclipse.org...
> I haven't read this book, but maybe these guys have something for you:
>
http://www.amazon.com/exec/obidos/tg/detail/-/0321205758/qid =1075410339//ref=sr_8_xs_ap_i1_xgl14/102-4141515-1386563?v=g lance&s=books&n=507846
> (perhaps in Chapter 34, the SWT chapter)
>
> From a purely SWT perspective, it looks to me like you just gotta write a
> lot of code... listeners are the only way you are going to get the user's
> input, and if you're the application, you've just got to do the work to
> propagate the info... <g>
>
> Good luck,
> Carolyn
>
> "Matthew Hanson" <matthew.hanson@micorp.com> wrote in message
> news:cfg64r$6lo$1@eclipse.org...
> > Hi--
> >
> > I am looking for advise on standardized approaches to notifying more
than
> > one widget in our SWT/JFace app. It seems that there are times when we
> > will need to modify UI elements (labels, text, images) for disparate
parts
> > of the ApplicationWindow, be it children contained in a Composite (most
> > often elements from one SashForm updating elements from another),
elements
> > in a Viewer (may or may not require a refresh), elements in a toolbar,
> > text in the status line, etc.
> >
> > Hoping a ficticious example may help. The user populates a Text field
on
> > one SashForm and submits a Button. Let's say this action must update a
> > Label above the button (same Composite), change the status line text,
add
> > a button to the toolbar, change the text on a TabItem child of a
Composite
> > for another SashForm, etc. There are a lot of unrelated UI components
> > that must be updated.
> >
> > I haven't found a built-in framework within SWT/JFace that eases this
> > chained update/notification. Using the listener interface will, of
> > course, work, but I have nightmares of the maintenance of listener code
> > that much have knowledge of all of the UI components that need updating
> > upon the submit of that button.
> >
> > Is this mess generally use some high-level container with the various
> > components exposed for update? Configure these relationships via widget
> > properties, or even configuration files? Or just a lot of code?
> >
> > Any pointers or references to available information would be
appreciated.
> >
> > Thanks!
> > Matt Hanson
> >
>
>
Re: SWT Widget Update Patterns? [message #441624 is a reply to message #441428] Tue, 17 August 2004 19:39 Go to previous messageGo to next message
Jeff Duska is currently offline Jeff DuskaFriend
Messages: 71
Registered: July 2009
Member
I'd take a look at the Steve Northover and Mike Wilson are the designers
of SWT, so I get there book. I've just started reading it, so far I like
it. I'm not as happy with the SWT and JFace. There is a whole chapter on
using Eclipse for Java development. Huh? I think at the stage you are
writing SWT or JFace code, you understand Eclipse. They do cover JFace,
which Northover and Wilson's books doesn't. This is the only reason, I
didn't return SWT and JFace.

HTH,

Jeff

Michael Brown wrote:
> Here's a couple of other books that look real interesting to me:
>
> http://www.amazon.com/exec/obidos/ASIN/0321256638/qid=109261 0159/sr=2-1/ref=sr_2_1/104-7944631-5743133
>
> http://www.amazon.com/exec/obidos/ASIN/1590593251/qid=109261 0159/sr=2-2/ref=sr_2_2/104-7944631-5743133
>
> These would have a good bit more than 10 pages on SWT and JFace and
> presumably be more general than just plugins. I've ordered the second one
> and am awaiting delivery. I'm considering also ordering the first.
>
> Mike
>
>
>
>
> "Carolyn MacLeod" <Carolyn_MacLeod@ca.ibm.com> wrote in message
> news:cfilqt$mfv$1@eclipse.org...
>
>>I haven't read this book, but maybe these guys have something for you:
>>
>
> http://www.amazon.com/exec/obidos/tg/detail/-/0321205758/qid =1075410339//ref=sr_8_xs_ap_i1_xgl14/102-4141515-1386563?v=g lance&s=books&n=507846
>
>>(perhaps in Chapter 34, the SWT chapter)
>>
>>From a purely SWT perspective, it looks to me like you just gotta write a
>>lot of code... listeners are the only way you are going to get the user's
>>input, and if you're the application, you've just got to do the work to
>>propagate the info... <g>
>>
>>Good luck,
>>Carolyn
>>
>>"Matthew Hanson" <matthew.hanson@micorp.com> wrote in message
>>news:cfg64r$6lo$1@eclipse.org...
>>
>>>Hi--
>>>
>>>I am looking for advise on standardized approaches to notifying more
>
> than
>
>>>one widget in our SWT/JFace app. It seems that there are times when we
>>>will need to modify UI elements (labels, text, images) for disparate
>
> parts
>
>>>of the ApplicationWindow, be it children contained in a Composite (most
>>>often elements from one SashForm updating elements from another),
>
> elements
>
>>>in a Viewer (may or may not require a refresh), elements in a toolbar,
>>>text in the status line, etc.
>>>
>>>Hoping a ficticious example may help. The user populates a Text field
>
> on
>
>>>one SashForm and submits a Button. Let's say this action must update a
>>>Label above the button (same Composite), change the status line text,
>
> add
>
>>>a button to the toolbar, change the text on a TabItem child of a
>
> Composite
>
>>>for another SashForm, etc. There are a lot of unrelated UI components
>>>that must be updated.
>>>
>>>I haven't found a built-in framework within SWT/JFace that eases this
>>>chained update/notification. Using the listener interface will, of
>>>course, work, but I have nightmares of the maintenance of listener code
>>>that much have knowledge of all of the UI components that need updating
>>>upon the submit of that button.
>>>
>>>Is this mess generally use some high-level container with the various
>>>components exposed for update? Configure these relationships via widget
>>>properties, or even configuration files? Or just a lot of code?
>>>
>>>Any pointers or references to available information would be
>
> appreciated.
>
>>>Thanks!
>>>Matt Hanson
>>>
>>
>>
>
>
Re: SWT Widget Update Patterns? [message #441666 is a reply to message #441624] Thu, 19 August 2004 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matthew.hanson.micorp.com

Does the SWT book offer any best practices on structural organization for
widget updates and notifications? I am mainly trying to bring some
reusability to the UI, rather than just providing references to every
widget updatee to every widget updater that might need it. If you come
across anything in the books, I would appreciate the info and consider
making the purchase.

Thanks!
Matt Hanson

Jeff Duska wrote:

> I'd take a look at the Steve Northover and Mike Wilson are the designers
> of SWT, so I get there book. I've just started reading it, so far I like
> it. I'm not as happy with the SWT and JFace. There is a whole chapter on
> using Eclipse for Java development. Huh? I think at the stage you are
> writing SWT or JFace code, you understand Eclipse. They do cover JFace,
> which Northover and Wilson's books doesn't. This is the only reason, I
> didn't return SWT and JFace.

> HTH,

> Jeff

> Michael Brown wrote:
> > Here's a couple of other books that look real interesting to me:
> >
> >
http://www.amazon.com/exec/obidos/ASIN/0321256638/qid=109261 0159/sr=2-1/ref=sr_2_1/104-7944631-5743133
> >
> >
http://www.amazon.com/exec/obidos/ASIN/1590593251/qid=109261 0159/sr=2-2/ref=sr_2_2/104-7944631-5743133
> >
> > These would have a good bit more than 10 pages on SWT and JFace and
> > presumably be more general than just plugins. I've ordered the second one
> > and am awaiting delivery. I'm considering also ordering the first.
> >
> > Mike
> >
> >
> >
> >
> > "Carolyn MacLeod" <Carolyn_MacLeod@ca.ibm.com> wrote in message
> > news:cfilqt$mfv$1@eclipse.org...
> >
> >>I haven't read this book, but maybe these guys have something for you:
> >>
> >
> >
http://www.amazon.com/exec/obidos/tg/detail/-/0321205758/qid =1075410339//ref=sr_8_xs_ap_i1_xgl14/102-4141515-1386563?v=g lance&s=books&n=507846
> >
> >>(perhaps in Chapter 34, the SWT chapter)
> >>
> >>From a purely SWT perspective, it looks to me like you just gotta write a
> >>lot of code... listeners are the only way you are going to get the user's
> >>input, and if you're the application, you've just got to do the work to
> >>propagate the info... <g>
> >>
> >>Good luck,
> >>Carolyn
> >>
> >>"Matthew Hanson" <matthew.hanson@micorp.com> wrote in message
> >>news:cfg64r$6lo$1@eclipse.org...
> >>
> >>>Hi--
> >>>
> >>>I am looking for advise on standardized approaches to notifying more
> >
> > than
> >
> >>>one widget in our SWT/JFace app. It seems that there are times when we
> >>>will need to modify UI elements (labels, text, images) for disparate
> >
> > parts
> >
> >>>of the ApplicationWindow, be it children contained in a Composite (most
> >>>often elements from one SashForm updating elements from another),
> >
> > elements
> >
> >>>in a Viewer (may or may not require a refresh), elements in a toolbar,
> >>>text in the status line, etc.
> >>>
> >>>Hoping a ficticious example may help. The user populates a Text field
> >
> > on
> >
> >>>one SashForm and submits a Button. Let's say this action must update a
> >>>Label above the button (same Composite), change the status line text,
> >
> > add
> >
> >>>a button to the toolbar, change the text on a TabItem child of a
> >
> > Composite
> >
> >>>for another SashForm, etc. There are a lot of unrelated UI components
> >>>that must be updated.
> >>>
> >>>I haven't found a built-in framework within SWT/JFace that eases this
> >>>chained update/notification. Using the listener interface will, of
> >>>course, work, but I have nightmares of the maintenance of listener code
> >>>that much have knowledge of all of the UI components that need updating
> >>>upon the submit of that button.
> >>>
> >>>Is this mess generally use some high-level container with the various
> >>>components exposed for update? Configure these relationships via widget
> >>>properties, or even configuration files? Or just a lot of code?
> >>>
> >>>Any pointers or references to available information would be
> >
> > appreciated.
> >
> >>>Thanks!
> >>>Matt Hanson
> >>>
> >>
> >>
> >
> >
Re: SWT Widget Update Patterns? [message #441687 is a reply to message #441624] Thu, 19 August 2004 20:56 Go to previous message
Michael Brown is currently offline Michael BrownFriend
Messages: 20
Registered: July 2009
Junior Member
Aye, I'll probably get that book as well. I started with the SWT/JFace book
because, while both books got good Amazon reviews, only one of them appeared
to cover both SWT and JFace.

The chapter on Eclipse development may be more useful to me than you
suspect. I'm wrapping up my first Java development project and there has
been a lot of new ground for me to cover, including Java, SWT, Eclipse, web
services (client side), cross-platform issues, Solaris CDE/Gnome, and
MacOSX. So at least in my case, I wasn't already intimately familiar with
Eclipse (or any of the rest of it) when I started dealing with SWT. I've
got 25 years of experience as a professional developer, but this was a new
arena for me to play in.

Mike


"Jeff Duska" <Jeff.Duska@noaa.gov> wrote in message
news:cftmm8$273$1@eclipse.org...
> I'd take a look at the Steve Northover and Mike Wilson are the designers
> of SWT, so I get there book. I've just started reading it, so far I like
> it. I'm not as happy with the SWT and JFace. There is a whole chapter on
> using Eclipse for Java development. Huh? I think at the stage you are
> writing SWT or JFace code, you understand Eclipse. They do cover JFace,
> which Northover and Wilson's books doesn't. This is the only reason, I
> didn't return SWT and JFace.
>
> HTH,
>
> Jeff
>
> Michael Brown wrote:
> > Here's a couple of other books that look real interesting to me:
> >
> >
http://www.amazon.com/exec/obidos/ASIN/0321256638/qid=109261 0159/sr=2-1/ref=sr_2_1/104-7944631-5743133
> >
> >
http://www.amazon.com/exec/obidos/ASIN/1590593251/qid=109261 0159/sr=2-2/ref=sr_2_2/104-7944631-5743133
> >
> > These would have a good bit more than 10 pages on SWT and JFace and
> > presumably be more general than just plugins. I've ordered the second
one
> > and am awaiting delivery. I'm considering also ordering the first.
> >
> > Mike
> >
> >
> >
> >
> > "Carolyn MacLeod" <Carolyn_MacLeod@ca.ibm.com> wrote in message
> > news:cfilqt$mfv$1@eclipse.org...
> >
> >>I haven't read this book, but maybe these guys have something for you:
> >>
> >
> >
http://www.amazon.com/exec/obidos/tg/detail/-/0321205758/qid =1075410339//ref=sr_8_xs_ap_i1_xgl14/102-4141515-1386563?v=g lance&s=books&n=507846
> >
> >>(perhaps in Chapter 34, the SWT chapter)
> >>
> >>From a purely SWT perspective, it looks to me like you just gotta write
a
> >>lot of code... listeners are the only way you are going to get the
user's
> >>input, and if you're the application, you've just got to do the work to
> >>propagate the info... <g>
> >>
> >>Good luck,
> >>Carolyn
> >>
> >>"Matthew Hanson" <matthew.hanson@micorp.com> wrote in message
> >>news:cfg64r$6lo$1@eclipse.org...
> >>
> >>>Hi--
> >>>
> >>>I am looking for advise on standardized approaches to notifying more
> >
> > than
> >
> >>>one widget in our SWT/JFace app. It seems that there are times when we
> >>>will need to modify UI elements (labels, text, images) for disparate
> >
> > parts
> >
> >>>of the ApplicationWindow, be it children contained in a Composite (most
> >>>often elements from one SashForm updating elements from another),
> >
> > elements
> >
> >>>in a Viewer (may or may not require a refresh), elements in a toolbar,
> >>>text in the status line, etc.
> >>>
> >>>Hoping a ficticious example may help. The user populates a Text field
> >
> > on
> >
> >>>one SashForm and submits a Button. Let's say this action must update a
> >>>Label above the button (same Composite), change the status line text,
> >
> > add
> >
> >>>a button to the toolbar, change the text on a TabItem child of a
> >
> > Composite
> >
> >>>for another SashForm, etc. There are a lot of unrelated UI components
> >>>that must be updated.
> >>>
> >>>I haven't found a built-in framework within SWT/JFace that eases this
> >>>chained update/notification. Using the listener interface will, of
> >>>course, work, but I have nightmares of the maintenance of listener code
> >>>that much have knowledge of all of the UI components that need updating
> >>>upon the submit of that button.
> >>>
> >>>Is this mess generally use some high-level container with the various
> >>>components exposed for update? Configure these relationships via
widget
> >>>properties, or even configuration files? Or just a lot of code?
> >>>
> >>>Any pointers or references to available information would be
> >
> > appreciated.
> >
> >>>Thanks!
> >>>Matt Hanson
> >>>
> >>
> >>
> >
> >
Previous Topic:Table columns with sort indicators
Next Topic:Nested popups
Goto Forum:
  


Current Time: Fri Apr 26 08:00:13 GMT 2024

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

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

Back to the top