• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Modality API

 
Ranch Hand
Posts: 664
Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Application-modal. An application-modal dialog box blocks all windows from the same application, except for those from its child hierarchy. If several applets are launched in a browser environment, the browser is allowed to treat them either as separate applications or as a single application. The behavior is implementation-dependent."

Would an application-modal be appropriate for an application that requires the user to confirm before doing anything?
Is the attached, which is only being attached for educational purposes, an illustration of the child hierarchy mentioned? Is it complete?
Why do you think it is useful to allow objects in the child hierarchy not to be blocked?
Is there some overriding method() which allows me to switch modes, or would I have to design the application in modeless mode? This is because it is not always the case that I can predict all possible user scenarios, although I do my best to do so

Toolkit-modal. A toolkit-modal dialog box blocks all windows that run in the same toolkit, except those from its child hierarchy. If several applets are launched, all of them run with the same toolkit. Hence, a toolkit-modal dialog box shown from an applet may affect other applets and all windows of the browser instance that embeds the Java runtime environment for this toolkit."

Can you clarify and illustrate with a working example? Is the author referring to particular classes, such as java.awt.Toolkit?

Sourced from here.

Inheritance-hierarchy-for-the-Component-class.JPG
[Thumbnail for Inheritance-hierarchy-for-the-Component-class.JPG]
Inheritance hierarchy for Component class P.370(384)
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Why do you think it is useful to allow objects in the child hierarchy not to be blocked?


You seem to be confusing child with subclass. A component is a child of the container it is housed in. A top level window like a dialog may be parented to another top level window, or may be parentless.

Factor that into your thinking and let us know whether you still have a question
 
Jon Camilleri
Ranch Hand
Posts: 664
Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:

Why do you think it is useful to allow objects in the child hierarchy not to be blocked?


You seem to be confusing child with subclass. A component is a child of the container it is housed in. A top level window like a dialog may be parented to another top level window, or may be parentless.

Factor that into your thinking and let us know whether you still have a question



Yes you're right, hence, a component is a child where I am creating a multiple document interface, such as a word processor, which has various child windows that include word processor documents, contained within the word processor application, as its parent. Since Java is a write once deploy anywhere, can I safely assume that using application modal dialogs will safely use functionality embedded within Windows-based and Unix-based OSs (and perhaps others?).

Have you encountered issues in this regard?

Sorry I keep confusing terminology

Would an application-modal be appropriate for an application that requires the user to confirm before doing anything?
Why do you think it is useful to allow objects in the child hierarchy not to be blocked?
Is there some overriding method() which allows me to switch modes, or would I have to design the application in modeless mode? This is because it is not always the case that I can predict all possible user scenarios, although I do my best to do so

Can you clarify and illustrate with a working example? Is the author referring to particular classes, such as java.awt.Toolkit?
 
Marshal
Posts: 80295
434
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You see that most often with dialogue windows, for example those shown by JOptionPane.
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic