You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Sandro Martini <sa...@gmail.com> on 2009/08/04 11:48:35 UTC

Alert

Hi to all,
I've seen that Alerts by default have no positioning in the application screen.

Would it be possible to have by default at the center of the application area ?

See the screenshot (in the zip, in attach).


Should i open a ticket in jira ?


Ah, the text error in Bold here in not the best (in my opinion), at
least on Windows.
What do you think ?

Bye,
Sandro

Re: Alert

Posted by Sandro Martini <sa...@gmail.com>.
Hi Todd,

> If you're using a class name that doesn't exist, that sounds like the right exception.
Ok, but probably it's a strange situation that cause the error alert
to display at (0,0) instead of being centered ...

> As to the bold font, the alert's message is bolded, but it's not
> designed (from a graphical design point of view) to hold a long string --
> for that, I'd use the body component.
Ok, my complaint here was only that the Graphic result in this case is
not so good, at least on Windows (see the screenshot in the previous
mail).

Bye

Re: Alert

Posted by Todd Volkert <tv...@gmail.com>.
If you're using a class name that doesn't exist, that sounds like the right
exception.  As to the bold font, the alert's message is bolded, but it's not
designed (from a graphical design point of view) to hold a long string --
for that, I'd use the body component.

On Tue, Aug 4, 2009 at 7:10 AM, Sandro Martini <sa...@gmail.com>wrote:

> I've tried to run a sample with a wrong class name, and this is the
> stacktrace:
>
> java.lang.ClassNotFoundException: org.apache.pivot.wtk.test.FormTestBad
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:169)
>        at
> org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:377)
>
> This is a strange case but useful to have fixed.
>
>
> And on the bold font here, what do you think ?
>
> Bye
>

Re: Alert

Posted by Sandro Martini <sa...@gmail.com>.
I've tried to run a sample with a wrong class name, and this is the stacktrace:

java.lang.ClassNotFoundException: org.apache.pivot.wtk.test.FormTestBad
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:377)

This is a strange case but useful to have fixed.


And on the bold font here, what do you think ?

Bye

Re: Alert

Posted by Todd Volkert <tv...@gmail.com>.
IIRC, alerts will center themselves over their owner.  Is the one in the
example an ownerless alert?

On Tue, Aug 4, 2009 at 5:48 AM, Sandro Martini <sa...@gmail.com>wrote:

> Hi to all,
> I've seen that Alerts by default have no positioning in the application
> screen.
>
> Would it be possible to have by default at the center of the application
> area ?
>
> See the screenshot (in the zip, in attach).
>
>
> Should i open a ticket in jira ?
>
>
> Ah, the text error in Bold here in not the best (in my opinion), at
> least on Windows.
> What do you think ?
>
> Bye,
> Sandro
>

Re: Alert

Posted by Sandro Martini <sa...@gmail.com>.
Great ... today seem a great (bug fixing day) !!

Thanks a lot.
Sandro

Re: Alert

Posted by Greg Brown <gk...@mac.com>.
This was happening because the alert was being opened before the  
display was given a size. I updated DesktopApplicationContext to open  
the host frame before attempting to load the application. The alert is  
now centered.


On Aug 4, 2009, at 11:03 AM, Sandro Martini wrote:

>> I thought that ownerless alerts would center themselves on the  
>> display. Take
>> a look in the Dialog class.
> I think default centering is the right behavior, so my mail with
> probable bug happen in the case showed over, for Alert ... should I
> open a jira ticket ?
>
> Tell me.


Re: Alert

Posted by Sandro Martini <sa...@gmail.com>.
> I thought that ownerless alerts would center themselves on the display. Take
> a look in the Dialog class.
I think default centering is the right behavior, so my mail with
probable bug happen in the case showed over, for Alert ... should I
open a jira ticket ?

Tell me.

Re: Alert

Posted by Greg Brown <gk...@mac.com>.
I thought that ownerless alerts would center themselves on the  
display. Take a look in the Dialog class.

On Aug 4, 2009, at 5:48 AM, Sandro Martini wrote:

> Hi to all,
> I've seen that Alerts by default have no positioning in the  
> application screen.
>
> Would it be possible to have by default at the center of the  
> application area ?
>
> See the screenshot (in the zip, in attach).
>
>
> Should i open a ticket in jira ?
>
>
> Ah, the text error in Bold here in not the best (in my opinion), at
> least on Windows.
> What do you think ?
>
> Bye,
> Sandro
> <pivot_default_alert_test.zip>