[go: up one dir, main page]

Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid - onMouseExit hover question(Grid - onMouseExit hover question)
Grid - onMouseExit hover question [message #997912] Wed, 09 January 2013 01:18 Go to next message
Sean Ruff is currently offline Sean RuffFriend
Messages: 6
Registered: January 2013
Location: Charlotte, NC
Junior Member
I had a quick question about the behavior of the hovering logic of the grid component.

So I've implemented my own GridHeaderRenderer which provides a more Win7 native look and feel. It looks great and works great (almost). My renderer supports 3 different states (mouseover/hover,mousedown/selected,normal). Most of the logic I need is already supported out of the box by extending DefaultColumnHeaderRenderer. The one issue I'm having is detecting then the column header is hovered and the mouse exits the Grid directly from the column header (by moving up).

I believe I've tracked the issue down to one particular piece of logic which I wanted to question here before I open a bug request to make sure my understanding is correct. In the onHoverCell the Grid initializes the hoveringColumnHeader to a valid column (along with other fields). While in the onMouseExist those same hover fields are reset, with the exception of hoveringColumnHeader. Then, when the following logic in the paintHeader method is executed:

                column.getHeaderRenderer().setHover(hoveringColumnHeader == column);


and the setHover for the renderer is set to true (in my use case).

So my question is


  1. Shouldn't hoveringColumnHeader be set to null in the onMouseExit method?


Again, I can open a bug report if changes are needed and even include a patch, if needed.

Additionally I can share the Header Renderer that I have implemented if interested (IIRC there was a request for more "Win7 native" headers here on the forums), while obviously not native it does give the a closer "win7" look.


Thanks for the nebula widgets!
Re: Grid - onMouseExit hover question [message #998175 is a reply to message #997912] Wed, 09 January 2013 13:59 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Sven,

Your conclusion sounds correct. File a bug and attach a patch. If you'd
like to share your Win7-Rendering I'm more than happy to add them to the
Grid-Repository.

Just create a bug for them as well and attach the sources. I guess we'll
have to go through the IP-Process for them.

Tom

Am 09.01.13 14:25, schrieb Sean Ruff:
> I had a quick question about the behavior of the hovering logic of the
> grid component.
> So I've implemented my own GridHeaderRenderer which provides a more Win7
> native look and feel. It looks great and works great (almost). My
> renderer supports 3 different states
> (mouseover/hover,mousedown/selected,normal). Most of the logic I need
> is already supported out of the box by extending
> DefaultColumnHeaderRenderer. The one issue I'm having is detecting then
> the column header is hovered and the mouse exits the Grid directly from
> the column header (by moving up).
>
> I believe I've tracked the issue down to one particular piece of logic
> which I wanted to question here before I open a bug request to make sure
> my understanding is correct. In the onHoverCell the Grid initializes
> the hoveringColumnHeader to a valid column (along with other fields).
> While in the onMouseExist those same hover fields are reset, with the
> exception of hoveringColumnHeader. Then, when the following logic in
> the paintHeader method is executed:
>
> column.getHeaderRenderer().setHover(hoveringColumnHeader
> == column);
>
> and the setHover for the renderer is set to true (in my use case).
> So my question is
>
> Shouldn't hoveringColumnHeader be set to null in the onMouseExit method?
>
>
> Again, I can open a bug report if changes are needed and even include a
> patch, if needed.
> Additionally I can share the Header Renderer that I have implemented if
> interested (IIRC there was a request for more "Win7 native" headers here
> on the forums), while obviously not native it does give the a closer
> "win7" look.
>
>
> Thanks for the nebula widgets!
Re: Grid - onMouseExit hover question [message #998650 is a reply to message #998175] Thu, 10 January 2013 12:36 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
+1 for sharing your win7 header render Smile
Re: Grid - onMouseExit hover question [message #999405 is a reply to message #998650] Sat, 12 January 2013 02:07 Go to previous messageGo to next message
Sean Ruff is currently offline Sean RuffFriend
Messages: 6
Registered: January 2013
Location: Charlotte, NC
Junior Member
Thanks.

398014 created for the onMouseExit issue.

I'll open another bug for the Win7 header as soon as I get column header groups working with it (soon).

Re: Grid - onMouseExit hover question [message #1005522 is a reply to message #997912] Fri, 25 January 2013 23:45 Go to previous messageGo to next message
Sean Ruff is currently offline Sean RuffFriend
Messages: 6
Registered: January 2013
Location: Charlotte, NC
Junior Member
Here's a patch with my updates for Win7 L&F support for Column headers.

I haven't found the time to include support for row headers, though it should be easy enough. While the patch supports Column groups it looks somewhat janky (to me) b/c I couldn't determine how they "should" be renderered in Win7. (Primarily how should the columns adjacent to a column group be renderered - since they have the same height as the group)

Anyway, posting here to see if anyone else finds this patch useful. If so I'll open a bug for possible inclusion with the grid widget.

For an example check out the GridSnippet10.java that is included in the patch or just:

Win7RendererSupport.create(grid).decorate();



Feedback welcome.
Re: Grid - onMouseExit hover question [message #1005590 is a reply to message #1005522] Sat, 26 January 2013 20:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Please create a bugzilla for it, we are not allowe to include code
submitted to newsgroups.

Tom

Am 26.01.13 00:46, schrieb Sean Ruff:
> Here's a patch with my updates for Win7 L&F support for Column headers.
>
> I haven't found the time to include support for row headers, though it should be easy enough. While the patch supports Column groups it looks somewhat janky (to me) b/c I couldn't determine how they "should" be renderered in Win7. (Primarily how should the columns adjacent to a column group be renderered - since they have the same height as the group)
>
> Anyway, posting here to see if anyone else finds this patch useful. If so I'll open a bug for possible inclusion with the grid widget.
>
> For an example check out the GridSnippet10.java that is included in the patch or just:
>
> Win7RendererSupport.create(grid).decorate();
>
>
> Feedback welcome.
>
Re: Grid - onMouseExit hover question [message #1005849 is a reply to message #1005590] Tue, 29 January 2013 03:07 Go to previous messageGo to next message
Sean Ruff is currently offline Sean RuffFriend
Messages: 6
Registered: January 2013
Location: Charlotte, NC
Junior Member
Should I attach it to 265593 or just open a "Win7 specific" issue?

-sean
Re: Grid - onMouseExit hover question [message #1005870 is a reply to message #1005849] Tue, 29 January 2013 07:12 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Open a new bug please.

Tom

Am 29.01.13 04:07, schrieb Sean Ruff:
> Should I attach it to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=265593 or just open a
> "Win7 specific" issue?
>
> -sean
Previous Topic:Non Working Days in Gantt chart
Next Topic:GridTreeViewer's questons
Goto Forum:
  


Current Time: Fri Dec 13 14:52:41 GMT 2024

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

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

Back to the top