Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » TableTree weirdness and ICursor
TableTree weirdness and ICursor [message #78761] Tue, 22 July 2003 08:46
Eclipse UserFriend
I've read the numerous previous posts on TableTree's and ICursor, and the
JavaDoc page in the Eclipse help. I just want a TableTree where I can
select cells and see what the contents is (from the model). However, when I
use ICursor.getData(), it always returns null. In addition, the cursor
selecting in the table is 'sticky', and if the table is changed while a
cursor is in place it doesn't redraw, leaving 'trails'. It doesn't look
great. My code is attached below:-
------------------------
final TableCursor cursor = new TableCursor(parent.getTable(), SWT.NONE);
cursor.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
parent.getTable().setSelection(new TableItem[] {cursor.getRow()});
}
});

cursor.addMouseListener(new MouseListener() {
public void mouseDown(MouseEvent event) {}
public void mouseUp(MouseEvent event) {}
public void mouseDoubleClick(MouseEvent event) {
Object selCell = cursor.getData();
if (selCell != null) {
System.err.println("not null");
}
}
});
------------------------
Thanks for any help!
jon
Previous Topic:Re: IType.getMethod()
Next Topic:Re: Old posts to this group?
Goto Forum:
  


Current Time: Fri Apr 25 19:41:53 EDT 2025

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

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

Back to the top