The Artima Developer Community
Sponsored Link

Java Buzz Forum
Spring-Rich: Enabling Strategies

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Delap

Posts: 1154
Nickname: scottdelap
Registered: Sep, 2004

Client / Server application developer.
Spring-Rich: Enabling Strategies Posted: Nov 5, 2004 8:39 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Scott Delap.
Original Post: Spring-Rich: Enabling Strategies
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Latest Java Buzz Posts
Latest Java Buzz Posts by Scott Delap
Latest Posts From ClientJava.com

Advertisement

Someone forwarded me a link to this discussion this morning. Things started with a blog post about component enabling strategies:

setEnabled strategies

The crux of Morten 1e00 ’s problem is he has a ton of Swing controls whose enabled state needs to be managed, but no good solution for grouping these controls together into logical chunks that can be managed as a group.

This post has made its way to the Spring-Rich forums. Keith Donald comments on two ways that Spring Rich addresses this problem:

1. We have a "Guarded" interface, consisting of setEnabled(boolean), that almost all "control factories" implement--allowing the easy enablement of compound controls in one call. A control factory is any object that encapsulates the creation of one or more swing controls: things like dialogs, wizards, forms, commands, etc (we much favor composition over inheritence.) There is a "GuardedGroup" helper which makes it easy to adapt any logical group of JComponents to the Guarded interface.

2. Our "command" framework, which adds considerably more power to Swing's action concept, has two major constructs: ActionCommands and CommandGroups -- both "Guarded", and both factories for the underlying gui controls (the former, producing actionable buttons, menu items, check boxes, or radio buttons---the latter, producing menus, button bars, tool bars, status bars, and popups) Calling setEnabled(boolean) on a root command object automatically updates the enabled state for all controls bound to that command. Some of the design here was notably inspired by the work of Andrew Pietsch’s GUI Commands, a quality project that also greatly improves on Swing’s base action framework.

Check out the complete thread for more detail.
Spring-Rich: Enabling Strategies

Read: Spring-Rich: Enabling Strategies

Topic: Can You Spot The Duplications? Previous Topic   Next Topic Topic: Unofficial Guide to Eclipse 3.1 (Part 3)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use