- changed title to Improve selector: Add close button and allow to drag
- edited description
Improve selector: Add close button and allow to drag
In order for better multi-user support there needs to be a better way to close a selector. Currently this is done by tapping on the background (only in the structural view). However, if two users are using the tool this will cause problems.
I suggest that we add a close button (x) to the selector for closing it. This would also improve the code as currently the DisplayAspectScene
keeps track of all opened selectors to be able to close them. Also, StructuralViewHandler
is receiving the tap event and delegates it to the DisplayAspectScene
. All this code has to be removed once a close button is added.
Furthermore, it would be nice to have the ability to drag the selector as it might hide something the user wants to see.
Comments (14)
-
reporter -
reporter What might be helpful as well is a title that tells the user what the selection is for.
For example: "Select return type for ...", "Select message to call ...", ...
-
-
assigned issue to
-
assigned issue to
-
reporter If we have a close button, it might make sense to add a
selectorClosed
method to theRamSelectorListener
, otherwiseelementSelected
will never be called. This makes it possible to revert something when the selector is closed. -
References issue
#21: Allowed to drag selector→ <<cset d919bb055aba>>
-
References issue
#21: Added close button and AbstractDefaultRamSelectorListener class→ <<cset 5fadc636766e>>
-
References issue
#21: Deleted all removeActiveSelector() calls→ <<cset ab605e44b7e0>>
-
To allow to revert something when the selector is closed, I added a selectorClosed() method in the RamSelectorListener interface. But, in order to simplify the code (because around 15 instances implement this interface with a default behavior when the close button is clicked), I added a AbstractDefaultRamSelectorListener which just destroy the selector. In this way, when you want to add a RamSelectorComponent :
-
you implement the AbstractDefaultRamSelectorListener if the close button just destroy the object, or
-
you implement the RamSelectorListener if the close button has to do something else.
-
-
reporter Very cool! Merci!
Would it be possible to move the close button somewhere else? It forces the search field to become quite small (for example, when creating an implementation class). What would be quite cool is to have it in the right corner. But I am not sure if it is possible to get it there. Maybe by using
setPositionRelativeToParent
(but then it needs to be a child of the selector itself) ...Since you are working on the selector. For some reason there is no space between the search field and the list anymore. I think it should be enough to set a buffer on the south of the input container (
setBufferSize(...)
). -
reporter References issue
#21: Small fixes to the UI:- removed list of active selectors in DisplayAspectScene, because it is not needed anymore
- added buffer to have some space between search field and list in selector
- decreased space between close button and search field
- renamed deleteButton to closeButton
→ <<cset eb60ec1aa435>>
-
reporter References issue
#21: Renamed selectedClosed to closeSelector in interface.→ <<cset fa248533635a>>
-
References issue
#21: Move the close button to the right top corner of the selector→ <<cset c95d96d6644c>>
-
- changed status to resolved
-
reporter References issue
#21: Disabled close button for feature selector.→ <<cset 9472cc275b03>>
- Log in to comment