Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Toggle behaviour of cross-table cells?
Toggle behaviour of cross-table cells? [message #1463229] Thu, 06 November 2014 10:37 Go to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
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 09:53 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
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
Previous Topic:Create representation exception
Next Topic:Edit Properties for Element-based Edges
Goto Forum:
  


Current Time: Fri Apr 26 15:49:40 GMT 2024

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

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

Back to the top