Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2007

Tip: Looking for answers? Try searching our database.

How to best organize GUI app

Thread view: 
Andrey Chernyh - 22 Jan 2007 05:46 GMT
Hi All!

I have to continue working on previously existing Java GUI app.
it has tool bar, menu and map area with objects.

I'm now looking for good solution for how to organize events/state
handling inside the app.
It can work in several states:
logged in, logged out, showing current objects state on the map,
showing movements history on the map.

Main question: how to best handle changes of the app state to
enable/disable controls and update statuses?

Right now there is a periodically executed task (each 100 ms) that
updates state of controls in the app.
The code looks like:
toolbar.setEnabled( isHistoryMode && loggedIn );

I think it is ugly to have such code and going to define
event/listeners for app state changes:
login/logout,
change mode to history/normal
etc.
Will setup listeners right on app start.

What can you say?

Thanks in advance.
Michael Rauscher - 22 Jan 2007 05:55 GMT
Andrey Chernyh schrieb:
> Hi All!
>
[quoted text clipped - 12 lines]
> Right now there is a periodically executed task (each 100 ms) that
> updates state of controls in the app.

Uuh. That's really hard :) Have a look at [1].

Bye
Michael

[1] http://www.martinfowler.com/eaaDev/OrganizingPresentations.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.