Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid Header/Footer: Scrolling
Grid Header/Footer: Scrolling [message #60990] Mon, 08 December 2008 12:45 Go to next message
Tommy Gustafsson is currently offline Tommy Gustafsson
Messages: 12
Registered: July 2009
Junior Member
Hi

I've been trying out the Header/Footer implementation of the Grid and so far
it looks
like a really nice feature. However I've found two small problems regarding
scrolling
in GridHeaderEditor:

1) Firstly GridHeaderEditor adds a selectionlistener that calls layout() to
both the vertical and
the horizontal scrollbar of the Grid. I can understand the horizontal bar
but what's the reason behind the
vertical bar? Since I have a couple of hundred rows and about 20-30
columns with a
columheader attached to each, it really slows down the vertical
scrolling...

2) There seems to be a small bug when using header/footers together with a
RowHeader.
If the column with the header is small enough and you scroll to the
right the header control ends
up in the area handled by the TopLeftRenderer.

Updating the following if statement in the layout() method in the
GridHeaderEditor:

if (rect == null || rect.x < 0)
{
getEditor().setVisible(false);
return;
}
else
{
getEditor().setVisible(true);
}

by adding the following else if:

else
if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
{
getEditor().setVisible(false);
return;
}

Seems to take care of the problem...

Best Regards

/Tommy
Re: Grid Header/Footer: Scrolling [message #61018 is a reply to message #60990] Mon, 08 December 2008 12:52 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Hi Tommy,

Could you file a bug and CC me on it. I've just finished to get a
nightly build up for the HEAD-branch of Grid. Once this is finished I'll
freeze HEAD and make header_footer the HEAD.

Tom

Tommy schrieb:
> Hi
>
> I've been trying out the Header/Footer implementation of the Grid and so far
> it looks
> like a really nice feature. However I've found two small problems regarding
> scrolling
> in GridHeaderEditor:
>
> 1) Firstly GridHeaderEditor adds a selectionlistener that calls layout() to
> both the vertical and
> the horizontal scrollbar of the Grid. I can understand the horizontal bar
> but what's the reason behind the
> vertical bar? Since I have a couple of hundred rows and about 20-30
> columns with a
> columheader attached to each, it really slows down the vertical
> scrolling...
>
> 2) There seems to be a small bug when using header/footers together with a
> RowHeader.
> If the column with the header is small enough and you scroll to the
> right the header control ends
> up in the area handled by the TopLeftRenderer.
>
> Updating the following if statement in the layout() method in the
> GridHeaderEditor:
>
> if (rect == null || rect.x < 0)
> {
> getEditor().setVisible(false);
> return;
> }
> else
> {
> getEditor().setVisible(true);
> }
>
> by adding the following else if:
>
> else
> if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
> {
> getEditor().setVisible(false);
> return;
> }
>
> Seems to take care of the problem...
>
> Best Regards
>
> /Tommy
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid Header/Footer: Scrolling [message #61041 is a reply to message #61018] Mon, 08 December 2008 14:37 Go to previous messageGo to next message
Tommy Gustafsson is currently offline Tommy Gustafsson
Messages: 12
Registered: July 2009
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=257923


"Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
news:ghj59p$rd1$1@build.eclipse.org...
> Hi Tommy,
>
> Could you file a bug and CC me on it. I've just finished to get a
> nightly build up for the HEAD-branch of Grid. Once this is finished I'll
> freeze HEAD and make header_footer the HEAD.
>
> Tom
>
> Tommy schrieb:
> > Hi
> >
> > I've been trying out the Header/Footer implementation of the Grid and so
far
> > it looks
> > like a really nice feature. However I've found two small problems
regarding
> > scrolling
> > in GridHeaderEditor:
> >
> > 1) Firstly GridHeaderEditor adds a selectionlistener that calls layout()
to
> > both the vertical and
> > the horizontal scrollbar of the Grid. I can understand the horizontal
bar
> > but what's the reason behind the
> > vertical bar? Since I have a couple of hundred rows and about 20-30
> > columns with a
> > columheader attached to each, it really slows down the vertical
> > scrolling...
> >
> > 2) There seems to be a small bug when using header/footers together with
a
> > RowHeader.
> > If the column with the header is small enough and you scroll to the
> > right the header control ends
> > up in the area handled by the TopLeftRenderer.
> >
> > Updating the following if statement in the layout() method in the
> > GridHeaderEditor:
> >
> > if (rect == null || rect.x < 0)
> > {
> > getEditor().setVisible(false);
> > return;
> > }
> > else
> > {
> > getEditor().setVisible(true);
> > }
> >
> > by adding the following else if:
> >
> > else
> > if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
> > {
> > getEditor().setVisible(false);
> > return;
> > }
> >
> > Seems to take care of the problem...
> >
> > Best Regards
> >
> > /Tommy
> >
> >
>
>
> --
> B e s t S o l u t i o n . at
> ------------------------------------------------------------ --------
> Tom Schindl JFace-Committer
> ------------------------------------------------------------ --------
Re: Grid Header/Footer: Scrolling [message #61087 is a reply to message #61041] Tue, 09 December 2008 11:49 Go to previous message
Tommy Gustafsson is currently offline Tommy Gustafsson
Messages: 12
Registered: July 2009
Junior Member
Hi again

I noticed another thing regarding the same issue. In my application I'm
using a combo boxes in the header controls to handle filtering of the rows.
The filtering is activated either through selecting a value or by typing
(i.e keylistener). The selection listener works OK but if I'm using the
down/up arrows to cycle through the the items in the combobox the row header
length will adjust itself (I'm calling viewer.refresh in the keylistener)
to the longest header text currently shown. This will make the header
controls bounds fall out of order compared to the columns.

I've handled this by adding a keylistener to the GridHeaderEditor for the
control which calls the layout() method and that seems to be working. But a
better approach might be if this is handled by the GridViewer instead,
making it set the RowHeader width to the longest text for all elements in
the GridViewer and not only the ones that are currently displayed. Then the
RowHeader length will stay fixed as long as the elements don't change.

BR
Tommy





"Tommy" <gusten__79@hotmail.com> wrote in message
news:ghjbfg$97a$1@build.eclipse.org...
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=257923
>
>
> "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
> news:ghj59p$rd1$1@build.eclipse.org...
> > Hi Tommy,
> >
> > Could you file a bug and CC me on it. I've just finished to get a
> > nightly build up for the HEAD-branch of Grid. Once this is finished I'll
> > freeze HEAD and make header_footer the HEAD.
> >
> > Tom
> >
> > Tommy schrieb:
> > > Hi
> > >
> > > I've been trying out the Header/Footer implementation of the Grid and
so
> far
> > > it looks
> > > like a really nice feature. However I've found two small problems
> regarding
> > > scrolling
> > > in GridHeaderEditor:
> > >
> > > 1) Firstly GridHeaderEditor adds a selectionlistener that calls
layout()
> to
> > > both the vertical and
> > > the horizontal scrollbar of the Grid. I can understand the
horizontal
> bar
> > > but what's the reason behind the
> > > vertical bar? Since I have a couple of hundred rows and about
20-30
> > > columns with a
> > > columheader attached to each, it really slows down the vertical
> > > scrolling...
> > >
> > > 2) There seems to be a small bug when using header/footers together
with
> a
> > > RowHeader.
> > > If the column with the header is small enough and you scroll to
the
> > > right the header control ends
> > > up in the area handled by the TopLeftRenderer.
> > >
> > > Updating the following if statement in the layout() method in the
> > > GridHeaderEditor:
> > >
> > > if (rect == null || rect.x < 0)
> > > {
> > > getEditor().setVisible(false);
> > > return;
> > > }
> > > else
> > > {
> > > getEditor().setVisible(true);
> > > }
> > >
> > > by adding the following else if:
> > >
> > > else
> > > if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
> > > {
> > > getEditor().setVisible(false);
> > > return;
> > > }
> > >
> > > Seems to take care of the problem...
> > >
> > > Best Regards
> > >
> > > /Tommy
> > >
> > >
> >
> >
> > --
> > B e s t S o l u t i o n . at
> > ------------------------------------------------------------ --------
> > Tom Schindl JFace-Committer
> > ------------------------------------------------------------ --------
>
>
Re: Grid Header/Footer: Scrolling [message #592865 is a reply to message #60990] Mon, 08 December 2008 12:52 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Hi Tommy,

Could you file a bug and CC me on it. I've just finished to get a
nightly build up for the HEAD-branch of Grid. Once this is finished I'll
freeze HEAD and make header_footer the HEAD.

Tom

Tommy schrieb:
> Hi
>
> I've been trying out the Header/Footer implementation of the Grid and so far
> it looks
> like a really nice feature. However I've found two small problems regarding
> scrolling
> in GridHeaderEditor:
>
> 1) Firstly GridHeaderEditor adds a selectionlistener that calls layout() to
> both the vertical and
> the horizontal scrollbar of the Grid. I can understand the horizontal bar
> but what's the reason behind the
> vertical bar? Since I have a couple of hundred rows and about 20-30
> columns with a
> columheader attached to each, it really slows down the vertical
> scrolling...
>
> 2) There seems to be a small bug when using header/footers together with a
> RowHeader.
> If the column with the header is small enough and you scroll to the
> right the header control ends
> up in the area handled by the TopLeftRenderer.
>
> Updating the following if statement in the layout() method in the
> GridHeaderEditor:
>
> if (rect == null || rect.x < 0)
> {
> getEditor().setVisible(false);
> return;
> }
> else
> {
> getEditor().setVisible(true);
> }
>
> by adding the following else if:
>
> else
> if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
> {
> getEditor().setVisible(false);
> return;
> }
>
> Seems to take care of the problem...
>
> Best Regards
>
> /Tommy
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid Header/Footer: Scrolling [message #592880 is a reply to message #61018] Mon, 08 December 2008 14:37 Go to previous message
Tommy Gustafsson is currently offline Tommy Gustafsson
Messages: 12
Registered: July 2009
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=257923


"Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
news:ghj59p$rd1$1@build.eclipse.org...
> Hi Tommy,
>
> Could you file a bug and CC me on it. I've just finished to get a
> nightly build up for the HEAD-branch of Grid. Once this is finished I'll
> freeze HEAD and make header_footer the HEAD.
>
> Tom
>
> Tommy schrieb:
> > Hi
> >
> > I've been trying out the Header/Footer implementation of the Grid and so
far
> > it looks
> > like a really nice feature. However I've found two small problems
regarding
> > scrolling
> > in GridHeaderEditor:
> >
> > 1) Firstly GridHeaderEditor adds a selectionlistener that calls layout()
to
> > both the vertical and
> > the horizontal scrollbar of the Grid. I can understand the horizontal
bar
> > but what's the reason behind the
> > vertical bar? Since I have a couple of hundred rows and about 20-30
> > columns with a
> > columheader attached to each, it really slows down the vertical
> > scrolling...
> >
> > 2) There seems to be a small bug when using header/footers together with
a
> > RowHeader.
> > If the column with the header is small enough and you scroll to the
> > right the header control ends
> > up in the area handled by the TopLeftRenderer.
> >
> > Updating the following if statement in the layout() method in the
> > GridHeaderEditor:
> >
> > if (rect == null || rect.x < 0)
> > {
> > getEditor().setVisible(false);
> > return;
> > }
> > else
> > {
> > getEditor().setVisible(true);
> > }
> >
> > by adding the following else if:
> >
> > else
> > if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
> > {
> > getEditor().setVisible(false);
> > return;
> > }
> >
> > Seems to take care of the problem...
> >
> > Best Regards
> >
> > /Tommy
> >
> >
>
>
> --
> B e s t S o l u t i o n . at
> ------------------------------------------------------------ --------
> Tom Schindl JFace-Committer
> ------------------------------------------------------------ --------
Re: Grid Header/Footer: Scrolling [message #592904 is a reply to message #61041] Tue, 09 December 2008 11:49 Go to previous message
Tommy Gustafsson is currently offline Tommy Gustafsson
Messages: 12
Registered: July 2009
Junior Member
Hi again

I noticed another thing regarding the same issue. In my application I'm
using a combo boxes in the header controls to handle filtering of the rows.
The filtering is activated either through selecting a value or by typing
(i.e keylistener). The selection listener works OK but if I'm using the
down/up arrows to cycle through the the items in the combobox the row header
length will adjust itself (I'm calling viewer.refresh in the keylistener)
to the longest header text currently shown. This will make the header
controls bounds fall out of order compared to the columns.

I've handled this by adding a keylistener to the GridHeaderEditor for the
control which calls the layout() method and that seems to be working. But a
better approach might be if this is handled by the GridViewer instead,
making it set the RowHeader width to the longest text for all elements in
the GridViewer and not only the ones that are currently displayed. Then the
RowHeader length will stay fixed as long as the elements don't change.

BR
Tommy





"Tommy" <gusten__79@hotmail.com> wrote in message
news:ghjbfg$97a$1@build.eclipse.org...
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=257923
>
>
> "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
> news:ghj59p$rd1$1@build.eclipse.org...
> > Hi Tommy,
> >
> > Could you file a bug and CC me on it. I've just finished to get a
> > nightly build up for the HEAD-branch of Grid. Once this is finished I'll
> > freeze HEAD and make header_footer the HEAD.
> >
> > Tom
> >
> > Tommy schrieb:
> > > Hi
> > >
> > > I've been trying out the Header/Footer implementation of the Grid and
so
> far
> > > it looks
> > > like a really nice feature. However I've found two small problems
> regarding
> > > scrolling
> > > in GridHeaderEditor:
> > >
> > > 1) Firstly GridHeaderEditor adds a selectionlistener that calls
layout()
> to
> > > both the vertical and
> > > the horizontal scrollbar of the Grid. I can understand the
horizontal
> bar
> > > but what's the reason behind the
> > > vertical bar? Since I have a couple of hundred rows and about
20-30
> > > columns with a
> > > columheader attached to each, it really slows down the vertical
> > > scrolling...
> > >
> > > 2) There seems to be a small bug when using header/footers together
with
> a
> > > RowHeader.
> > > If the column with the header is small enough and you scroll to
the
> > > right the header control ends
> > > up in the area handled by the TopLeftRenderer.
> > >
> > > Updating the following if statement in the layout() method in the
> > > GridHeaderEditor:
> > >
> > > if (rect == null || rect.x < 0)
> > > {
> > > getEditor().setVisible(false);
> > > return;
> > > }
> > > else
> > > {
> > > getEditor().setVisible(true);
> > > }
> > >
> > > by adding the following else if:
> > >
> > > else
> > > if(table.getItemHeaderWidth()>0&&table.getItemHeaderWidth() >rect.x)
> > > {
> > > getEditor().setVisible(false);
> > > return;
> > > }
> > >
> > > Seems to take care of the problem...
> > >
> > > Best Regards
> > >
> > > /Tommy
> > >
> > >
> >
> >
> > --
> > B e s t S o l u t i o n . at
> > ------------------------------------------------------------ --------
> > Tom Schindl JFace-Committer
> > ------------------------------------------------------------ --------
>
>
Previous Topic:SWT Ribbon - Alpha 2 Out
Next Topic:[Grid/GridViewer] IndexOutOfBoundsException
Goto Forum:
  


Current Time: Mon Sep 22 04:34:37 GMT 2014

Powered by FUDForum. Page generated in 0.01868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software