Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:19:47+00:00 2026-06-15T13:19:47+00:00

Another similar StackOverflow question helped me up to a point. My TableViewer cells contain

  • 0

Another similar StackOverflow question helped me up to a point.

My TableViewer cells contain boolean widget editors(not your usual check-button widget, but a toggling button, that can be “Checked”/”Unchecked”).

The table must:
– always show the editor when a cell is selected;
– disable the editor when cell focus is lost;
– properly move to the next row when TAB is pressed;

Apparently easy, hard in practice. A lot of listener conflicts (TAB doesn’t really work).

Later edit:

I’ve managed to solved the majority of bugs, but this one bug still boggles my mind. If I change the value of the widget with the mouse, then press TAB to traverse, the focus jumps to the second next row, not the next one. BUT if I change the value of the editor using space bar, then the traversing works just fine; it jumps to the next row as it should.

How should I debug those damn listeners?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:19:48+00:00Added an answer on June 15, 2026 at 1:19 pm

    For ease of development you can use some helper classes in JFace and you will not have to deal with the event handling of tabbing or mouse clicks. Here is a snippet that should help you get started:

    TableViewer viewer = ...
    
    TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(viewer, new FocusCellOwnerDrawHighlighter(viewer));
    
    ColumnViewerEditorActivationStrategy activationSupport = new ColumnViewerEditorActivationStrategy(viewer) {
        protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
            if (event.eventType == ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION) {
                EventObject source = event.sourceEvent;
                if (source instanceof MouseEvent && ((MouseEvent)source).button == 3)
                    return false;
            }
            return super.isEditorActivationEvent(event) || (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR);
        }
    };
    
    TableViewerEditor.create(viewer, focusCellManager, activationSupport, ColumnViewerEditor.TABBING_HORIZONTAL | 
        ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | 
        ColumnViewerEditor.TABBING_VERTICAL |
        ColumnViewerEditor.KEYBOARD_ACTIVATION);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see another question on stackoverflow.com whose title seems similar but that doesnot fulfil
This is similar to another question (http://stackoverflow.com/questions/935556/mysql-dump-by-query) but I hope different enough. I want
Attempting to import a TextProperty, similar to another Stack Overflow question (http://stackoverflow.com/questions/3434090/app-engine-badvalueerror-on-bulk-data-upload-textproperty-being-construed-as-s) After adding
Note: I had another similar question about how to GZIP data using Ruby's zlib
I saw another similar question answered here - Velocity editor plugin for Eclipse? .
I found another similar question: Best way to download images from XML content in
This is very similar to another recent question: How can I return the current
In another question , I asked something similar but I ended up just posting
I am aware of another question that is quite similar, but for some reason
I have another question. Quite similar to the other that i already asked (and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.