pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Moore <dogen.grow...@gmail.com>
Subject Re: Scroll Pane displaying Tabular Data with TableView
Date Thu, 24 Mar 2011 08:13:45 GMT
I am using a TableView.  I was able to get it to update the display by
changing the selection in the TableView, it has a slight flicker affect when
it is updating however.

I like the scrollAreaToVisible() method.  It seams like it would be a much
better method of updating the View than changing the selection.  I will give
it a try instead of the changing the selection, and it would get rid of the
flicker affect.

Thanks!

--
Ryan Moore

On Thu, Mar 24, 2011 at 2:03 AM, Chris Bartlett <cbartlett.x@gmail.com>wrote:

> Ryan,
>
> How are you presenting your data?  Are you using a TableView or TablePane
> or something else?
>
> TablePane has getColumnBounds() and getRowBounds() methods that you might
> use.
> (and a getCellComponent() method)
> http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TablePane.html
>
> TableView has both of these as well as a getCellBounds() method.
> http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TableView.html
>
> Component has a scrollAreaToVisible() method.
>
> http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#scrollAreaToVisible(org.apache.pivot.wtk.Bounds)
> It also has a getBounds() method that can be called on individual
> Components.  You might use this in association with
> Component#mapPointToAncestor() and Component#mapPointFromAncestor methods.
>
> I think you can use the ViewPort#setScrollTop() and
> ViewPort#setScrollLeft() methods, but the Component#scrollAreaToVisible()
> should be simpler.
>
> Chris
>
> On 24 March 2011 14:23, Ryan Moore <dogen.growkin@gmail.com> wrote:
>
>> I have an application where I am displaying Tabular Data in a Scroll
>> Pane.  I would like to have the Scroll Pane move to show what data is being
>> updated.  There will only ever be one element in the row updating at a
>> time.  I do not see a means of updating the positioning of the Scroll Pane,
>> unless that's what the setScrollTop method inherited from ViewPort is used
>> for.  Or would Selecting a row cause it to reposition the View so that the
>> newly selected row is displayed?  I would appreciate any help with this.
>>
>> --
>> Ryan Moore
>>
>
>

Mime
View raw message