You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Greg Brown <gk...@mac.com> on 2009/06/17 17:33:00 UTC

Re: Standalone Applications not centered in the current Screen (Win XP), and default background

> And last, another little thing:
> by default the background of these applications as a mid gray (
> #C0C0C0 ), not very good (but maybe this is a question of taste).

That's the background of the display. It is configurable via style  
property. I think it should remain gray by default (or at least, not  
white) so it is visually distinct from Windows (whose default  
background color is white).


Re: Standalone Applications not centered in the current Screen (Win XP), and default background

Posted by Sandro Martini <sa...@gmail.com>.
De nada.

Bye

Re: Standalone Applications not centered in the current Screen (Win XP), and default background

Posted by Greg Brown <gk...@mac.com>.
I just removed it and ran most of the tutorials without problems, so I'll check that change in. Thanks for catching this.
 
On Thursday, June 18, 2009, at 11:49AM, "Sandro Martini" <sa...@gmail.com> wrote:
>>>> I've removed a Libraries reference (under Build Path of Tutorials) in Libraries from wtk/src (i think it's wrong here) but isn't enough.
>>
>> Maybe I missed something in your earlier email. What did you have to remove to get your configuration to work?
>In eclipse, go to tutorials subproject, then choose Build Path, then
>under Libraries you can see a reference to wtk/src , i have removed
>this.
>
>Also without removing the setting above all has worked (the trick was
>to save any run configuration in the right subproject and in this case
>under tutorials instead of wtk), but i think it's not useful to have a
>reference from Tutorials to wtk/src in eclipse project settings (could
>confuse).
>But what i say here could be wrong (i have tried and all works also
>with this modification) ... more test could be done (by all us) after
>this.
>
>Tell me if it's not clear ...
>
>Bye,
>Sandro
>
>

Re: Standalone Applications not centered in the current Screen (Win XP), and default background

Posted by Sandro Martini <sa...@gmail.com>.
>>> I've removed a Libraries reference (under Build Path of Tutorials) in Libraries from wtk/src (i think it's wrong here) but isn't enough.
>
> Maybe I missed something in your earlier email. What did you have to remove to get your configuration to work?
In eclipse, go to tutorials subproject, then choose Build Path, then
under Libraries you can see a reference to wtk/src , i have removed
this.

Also without removing the setting above all has worked (the trick was
to save any run configuration in the right subproject and in this case
under tutorials instead of wtk), but i think it's not useful to have a
reference from Tutorials to wtk/src in eclipse project settings (could
confuse).
But what i say here could be wrong (i have tried and all works also
with this modification) ... more test could be done (by all us) after
this.

Tell me if it's not clear ...

Bye,
Sandro

Re: Standalone Applications not centered in the current Screen (Win XP), and default background

Posted by Greg Brown <gk...@mac.com>.
>> I've removed a Libraries reference (under Build Path of Tutorials) in Libraries from wtk/src (i think it's wrong here) but isn't enough.

Maybe I missed something in your earlier email. What did you have to remove to get your configuration to work?


Re: Standalone Applications not centered in the current Screen (Win XP), and default background

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

> I think you mean "theme" vs. "skin". The display has a skin, but it is not part of the installed theme. In many (most?) cases, this shouldn't be a problem, since an application will create a maximized, undecorated window that occupies (and obscures) the entire display background.
Ok, I was trying to change the default behavior for applications
launched form the IDE with a better color (at least aligned with other
defaults in Pivot), but as you say in normal application it's not a
problem ...

>>And for the centering by default what do you say ?
>
> I'd prefer to leave it as-is, since the default position may be dictated by the OS, and the developer can always override it with the command-line arguments.
Ok, the same as written over ...


> I haven't run into this problem. As you said, it is probably an Eclipse configuration issue.
Ok, maybe could help ...

> I've removed a Libraries reference (under Build Path of Tutorials) in Libraries from wtk/src (i think it's wrong here) but isn't enough.
But i think it's better (if is ok, and all works good the same, in my
tests is ok, but i haven't do many other tests) to do this (remove
this entry) in the tutorials eclipse files ... i think it's here since
time, but no more needed.


Bye,
Sandro

Re: Standalone Applications not centered in the current Screen (Win XP), and default background

Posted by Greg Brown <gk...@mac.com>.
>But (if possible) use the default Background color of the Skin (if
>it's available at that moment) ? To have it more in line with the rest
>of application ...

I think you mean "theme" vs. "skin". The display has a skin, but it is not part of the installed theme. In many (most?) cases, this shouldn't be a problem, since an application will create a maximized, undecorated window that occupies (and obscures) the entire display background.

>And for the centering by default what do you say ?

I'd prefer to leave it as-is, since the default position may be dictated by the OS, and the developer can always override it with the command-line arguments.

>One last thing, I've just tried to run from tutorials, the
>KitchenSink, but with DesktopApplicationContext (from eclipse, with
>all sources updated from trunk last night), and it gives to me some
>errors, take a look:
>java.lang.ClassNotFoundException: org.apache.pivot.tutorials.KitchenSink
>	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:274)
>java.lang.NullPointerException
>	at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:76)
>	at java.awt.Window.processEvent(Window.java:1820)
>	at java.awt.Component.dispatchEventImpl(Component.java:4583)
>	at java.awt.Container.dispatchEventImpl(Container.java:2099)
>	at java.awt.Window.dispatchEventImpl(Window.java:2475)
>	at java.awt.Component.dispatchEvent(Component.java:4413)
>	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
>	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>java.lang.NullPointerException
>	at org.apache.pivot.wtk.DesktopApplicationContext.exit(DesktopApplicationContext.java:158)
>	at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:92)
>	at java.awt.Window.processEvent(Window.java:1820)
>	at java.awt.Component.dispatchEventImpl(Component.java:4583)
>	at java.awt.Container.dispatchEventImpl(Container.java:2099)
>	at java.awt.Window.dispatchEventImpl(Window.java:2475)
>	at java.awt.Component.dispatchEvent(Component.java:4413)
>	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
>	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I haven't run into this problem. As you said, it is probably an Eclipse configuration issue.


Re: Standalone Applications not centered in the current Screen (Win XP), and default background

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

>> And last, another little thing:
>> by default the background of these applications as a mid gray (
>> #C0C0C0 ), not very good (but maybe this is a question of taste).
>
> That's the background of the display. It is configurable via style property.
> I think it should remain gray by default (or at least, not white) so it is
> visually distinct from Windows (whose default background color is white).
Ok, I understand.
But (if possible) use the default Background color of the Skin (if
it's available at that moment) ? To have it more in line with the rest
of application ...


And for the centering by default what do you say ?



One last thing, I've just tried to run from tutorials, the
KitchenSink, but with DesktopApplicationContext (from eclipse, with
all sources updated from trunk last night), and it gives to me some
errors, take a look:
java.lang.ClassNotFoundException: org.apache.pivot.tutorials.KitchenSink
	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:274)
java.lang.NullPointerException
	at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:76)
	at java.awt.Window.processEvent(Window.java:1820)
	at java.awt.Component.dispatchEventImpl(Component.java:4583)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4413)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.NullPointerException
	at org.apache.pivot.wtk.DesktopApplicationContext.exit(DesktopApplicationContext.java:158)
	at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(DesktopApplicationContext.java:92)
	at java.awt.Window.processEvent(Window.java:1820)
	at java.awt.Component.dispatchEventImpl(Component.java:4583)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4413)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Looking better at it, it's something related to classloader, probably
it seems a (tutorials) eclipse project setup ...
I've removed a Libraries reference (under Build Path of Tutorials) in
Libraries from wtk/src (i think it's wrong here) but isn't enough.
To fix, i have to manually add a reference to the current (tutorials)
project under the run configuration chosen, under Classpath / User
Entries ... probably something wrong in Eclipse, but know this trick
could be useful also to others.

Solution more simple:
by default Eclipse Run Configurations will be under wtk (because the
main class to run is there), but instead of my previous trick, save in
the right current project (in this case tutorials), and all works good
...


Thanks,
Sandro