That would make sense, though by doing it with the setSelectedIndex() it
highlights the row which introduces that flicker affect that I was talking
about when it was changing the selection.  Using the scrollAreaToVisible()
however would get rid of the flicker.

--
Ryan Moore

On Thu, Mar 24, 2011 at 2:20 AM, Chris Bartlett <[email protected]>wrote:

> I don't have the source in front of me, but TableView#setSelectedIndex()
> most likely results in a call to scrollAreaToVisible() anyway.
>
>
> On 24 March 2011 15:13, Ryan Moore <[email protected]> wrote:
>
>> 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 <[email protected]>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 <[email protected]> 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
>>>>
>>>
>>>
>>
>

Reply via email to