Awesome! That works beautifully - thank you!

> By the way, your app looks great! Can we expect to see Lucene using
> Pivot in the near future?  ;-)

Thanks - I actually hope we will be using Pivot in Lucene soon - I've
been taking a day here and there on weekends to look into making it
happen. There is a Lucene app called Luke that is not officially part of
Lucene because it uses Thinlet for the UI (an LGPL version). For various
reasons, we would really like to get Luke into Lucene officially as a
module, so I am looking into replacing Thinlet. Apache Pivot looks to be
the perfect solution for it - so I have been slowly trying out a port
over. So far I have really enjoyed working with pivot, so I'm likely to
continue. My main energy right now is focused on porting over the basic
functionality - then I'd like to look at how I can improve over what was
done with Thinlet leveraging features in Pivot.

- Mark

On 9/15/10 8:11 PM, Greg Brown wrote:
> I think I see the problem. You are using a BoxPane as the tab
> component. By default, box panes are horizontally-oriented. When
> "fill" is set to true, a horizontal BoxPane will fill in the vertical
> direction. However, you want to fill in the horizontal direction.
> Changing the orientation to vertical (and maintaining the fill style)
> would probably resolve your layout issue. However, a simpler fix
> would be to simply use the Border as the tab component and eliminate
> the BoxPane (a Border always stretches its content to fill the entire
> client area). Let me know if that doesn't work.
> 
> By the way, your app looks great! Can we expect to see Lucene using
> Pivot in the near future?  ;-)
> 
> Greg
> 
> 
> On Sep 15, 2010, at 6:38 PM, Mark Miller wrote:
> 
>> Here it is, along with two screen shots. I am using scroll panes.
>> 
>> Part of my problem is that while I would like the tab pane to
>> stretch the width of the window, it only seems to stretch the width
>> of the longest text line I put in there. The split pane and it's
>> child controls don't seem to push it to the right - but if I make a
>> really long label, the tab pane makes room for it.
>> 
>> The first screenshot shows how things load up - one table and then
>> a box pane with a button and some text. There is also another table
>> to the right that doesn't show though - it's cut off by the tab
>> pane. The second screen shows the table if you slide the split
>> pane.
>> 
>> I'd like everything to expand to the width of the window -
>> width:100% on that tab pane. Or at least create something that
>> looks as nice. I'd also like to see the second table - you can make
>> plenty of room, but I can't get it to show everything in the split
>> page unless I pin the width of the tab pane, or a box pane to some
>> arbitrary large number.
>> 
>> It also doesn't change when I drag the window bigger - you don't
>> see any more of the split pane content - everything stays at a
>> fixed size.
>> 
>> - Mark
>> 
>> On 9/15/10 5:45 PM, Chris Bartlett wrote:
>>> Mark,
>>> 
>>> (I assume that you are using Pivot 1.5.1)
>>> 
>>> http://svn.apache.org/repos/asf/pivot/tags/v1.5.1/tutorials/src/org/apache/pivot/tutorials/explorer/
>>>
>>> 
http://svn.apache.org/repos/asf/pivot/tags/v1.5.1/tools/src/org/apache/pivot/tools/wtk/
>>> 
>>> Can you please attach the WTKX file you are having problems with?
>>> (You might have to put it in a zip for the mailing list to
>>> accept).  It should make it easier to sort this out.
>>> 
>>> 
>>> It sounds like you need one or more ScrollPanes in the mix
>>> somewhere. http://pivot.apache.org/tutorials/scroll-panes.html 
>>> http://pivot.apache.org/1.5.1/docs/api/org/apache/pivot/wtk/ScrollPane.html
>>>
>>>
>>> 
ScrollPanes have 'horizontalScrollBarPolicy' & 'verticalScrollBarPolicy'
>>> properties which affect how preferred widths & heights are
>>> calculated. 
>>> http://pivot.apache.org/1.5.1/docs/api/org/apache/pivot/wtk/ScrollPane.ScrollBarPolicy.html
>>>
>>>
>>> 
I can't find much documentation for the various ScrollBarPolicy values,
>>> so for now I can only think to point you to 
>>> http://svn.apache.org/repos/asf/pivot/tags/v1.5.1/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java
>>>
>>> 
and ask that you search for 'ScrollBarPolicy' and look at the javadoc
>>> comments.
>>> 
>>> One place that you can see the effect of different
>>> ScrollBarPolicy values is in the ComponentExplorer demo. 
>>> Immediately to the left of the 'Properties' tab label, you will
>>> see a menu button which allows you to change the
>>> 'horizontalScrollBarPolicy' & 'verticalScrollBarPolicy' values
>>> used for the Visualization tab.
>>> 
>>> Regards,
>>> 
>>> Chris
>>> 
>>> 
>>> On 16 September 2010 03:00, Mark Miller <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Hmm ... I've taken out all my widths and set maximized to true,
>>> but I'm still having problems. Perhaps It's the components I
>>> have.
>>> 
>>> My top level component is a tab control - but the first tab pane
>>> will only stretch out to the length of some text I have in the
>>> tab pane - it doesn't care how much room the two split panes and
>>> a box pane in the tab might want - it cuts them off if they are
>>> longer than the text - and when you re-size, nothing scales - it
>>> all stays fixed - so you can't even drag a larger window to fully
>>> see the controls.
>>> 
>>> Any chance you could point me to the source of the component 
>>> explorer demo?
>>> 
>>> - Mark
>>> 
>>> On 9/14/10 9:53 PM, Greg Brown wrote:
>>>> Hi Mark,
>>>> 
>>>> Yes, this is definitely possible - in fact, it is Pivot's
>>>> default
>>> layout behavior. You may find the tutorial section on Layout 
>>> Containers helpful:
>>>> 
>>>> http://pivot.apache.org/tutorials/layout-containers.html
>>>> 
>>>> Here's one example:
>>>> 
>>>> http://pivot.apache.org/demos/component-explorer.html
>>>> 
>>>> Unfortunately, if you run it on a Mac, you'll see a flicker
>>>> effect
>>> as you resize the browser window. This is due to a low-level AWT 
>>> issue that can be controlled on Windows (and Linux, I believe)
>>> but not on the Mac.  :-(  It doesn't affect desktop applications,
>>> though - only applets.
>>>> 
>>>> One thing you'll probably want to do is be sure to set the
>>> "maximized" property of your root window to true. Otherwise, the 
>>> window won't expand to take the full width and height of the 
>>> display, and will always assume its preferred size.
>>>> 
>>>> In order to get the fluid resizing behavior in a browser,
>>>> you'll
>>> need to allow the user to resize the applet - this is most
>>> easily done by setting the width and height of the applet to 100%
>>> so it occupies the entire client area of the browser window. When
>>> run as a desktop application, a maximized window will always
>>> resize with the native frame.
>>>> 
>>>> The FAQ entry you mentioned refers to Pivot's ability to scale
>>>> the
>>> UI - try holding down the Control and Shift keys and use the
>>> mouse wheel while the mouse is positioned over a Pivot app.
>>> You'll see what I mean.  :-)
>>>> 
>>>> Hope this helps!
>>>> 
>>>> Greg
>>>> 
>>>>> I've been working with pivot for a little while now
>>>>> (overall,
>>> it's been
>>>>> a nice experience), and I still cannot see how to make a nice
>>>>> UI that scales with the amount of screen real estate
>>>>> available - like most modern desktop applications.
>>>>> 
>>>>> I'd kind of come to the conclusion that this wasn't really
>>>>> possible - and that pivot focused much more on fixed width
>>>>> applet type
>>> applications.
>>>>> 
>>>>> The best I could find was trying to hack around using tables
>>>>> and the ability to do width by percentage with columns - but
>>>>> that doesn't
>>> seem
>>>>> like a hopeful path.
>>>>> 
>>>>> However, looking in the FAQ, I see this:
>>>>> 
>>>>> "Pivot applications are inherently resolution independent.
>>> Bitmapped and
>>>>> vector images are interchangeable, and the entire user
>>>>> interface
>>> can be
>>>>> scaled to take advantage of high-resolution displays or for 
>>>>> accessibility purposes."
>>>>> 
>>>>> This almost sounds like I can make a nice fluid UI that uses
>>>>> the
>>> space
>>>>> available. So what am I missing? The components I am using do
>>>>> not
>>> scale
>>>>> based on window size - something that's quite easy to
>>>>> accomplish with Swing or any other UI tookits I've used.
>>>>> 
>>>>> Any help?
>>>>> 
>>>>> Thanks a lot, great software
>>>>> 
>>>>> - Mark
>>>> 
>>> 
>>> 
>> 
>> <Archive.zip>
> 

Reply via email to