Schuhmacher, Bret | 1 Jan 13:34

Floating panel over the GUI?


Is it possible to have a GUI on which you superimpose a "floating"
panel?  I want to create a status screen on top of my J2ME GUI showing
the status of a long running function (i.e. the initialization of my
app).  I want to put a gauge in this panel and show it on top of my GUI.
I've tried defining the panel and setting its visible flag to false for
the majority of the time, then flipping the flag to true when I want it
to show up, but it still fails to materialize.  I've also tried hiding
my main GUI when I show the new panel; the main GUI hides, but the
status panel never shows.  Any suggestions?

Thanks in advance!

Bret

_________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com 
Stephen Colebourne | 1 Jan 14:46

Re: Floating panel over the GUI?


This is an issue with threading. You have to perform your long running 
function in another thread and update the GUI across threads as you have to 
do in swing.

Stephen

----- Original Message ----- 
From: "Schuhmacher, Bret" <bret.schuhmacher <at> aspect.com>
> Is it possible to have a GUI on which you superimpose a "floating"
> panel?  I want to create a status screen on top of my J2ME GUI showing
> the status of a long running function (i.e. the initialization of my
> app).  I want to put a gauge in this panel and show it on top of my GUI.
> I've tried defining the panel and setting its visible flag to false for
> the majority of the time, then flipping the flag to true when I want it
> to show up, but it still fails to materialize.  I've also tried hiding
> my main GUI when I show the new panel; the main GUI hides, but the
> status panel never shows.  Any suggestions?
>
> Thanks in advance!
>
> Bret
>
>
> _________________________________________________
> Thinlet Project Site    | http://thinlet.com
> Thinlet Addon Central   | http://thinletplus.com
> Thinlet World News Blog | http://thinletworld.com
> Yahoo! Groups Links
>
(Continue reading)

Schuhmacher, Bret | 1 Jan 15:31

RE: Floating panel over the GUI?


I've got the panel with the gauge in a separate thread.  The functions
that do the initialization are in their own thread (and are currently
empty, so they take no time), too.  Why doesn't the *GUI* show up?  I've
got this structure in my XML file:
Desktop
|->tabbedpane
| |_>tab1
| |->tab2
| |->tab3
|->panel
  |->gauge 

I want to be able to pop the panel with the gauge on top of the tabbed
pane GUI at will and have the gauge change (it does - it's in its own
thread and I've tested it).  However, I cannot get *both* the tabbed
pane and the gauge to show simultaneously.  I want to overlay the tabbed
pane with a "floating" status window.  If that's not possible, how do I
get them to alternate?  I've set the visible flags on each (one to true,
one to false), which you'd think would cause one to disappear and the
other to appear, but it doesn't.  Do I need to call a repaint() or
something?

Rgds,

Bret

> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne <at> btopenworld.com] 
> Sent: Saturday, January 01, 2005 8:47 AM
(Continue reading)

sea_sbs | 1 Jan 18:51
Picon
Favicon

Re: Floating panel over the GUI?


Use a modal dialog.  I use this code to display status while 
dialing.  DialupDialog() launches a JNI interface to pppd in another 
thread, while displaying dialup status.  startModal() is from one of 
the Thinlet examples.

--------------------------------------------------------------------
public void dialup() {
	try
	{
		dd = new DialupDialog();
		dialog = parse(IConstants.DIALOG_DIALUP,dd);
		dd.init(this);
		add(dialog);
		startModal(dialog);
	}
	catch (Exception e)
	{
		...
	}
}

/**
* Wait for modal dialog to complete
*/
private void startModal(Object modaldialog) {
try {
	EventQueue queue = getToolkit().getSystemEventQueue();
	while ((getParent(modaldialog) != null) && modaldialog != 
null) {
(Continue reading)

Schuhmacher, Bret | 1 Jan 19:35

RE: Re: Floating panel over the GUI?


Thanks! I'll give that a shot! :-)

Rgds,

Bret 

> -----Original Message-----
> From: sea_sbs [mailto:sea_sbs <at> yahoo.com] 
> Sent: Saturday, January 01, 2005 12:51 PM
> To: thinlet <at> yahoogroups.com
> Subject: [thinlet] Re: Floating panel over the GUI?
> 
> 
> 
> Use a modal dialog.  I use this code to display status while 
> dialing.  DialupDialog() launches a JNI interface to pppd in 
> another thread, while displaying dialup status.  startModal() 
> is from one of the Thinlet examples.
> 
> --------------------------------------------------------------------
> public void dialup() {
> 	try
> 	{
> 		dd = new DialupDialog();
> 		dialog = parse(IConstants.DIALOG_DIALUP,dd);
> 		dd.init(this);
> 		add(dialog);
> 		startModal(dialog);
> 	}
(Continue reading)

Andrzej Bialecki | 1 Jan 22:27

Re: Floating panel over the GUI?


Schuhmacher, Bret wrote:
> I've got the panel with the gauge in a separate thread.  The functions
> that do the initialization are in their own thread (and are currently
> empty, so they take no time), too.  Why doesn't the *GUI* show up?  I've
> got this structure in my XML file:
> Desktop
> |->tabbedpane
> | |_>tab1
> | |->tab2
> | |->tab3
> |->panel
>   |->gauge 

This should have been the "dialog" class, not the panel.

BTW, it's a good practice to use one top-level panel as a container, 
this way you can add as many different elements as you wish without the 
limits imposed by more specific widgets (like the tabbedpane).

Try the following:

Desktop
|->panel (columns=1,weightx=1,weighty=1,halign=fill,valign=fill)
| |->tabbedpane (weightx=1,weighty=1,halign=fill,valign=fill)
| |   |_>tab1
| |   |->tab2
| |   |->tab3
|
|->dialog (columns=1,modal=true,text=Progress...)
(Continue reading)

edross15241 | 2 Jan 16:05
Picon
Favicon

Is there a new versions?


I've been out of the thinlet world for a while now, but a new
application is pending which I think thinlet is a candidate for.

Comment:  I've seen millions of patches, well ok, multiple, about
table columns, skinlets, etc.  Also seen about a billion comments
about refactoring this  thing.

Question: does the current CVS copy have these patches, enhancements,
etc?

Question: is there a new version with refactored code in the works? 
Any time frames?

thanks

Ed

_________________________________________________
Thinlet Project Site    | http://thinlet.com
Thinlet Addon Central   | http://thinletplus.com
Thinlet World News Blog | http://thinletworld.com 
Schuhmacher, Bret | 3 Jan 01:44

RE: Floating panel over the GUI?


Andrzej,

Thanks for the response! Nice to hear from "the man"! :-)  I appreciate
all your work on Thinlet and think it's a great thing - the ability to
easily define a GUI in Java and not have to (re)write a lot of code is
fantastic! :-)

Things just hang indefinitely when I try it your way in my J2ME app.  In
fact, the program fails to progress past the UI load (i.e.
add(parse("thinletdef.xml"))) when I include a Dialog, based on a bunch
of println statements I put in to check its progress...  I don't even
get to the point where I instantiate the dialog - just putting one in my
XML causes the entire GUI to fail to load.  Wonder if they work under
J2ME?  Anyway, I'm sure I'm doing something wrong if it works for you.
:-) I'll keep beating on it until I get it right!

Thanks again!

Rgds,

Bret
A lot of people are afraid of heights.  Not me.  I'm afraid of widths.
		-- Steven Wright

> -----Original Message-----
> From: Andrzej Bialecki [mailto:ab <at> getopt.org] 
> Sent: Saturday, January 01, 2005 4:28 PM
> To: thinlet <at> yahoogroups.com
> Subject: Re: [thinlet] Floating panel over the GUI?
(Continue reading)

Tasnim Ahmed | 4 Jan 05:27
Picon
Favicon

Re: Floating panel over the GUI?


In my application, I have seperate XML files for every dialog, but 
all dialoges are full screen so its a slightly different scenario but 
this approach may work for you.

regards,
-tasnim

--- In thinlet <at> yahoogroups.com, "Schuhmacher, Bret" 
<bret.schuhmacher <at> a...> wrote:
> Andrzej,
> 
> Thanks for the response! Nice to hear from "the man"! :-)  I 
appreciate
> all your work on Thinlet and think it's a great thing - the ability 
to
> easily define a GUI in Java and not have to (re)write a lot of code 
is
> fantastic! :-)
> 
> Things just hang indefinitely when I try it your way in my J2ME 
app.  In
> fact, the program fails to progress past the UI load (i.e.
> add(parse("thinletdef.xml"))) when I include a Dialog, based on a 
bunch
> of println statements I put in to check its progress...  I don't 
even
> get to the point where I instantiate the dialog - just putting one 
in my
> XML causes the entire GUI to fail to load.  Wonder if they work 
(Continue reading)

Andrzej Bialecki | 4 Jan 11:13

Re: Floating panel over the GUI?


Schuhmacher, Bret wrote:
> Andrzej,
> 
> Thanks for the response! Nice to hear from "the man"! :-)  I appreciate
> all your work on Thinlet and think it's a great thing - the ability to
> easily define a GUI in Java and not have to (re)write a lot of code is
> fantastic! :-)

Well, most of this work is Robert's, I'm just preventing it from 
gathering too much bitrot...

> Things just hang indefinitely when I try it your way in my J2ME app.  In
> fact, the program fails to progress past the UI load (i.e.
> add(parse("thinletdef.xml"))) when I include a Dialog, based on a bunch
> of println statements I put in to check its progress...  I don't even
> get to the point where I instantiate the dialog - just putting one in my
> XML causes the entire GUI to fail to load.  Wonder if they work under
> J2ME?  Anyway, I'm sure I'm doing something wrong if it works for you.
> :-) I'll keep beating on it until I get it right!

Hmmm. Ok I didn't make it clear - the ASCII drawing was reflecting the 
final widget hierarchy, not the XML elements...

The top level XUL element must be either a panel or a dialog - you can't 
(I'm not sure why?) put a dialog inside panel directly in XML - you need 
to do this programmatically.

Prepare two XML files. One is as follows:

(Continue reading)


Gmane