Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TableViewer
TableViewer [message #445187] Wed, 27 October 2004 17:08 Go to next message
Eclipse UserFriend
Originally posted by: js.ekkono.com

Hi Everybody,

I have a lot of experience with Swing and start to explore SWT/JFace
slowly. So I have a bunch of questions, if you know a place I could look
them up, I would appreciate the pointer.

1) I am trying to create a table where the user can reorder columns
interactively?

2) Is there a standard way to make the configuration of a Table persistent?

3) Why are there properties and column numbers, and why do I have to keep
them in sync manually? Wouldn't it be easier to have only one way of
referencing a column? If properties is the standard way of referencing to
columns in JFace , I think it would be good, if the column indexes would
be hiden inside it. Or is there a reason why not?

Thanks for any help,

js
Re: TableViewer [message #445234 is a reply to message #445187] Fri, 29 October 2004 12:13 Go to previous message
Eclipse UserFriend
Originally posted by: micasim.gmx.de

On Wed, 27 Oct 2004 17:08:17 +0000 (UTC), Joerg Schmuecker <js@ekkono.com>
wrote:

> Hi Everybody,
>
> I have a lot of experience with Swing and start to explore SWT/JFace
> slowly. So I have a bunch of questions, if you know a place I could look
> them up, I would appreciate the pointer.
>
> 1) I am trying to create a table where the user can reorder columns
> interactively?
>
> 2) Is there a standard way to make the configuration of a Table
> persistent?
>
> 3) Why are there properties and column numbers, and why do I have to keep
> them in sync manually? Wouldn't it be easier to have only one way of
> referencing a column? If properties is the standard way of referencing
> to
> columns in JFace , I think it would be good, if the column indexes would
> be hiden inside it. Or is there a reason why not?
>
> Thanks for any help,
>
> js
>
>

Hi Joerg,

1) Use org.eclipse.jface.viewers.TableViewer.setSorter
(org.eclipse.jface.viewers.ViewerSorter sorter) to sort the elements Add a
SelectionListener on the underlying Table to listen for the selection of a
column header, that initiates the sorting.

2) Don't exactly know you mean, but I guess
org.eclipse.jface.preference.[I]PreferenceStore is what you after.

3) I cannot aswer this question, in fact, I'm asking it myself. For me
it's just bad design. You will see it's not the only one in TableViewer /
TreeViewer

some links
<a
href=" http://www.eclipse.org/articles/Article-Table-viewer/table_v iewer.html">Building
and delivering a table editor with SWT/JFace</a>
<a
href=" http://www-106.ibm.com/developerworks/edu/j-dw-java-swing2sw t-i.html">Migrate
your Swing application to SWT</a>
<a
href=" http://www-106.ibm.com/developerworks/java/library/os-ecgui1 /">Using
JFace and SWT in stand-alone mode</a>
<a
href=" http://www-106.ibm.com/developerworks/java/library/os-ecgui2 /">Using
the JFace image registry</a>
<a
href=" http://www-106.ibm.com/developerworks/java/library/os-ecgui3 /">Adding
actions, menus, and toolbars</a>

hope this helps,
Michael
Previous Topic:I meet control paint trouber , pls help me!
Next Topic:CLabel's don't do mnemonics?
Goto Forum:
  


Current Time: Fri Oct 23 03:32:35 GMT 2020

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

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

Back to the top