This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

the term modal  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Professor used the terms modal and non-modal during a GUI design class module.

Would anyone care to elaboarate on the terms for me?

Thanks.
 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If something is "modal" it has "modes". A "mode" is a situation in which you're only allowed to do one thing. For example a "model dialog box" is one that forces you to interact with it, preventing you from using the rest of the application's windows; a non-modal dialog box leaves the windows behind it still responsive.

Another example: most graphics programs are modal; each tool is a mode. In pencil mode you draw pencil lines, in eraser mode you erase, etc.
 
kenji mapes
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, just what i was looking for.
 
kenji mapes
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ugh, forgot to ask. JOptionPanes are mostly non-modal that I know of. How about JDialogs?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually use jdialogs for 100% required input or errors/notices etc...

modality (is that really a word?) can be set by myDialog.setModel(boolean).
 
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by kenji mapes:
Ugh, forgot to ask. JOptionPanes are mostly non-modal that I know of. How about JDialogs?



The only type of dialog generated by JOptionPane that is not modal is a message dialog. The other three are modal: confirm, option and input. JDialog has several constructors and those that do not have parameter for modality are non-modal. Those that do have a parameter for it use the parameter. Any Dialog can have it's modality changed using setModal(boolean).

you should see the JDialog documentation for more information. JOptionPane, regrettably, does not document very well the modality of it's dialogs, but I've already mentioned what each one is.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!