DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page CellModifier does not work in JFace Dialog
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default CellModifier does not work in JFace Dialog - 06-24-2009, 02:24 PM

Does anybody know why the CellModifier interface doesn't work in a tableViewer used in a Dialog? I have a tableviewer, and when I attach a cellmodifier to it, it doesn't even call the canModify method. I believe this is a bug with JFace.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Default 06-25-2009, 12:03 AM

Hi,
Although u have set cell modifier to a tableViewer, u have to set cell editors and column properties to the table viewer, so that the cell modifier will work for the selection of a cell.

Loganathan. S.
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default 06-25-2009, 08:14 AM

Yes, I have that code in place as well. Yet it doesn't work in a class that extends Dialog. It works in my other classes.
Reply With Quote
  (#4 (permalink)) Old
Active Contributor
 
Posts: 62
Thanks: 0
Thanked 6 Times in 6 Posts
Join Date: Jun 2009
Default 06-25-2009, 10:03 PM

maybe check these factors when you are using ICellModifer:
1. you need create TextCellEditor for each column
2. canModify(Object element, String property)method should return true
3. modify(Objecr element, String property, Object value) should process the certain cell data, to do some modify, I suggest to use ArrayList, it could be easier.
4. you should set this modifier to certain TableView

In a word, if there is one mistake in the upper steps, it will leads the consequence which can't work. I tried some times after I set all these thing ready, I didn't see your problem. Wish it could be helpful.


www.eclaxy.com
let's perfect the eclipse!
Reply With Quote
  (#5 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default 06-25-2009, 10:14 PM

My point is that canModify method never gets called. I made sure that TextCellEditor is set for every column in the TableViewer.
Reply With Quote
Reply

Tags
canmodify, cellmodifier, jface dialog, tableviewer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
To open modeless dialog from modal window sandeep.goel Usability 2 02-13-2010 08:51 PM
dragging an image with SWT/JFace bayval Eclipse 1 06-11-2009 01:20 AM
org.eclipse.swt.widgets.Dialog close event ReyMae Eclipse 9 04-13-2009 04:02 AM
Popup dialog box sync with workbench joesusai Eclipse 0 07-24-2008 12:59 AM
Plz Help JFace Wizards (Urgent) ajaydeshwal Java 0 03-28-2008 09:27 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com