pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: Scroll Pane displaying Tabular Data with TableView
Date Thu, 24 Mar 2011 08:03:07 GMT
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