Login | Register
My pages Projects Community openCollabNet

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author bobtarling
Full name Bob Tarling
Date 2008-12-19 08:05:23 PST
Message 2008/12/19 Dave Thompson <argouml at davet dot org>:
> Contention: Inevitably a new mode implementation will be to add some
> additional functionality on top of the existing feature set. For this reason
> anyone creating a new custom mode will probably want his mode to be first in
> the stack. In an application where everyone assumes that their mode is still
> the first, and takes precedence over the others, we may have a conflict, or
> unexpected behaviour. It probably just means we need to manage this
> carefully, and do thorough regression testing any time we add new Modes.

Yes, that could be a problem. Not so much for a single application
like ArgoUML but more likely for 3rd party module writers.

> Inefficiencies: As I understand it, most of the modes in the stack
> effectively scan the whole of the active diagram in the editor, one Fig at a
> time, in order to see if that Fig was under the mouse for a given click. If
> no event is consumed, the event goes to the next Mode in the stack. My
> concern is that for a large diagram with a lot of modes, there might be a lot
> of scanning before any match was found. This might slow down the UI's
> responsiveness to mouse clicks, worsening the user experience. But we
> needn't worry about this unless it becomes a problem.

Maybe ModeManager should determine the underlying top level Fig and
make that available to each Mode.

I also had an idea for efficient searching of a Layer to find a Fig at
a specific co-ordinate by use of a specialist collection class.

Imagine the layer broken into vertical strips 100 pixels wide. Each
strip has its own Fig collection.

As a Fig is dropped on a layer the layer determines what strips the
Fig overlaps and adds the Fig to each strips collection.

When given a co-ordinate the layer can then determine first which
strip was clicked in and use that smaller collection to find the
actual Fig.

Hopefully the complexities of this can be hidden on a specialist List
class for all Figs in the Layer.

Without knowing we have a need for this it seems complicated
architecture to create for the sake of it though.