On Wed, Nov 13, 2013 at 9:12 PM, Alex Harui <aha...@adobe.com> wrote:
> > > On 11/13/13 8:26 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote: > > >I think I get it, but I guess I will need some pseudo code to understand > >completely. What exactly does 'hang it on a strand' man in this context? > > > >Thanks, > >Om > I looked at the commit diffs again. I missed seeing earlier that you want > to propagate rolloverindex to the List's API surface in order to > communicate that information to the DataGrid. I was thinking that there > can be some other List that represents the List that is a column in the > DG. In theory it can be built out of most of the same pieces as List. > I wanted to do that anyways. Right now, when there is more than a page of data, three scrollbars (for 3 columns) show up. I wanted to create a pared down version of ListView that takes in an optional ScrollBar. And allow the DataGridView to have a scrollbar. Any thoughts on that? > Let's call it DataGridColumnList. That way the List that people stick in > the UI isn't sporting a rollOverIndex property that won't be useful to > them. DataGridColumnList extends UIBase like List but it would have a > different IRollOverBead, one that knows that its strand, which is a > DataGridColumnList, has a parent DataGrid which has a strand which has an > IRollOverModel on its strand, but it isn't the beadModel property. > > So, then I think the pieces are: > > Class RollOverModel implements IRollOverModel > { > Public function get/set rollOverIndex > } > > Class DataGridColumnList extends UIBase > { > Public function get dataGrid():DataGrid > { > return parent; // or whatever > } > } > > /* rollover impl for List */ > Class RollOverBead implements IRollOverBead > { > Var rollOverModel:IRollOverModel; > > Public function set strand(strand:IStrand):void > { > rollOverModel = strand.getBeadByType(IRollOverModel); > addEventListener("rollOver", rollOverHandler); > } > > Function rollOverHandler() > { > // set/unset hovered on renderer > // draw rect highlight > } > } > > /* rollover impl for DataGridColumnList */ > Class DGColumnListRollOverBead implements IRollOverBead > { > Var rollOverModel:IRollOverModel; > > Public function set strand(strand:IStrand):void > { > rollOverModel = strand.dataGrid.getBeadByType(IRollOverModel); > addEventListener("rollOver", rollOverHandler); > } > > > Function rollOverHandler() > { > // set/unset hovered on renderer > // does not draw rect highlight > } > > > } > > /* rollover impl for DataGrid */ > Class DGRollOverBead implements IRollOverBead > { > Var rollOverModel:IRollOverModel; > > Public function set strand(strand:IStrand):void > { > rollOverModel = strand.getBeadByType(IRollOverModel); > addEventListener("rollOver", rollOverHandler); > } > > Function rollOverHandler() > { > // Draws rect highlight across all columns > } > } > > > > Then the CSS: > > List > { > IRollOverBead: ClassReference(RollOverBead); > IRollOverModel: ClassReference(RollOverModel); > } > > DataGridColumnList > { > IRollOverBead: ClassReference(DGColumnListRollOverBead); > } > > DataGrid > { > IRollOverBead: ClassReference(DGRollOverBead); > IRollOverModel: ClassReference(RollOverModel); > } > > This sounds good to me. I will give this a shot and see how things look. Thanks for the pseudo code, makes it clearer to me. > Of course, I could still be wrong... > > Damn, I wish I saw this line first before reading the whole email ;-) Thanks, Om > -Alex > >