pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Home Page Screenshot
Date Sun, 11 Jul 2010 14:31:35 GMT
>> Lastly, is it actually possible to create decorated frames with Pivot (like you would
in Swing by setting JFrame.setDefaultLookAndFeelDecorated)?
> 
> Are you referring to Pivot windows (classes that subclass org.apache.pivot.wtk.Window)
or the native frame that hosts the application? The org.apache.pivot.wtk.Frame class (and
subclasses) include window trim that is consistent with the default Pivot L&F. The host
frame will always use the native trim (it is a subclass of java.awt.Frame), though in Pivot
2.0 it is possible to specify that the host frame should be undecorated.
> 
> I was referring to the frame which hosts the whole application (equivalent of a JFrame),
enabling a consistent, cross-platform trim for Desktop-based applications (would obviously
be irrelevant in an applet context).

There is currently no way to apply a Pivot L&F to the native host window. Pivot is essentially
a self-contained windowing toolkit that runs within a single custom (lightweight) AWT Component,
so it knows nothing about the native frames that enclose it. This is primarily because Pivot
targets both desktop and browser-based applications, where, as you pointed out, there is no
host frame. AFAIK, Flex and Silverlight behave similarly.

In Pivot 2.0, it is possible to create multiple top-level native frames (optionally modal),
each of which hosts its own Pivot display. By placing a maximized, undecorated Pivot window
in each display, you can create a desktop application whose host frames are consistent with
the native L&F (though the content of the frames will use the Pivot L&F).

You can optionally specify that these native host frames are undecorated. This would allow
you to achieve something similar to what you describe - however, dragging or resizing the
Pivot frame does not currently affect the host frame. At least one other user has expressed
an interest in this functionality though, so it may be worth thinking about adding it to the
platform.

> Perhaps related to this is the Java 6u10 support for translucent and shaped windows -
do you also intend supporting this in Pivot 2.0 (I'm not sure how wise this is considering
that this seems specific to the Sun JVM)?

We would like to take advantage of this functionality but we are waiting until it is available
across all platforms (supposedly, this will happen in Java 7).



Mime
View raw message