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/09/04 12:59:30 UTC

System Tray Support in Pivot Applications

Hi to all,
what do you think on add support for the System Tray (Java 1.6), in
Pivot (Desktop) Applications, maybe for our next major release, the
1.4 (or later ...)  ?

Probably some work could be reused / adapted from the current Menu ...

Add a ticket in JIRA ?

Bye,
Sandro

Re: System Tray Support in Pivot Applications

Posted by Sandro Martini <sa...@gmail.com>.
Ok, I understand the motivations ... but my proposal was to provide
this feature to Pivot Applications, without using directly AWT classes
and methods, and use only Pivot classes, or in this case a wrapper.

But I agree that probably for Pivot this is not a common use case.

Thanks for the discussion.

Sandro

Re: System Tray Support in Pivot Applications

Posted by Greg Brown <gk...@mac.com>.
 From my experience, the system tray is generally used to maintain  
visibility for a larger (often system-level) application that is not  
currently running or showing on screen. I'm not sure that such use  
cases would be common in a Pivot application.

In general, the DesktopApplicationContext window needs to be visible  
in order for a user to interact with a Pivot app. The only time this  
would not be the case is if the host frame is minimized (which  
translates to a suspend() call to the Application). In this case, the  
user *might* want to add an icon to the system tray, but that seems  
unlikely, since the main application window is still visible on the  
screen (albeit, in a minimized state).

I can definitely see a case for *launching* a Pivot application from  
the system tray, but that would require the caller to manually invoke  
DesktopApplicationContext.main(), and this could certainly be done  
from within an AWT-based bootstrap application.

So, my take is that there is not much of value that Pivot could add on  
top of the current JDK system tray support.


On Sep 4, 2009, at 11:02 AM, Todd Volkert wrote:

> But would adding it to Pivot add anything?  The windowing toolkit  
> part of
> Pivot was created to satisfy deficiencies in AWT/Swing.  The  
> collections
> interfaces were created to satisfy deficiencies in the JDK  
> collections.
> Conversely, we decided not to add any Pivot-specific preferences API  
> because
> it already exists in the JDK, and there are no problem with it (I've  
> used
> it, and it's brain-dead simple).  Is there a deficiency in the  
> system tray
> API that you're trying to solve?  If not, then there's no real  
> reason to
> touch it in the platform.
>
> -T
>
> On Fri, Sep 4, 2009 at 10:56 AM, Sandro Martini <sandro.martini@gmail.com 
> >wrote:
>
>> I'm thinking on the ability for Pivot Desktop Applications to gain
>> access to the System Tray, without having to use directly AWT (as in
>> all other Pivot public functions).
>>
>> Then for example we could add/remove and maybe enable/disable
>> application-specific menu elements ... i think should be possible  
>> with
>> the System Tray (I've never used it, sorry).
>>
>> More info needed ?
>> Some are here:
>> http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/
>>
>>
>> Oh, maybe another interesting feature (i don't think it's already
>> implemented) that relies on Java 6 features is the ability for main
>> Windows to have a flag "Always stay over", could be interesting,  
>> right
>> ?
>> Some info here:
>>
>> http://72.5.124.55/javase/6/docs/api/java/awt/Window.html#setAlwaysOnTop%28boolean%29
>> But maybe this could be more complex to do than the benefits it gives
>> ... what do you say ?
>>
>>
>> Bye
>>


Re: System Tray Support in Pivot Applications

Posted by Todd Volkert <tv...@gmail.com>.
But would adding it to Pivot add anything?  The windowing toolkit part of
Pivot was created to satisfy deficiencies in AWT/Swing.  The collections
interfaces were created to satisfy deficiencies in the JDK collections.
Conversely, we decided not to add any Pivot-specific preferences API because
it already exists in the JDK, and there are no problem with it (I've used
it, and it's brain-dead simple).  Is there a deficiency in the system tray
API that you're trying to solve?  If not, then there's no real reason to
touch it in the platform.

-T

On Fri, Sep 4, 2009 at 10:56 AM, Sandro Martini <sa...@gmail.com>wrote:

> I'm thinking on the ability for Pivot Desktop Applications to gain
> access to the System Tray, without having to use directly AWT (as in
> all other Pivot public functions).
>
> Then for example we could add/remove and maybe enable/disable
> application-specific menu elements ... i think should be possible with
> the System Tray (I've never used it, sorry).
>
> More info needed ?
> Some are here:
> http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/
>
>
> Oh, maybe another interesting feature (i don't think it's already
> implemented) that relies on Java 6 features is the ability for main
> Windows to have a flag "Always stay over", could be interesting, right
> ?
> Some info here:
>
> http://72.5.124.55/javase/6/docs/api/java/awt/Window.html#setAlwaysOnTop%28boolean%29
> But maybe this could be more complex to do than the benefits it gives
> ... what do you say ?
>
>
> Bye
>

Re: System Tray Support in Pivot Applications

Posted by Christopher Brind <br...@brindy.org.uk>.
re: systray - where we're providing a Pivot API it is usually because we're
creating something new or providing a better alternative.  There's no scope
for either with Systray from what I can see?
Cheers,
Chris


2009/9/4 Sandro Martini <sa...@gmail.com>

> I'm thinking on the ability for Pivot Desktop Applications to gain
> access to the System Tray, without having to use directly AWT (as in
> all other Pivot public functions).
>
> Then for example we could add/remove and maybe enable/disable
> application-specific menu elements ... i think should be possible with
> the System Tray (I've never used it, sorry).
>
> More info needed ?
> Some are here:
> http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/
>
>
> Oh, maybe another interesting feature (i don't think it's already
> implemented) that relies on Java 6 features is the ability for main
> Windows to have a flag "Always stay over", could be interesting, right
> ?
> Some info here:
>
> http://72.5.124.55/javase/6/docs/api/java/awt/Window.html#setAlwaysOnTop%28boolean%29
> But maybe this could be more complex to do than the benefits it gives
> ... what do you say ?
>
>
> Bye
>

Re: System Tray Support in Pivot Applications

Posted by Greg Brown <gk...@mac.com>.
Can you describe some potential practical use cases?

> I'm thinking on the ability for Pivot Desktop Applications to gain
> access to the System Tray, without having to use directly AWT (as in
> all other Pivot public functions).
>
> Then for example we could add/remove and maybe enable/disable
> application-specific menu elements ... i think should be possible with
> the System Tray (I've never used it, sorry).
>
> More info needed ?
> Some are here: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/
>
>
> Oh, maybe another interesting feature (i don't think it's already
> implemented) that relies on Java 6 features is the ability for main
> Windows to have a flag "Always stay over", could be interesting, right
> ?
> Some info here:
> http://72.5.124.55/javase/6/docs/api/java/awt/Window.html#setAlwaysOnTop%28boolean%29
> But maybe this could be more complex to do than the benefits it gives
> ... what do you say ?
>
>
> Bye


Re: System Tray Support in Pivot Applications

Posted by Sandro Martini <sa...@gmail.com>.
I'm thinking on the ability for Pivot Desktop Applications to gain
access to the System Tray, without having to use directly AWT (as in
all other Pivot public functions).

Then for example we could add/remove and maybe enable/disable
application-specific menu elements ... i think should be possible with
the System Tray (I've never used it, sorry).

More info needed ?
Some are here: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/


Oh, maybe another interesting feature (i don't think it's already
implemented) that relies on Java 6 features is the ability for main
Windows to have a flag "Always stay over", could be interesting, right
?
Some info here:
http://72.5.124.55/javase/6/docs/api/java/awt/Window.html#setAlwaysOnTop%28boolean%29
But maybe this could be more complex to do than the benefits it gives
... what do you say ?


Bye

Re: System Tray Support in Pivot Applications

Posted by Greg Brown <gk...@mac.com>.
Apparently you are correct:

http://developer.apple.com/mac/library/releasenotes/Java/JavaLeopardUpdate1RN/ResolvedIssues/ResolvedIssues.html

See "Radar #5674015".

But I'd still like to get a better understanding of what additional  
value Pivot support might provide over the existing AWT API.


On Sep 4, 2009, at 8:53 AM, Christopher Brind wrote:

> would have to check, but I think on mac systray stuff would end up  
> in the
> notification area on the menu bar at the top of the screen.
>
> In fact is that not the same as ubuntu?
>
> Cheers
> Chris
>
> On Sep 4, 2009 2:39 PM, "Greg Brown" <gk...@mac.com> wrote:
>
> Can you describe in more detail what such support might look like?  
> It seems
> as though the JDK already includes support for accessing the system  
> tray -
> how would Pivot add value to this?
>
> Also note that Mac OS X doesn't have a system tray, so any  
> applications that
> used it would be limited to Windows and Linux.
>
> On Sep 4, 2009, at 6:59 AM, Sandro Martini wrote: > Hi to all, >  
> what do you
> think on add suppor...


Re: System Tray Support in Pivot Applications

Posted by Christopher Brind <br...@brindy.org.uk>.
would have to check, but I think on mac systray stuff would end up in the
notification area on the menu bar at the top of the screen.

In fact is that not the same as ubuntu?

Cheers
Chris

On Sep 4, 2009 2:39 PM, "Greg Brown" <gk...@mac.com> wrote:

Can you describe in more detail what such support might look like? It seems
as though the JDK already includes support for accessing the system tray -
how would Pivot add value to this?

Also note that Mac OS X doesn't have a system tray, so any applications that
used it would be limited to Windows and Linux.

On Sep 4, 2009, at 6:59 AM, Sandro Martini wrote: > Hi to all, > what do you
think on add suppor...

Re: System Tray Support in Pivot Applications

Posted by Greg Brown <gk...@mac.com>.
Can you describe in more detail what such support might look like? It  
seems as though the JDK already includes support for accessing the  
system tray - how would Pivot add value to this?

Also note that Mac OS X doesn't have a system tray, so any  
applications that used it would be limited to Windows and Linux.


On Sep 4, 2009, at 6:59 AM, Sandro Martini wrote:

> Hi to all,
> what do you think on add support for the System Tray (Java 1.6), in
> Pivot (Desktop) Applications, maybe for our next major release, the
> 1.4 (or later ...)  ?
>
> Probably some work could be reused / adapted from the current Menu ...
>
> Add a ticket in JIRA ?
>
> Bye,
> Sandro