Toggle behaviour of cross-table cells? [message #1463229] |
Thu, 06 November 2014 05:37  |
Eclipse User |
|
|
|
Scenario:
A cross-table represents the presence of a link between rows and columns.
Desired behaviour:
If a user clicks an intersection, the cell "toggles" value. This means the link is destroyed (if it existed) or is created (if it didn't exist).
Can such a behaviour be implemented?
Currently we only see the possibility of the user typing some text in the cell, but it is not very intuitive to use that for the desired toggling behaviour.
Thanks,
Johan
|
|
|
Re: Toggle behaviour of cross-table cells? [message #1470394 is a reply to message #1463229] |
Wed, 12 November 2014 04:53  |
Eclipse User |
|
|
|
Hi Johan,
To do that you need a little java code.
In the default cross table implementation, we have a specific
org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy called
org.eclipse.sirius.ui.tools.internal.editor.DTableColumnViewerEditorActivationStrategy
to customize the edition on cell/intersection selection. This default
ColumnViewerEditorActivationStrategy enable edition only on double
click. In your case you want update the model on simple click then you
must provide your own ColumnViewerEditorActivationStrategy to override
our. To see how register your own ColumnViewerEditorActivationStrategy,
look at the end
org.eclipse.sirius.table.ui.tools.internal.editor.DTableViewerManager.createTreeViewer()
method.
Best Regards.
Le 06/11/2014 11:37, Johan Van Noten a écrit :
> Scenario:
> A cross-table represents the presence of a link between rows and columns.
>
> Desired behaviour:
> If a user clicks an intersection, the cell "toggles" value. This means
> the link is destroyed (if it existed) or is created (if it didn't exist).
>
> Can such a behaviour be implemented?
> Currently we only see the possibility of the user typing some text in
> the cell, but it is not very intuitive to use that for the desired
> toggling behaviour.
>
> Thanks,
> Johan
--
Esteban Dugueperoux - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03856 seconds