You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Pierre Jansen <ir...@gmail.com> on 2010/07/10 20:00:40 UTC

Home Page Screenshot

Hi,

with reference to the screenshot on the Pivot home page (
http://pivot.apache.org/images/pivot_screen.jpg);
Is this a screenshot of an actual Pivot application? If so, are the sources
available somewhere? I've been playing around with the TabPane in the
Component Explorer but haven't been able to tweak it to match the visual
representation of the screenshot (I assume this is the component used in the
screenshot).
I'm also intrigued by the tab pane's container, which seems to be some sort
of decorated frame. Is this correct? It also appears to have a textured
background. How is this achieved?

If it is possible to relatively easily create GUI's with this visual
quality, I'm certain that Pivot will become my toolkit of choice going
forward. I'm already extremely impressed by its well-thought-out and
cohesive architecture, including the use of WTKX - kudos to the team!

Regards,

Pierre

Re: Home Page Screenshot

Posted by Pierre Jansen <ir...@gmail.com>.
Thanks a lot for the detailed response - it is much appreciated. I don't
have any immediate requirements for the functionality mentioned, so this
won't be too much of a problem for me at the moment.

Regards,

Pierre

Re: Home Page Screenshot

Posted by Greg Brown <gk...@mac.com>.
>> 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).



Re: Home Page Screenshot

Posted by Pierre Jansen <ir...@gmail.com>.
On Sun, Jul 11, 2010 at 3:05 PM, Greg Brown <gk...@mac.com> wrote:
>
> How would you recommend I go about implementing this L&F? Would I need to
> create my own Theme, perhaps using Terra as a base?
>
>
> Not necessarily, though you can if you want to. If you want to use your
> custom skin for all tab panes in your application, you can just replace the
> default TabPane/skin mapping at application startup. If you want to use this
> skin for only a single tab pane instance, you can create a custom subclass
> of TabPane that simply calls setSkin() in its constructor, passing an
> instance of your custom skin class.
>
> Thanks, I'll  give this a try.

> Could you please also explain the relation between Themes and Skins. Would
> I be correct in saying that, if we had to compare to Swing, Themes would
> equate to LookAndFeels while Skins would equate to UIDelegates (so all the
> Java2D code would sit in the Skin implementations)?
>
>
> Yes, that is correct.
>
> 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).

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)?

Regards,

Pierre


>
> Greg
>
>

Re: Home Page Screenshot

Posted by Greg Brown <gk...@mac.com>.
> How would you recommend I go about implementing this L&F? Would I need to create my own Theme, perhaps using Terra as a base?

Not necessarily, though you can if you want to. If you want to use your custom skin for all tab panes in your application, you can just replace the default TabPane/skin mapping at application startup. If you want to use this skin for only a single tab pane instance, you can create a custom subclass of TabPane that simply calls setSkin() in its constructor, passing an instance of your custom skin class.

> Could you please also explain the relation between Themes and Skins. Would I be correct in saying that, if we had to compare to Swing, Themes would equate to LookAndFeels while Skins would equate to UIDelegates (so all the Java2D code would sit in the Skin implementations)?

Yes, that is correct.

> 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.

Greg


Re: Home Page Screenshot

Posted by Pierre Jansen <ir...@gmail.com>.
How would you recommend I go about implementing this L&F? Would I need to
create my own Theme, perhaps using Terra as a base? Could you please also
explain the relation between Themes and Skins. Would I be correct in saying
that, if we had to compare to Swing, Themes would equate to LookAndFeels
while Skins would equate to UIDelegates (so all the Java2D code would sit in
the Skin implementations)?

Lastly, is it actually possible to create decorated frames with Pivot (like
you would in Swing by setting JFrame.setDefaultLookAndFeelDecorated)?

Thanks a lot,

Pierre

On Sun, Jul 11, 2010 at 12:13 AM, Greg Brown <gk...@mac.com> wrote:

> with reference to the screenshot on the Pivot home page (
> http://pivot.apache.org/images/pivot_screen.jpg);
> Is this a screenshot of an actual Pivot application? If so, are the sources
> available somewhere?
>
>
> No - I actually have no idea where that image came from.  :-)  I never even
> really noticed it until just now. It is a bit misleading - we should
> probably remove it.
>
> If it is possible to relatively easily create GUI's with this visual
> quality, I'm certain that Pivot will become my toolkit of choice going
> forward. I'm already extremely impressed by its well-thought-out and
> cohesive architecture, including the use of WTKX - kudos to the team!
>
>
> Thanks.  :-)
>
> Though that particular L&F isn't currently supported, it wouldn't be
> terribly difficult to write. All Pivot components are rendered using Java2D,
> which is an extremely flexible and powerful drawing API. Those tab buttons
> aren't very complex and could be rendered fairly easily.
>
> G
>
>

Re: Home Page Screenshot

Posted by Greg Brown <gk...@mac.com>.
> with reference to the screenshot on the Pivot home page (http://pivot.apache.org/images/pivot_screen.jpg);
> Is this a screenshot of an actual Pivot application? If so, are the sources available somewhere?

No - I actually have no idea where that image came from.  :-)  I never even really noticed it until just now. It is a bit misleading - we should probably remove it.

> If it is possible to relatively easily create GUI's with this visual quality, I'm certain that Pivot will become my toolkit of choice going forward. I'm already extremely impressed by its well-thought-out and cohesive architecture, including the use of WTKX - kudos to the team!

Thanks.  :-)

Though that particular L&F isn't currently supported, it wouldn't be terribly difficult to write. All Pivot components are rendered using Java2D, which is an extremely flexible and powerful drawing API. Those tab buttons aren't very complex and could be rendered fairly easily.

G