Skip to main content

Any way to disable a form

3 replies [Last post]
iaptekar
Offline
Joined: 2009-03-27
Points: 0

I am using the glass pane to display a loading animation. However, I've noticed that the components of the form are still selectable and can be interacted with. Is there a way to disable the form until loading completes or at least redirect all key events?

cheers

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

You can override keyPressed/realeased/repeated &
pointerPressed/released/dragged/hovered to block input.
For this reason we recommend using a dialog for progress, you can make
it transparent to create the same effect and keys would be blocked
simply by the usage of the dialog.
> I am using the glass pane to display a loading animation. However, I've noticed that the components of the form are still selectable and can be interacted with. Is there a way to disable the form until loading completes or at least redirect all key events?
>
> cheers
> [Message sent by forum member 'iaptekar' (iaptekar)]
>
> http://forums.java.net/jive/thread.jspa?messageID=345505
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

iaptekar
Offline
Joined: 2009-03-27
Points: 0

I have an animated gif that i want to display on the dialog. How does this work? If I register the gif with the form won't the modal dialog block the animation?

Shai Almog

Dialogs use invokeAndBlock which while blocking the EDT doesn't "really"
block it and keeps events/painting/animation going. Its somewhat hard to
explain but I tried here:
http://lwuit.blogspot.com/2008/05/invokeandblock-foxtrot-inspired.html
http://lwuit.blogspot.com/2008/05/progress-indicator-threads-in-lwuit.html
> I have an animated gif that i want to display on the dialog. How does this work? If I register the gif with the form won't the modal dialog block the animation?
> [Message sent by forum member 'iaptekar' (iaptekar)]
>
> http://forums.java.net/jive/thread.jspa?messageID=345755
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net