On Sat, May 26, 2012 at 05:48:15PM +0200, Egon Willighagen wrote:
> On Sat, May 26, 2012 at 5:34 PM, <ralf@...> wrote:
> > OTOH, your Controller code in cdk is too UI-specific,
> controller, controllerawt, etc..
> That is, the code introduces a layer to make sure it is compatible
> with SWT and with Swing mouse events... that is, for each one
> implements the common interface...
Ah I think I see.
> > I think, this really belongs in the app. I agree that cursor is not
> > a Renderer part, so this will lead to redesign, and I might well
> > start with that.
> I have not yet figured out what that patch is actually about... they
> change the cursor under certain situations?
Yes, it's for changing from arrow to hand and back when near certain
molecule parts. It needs a renderPanel to use it, thus the functions
are placed in AtomContainerRenderer where there is access to
However, as there is only one current renderPanel, it should be a
singleton and available to the event code (=state machine) only.
Elementary encapsulation design, the base of OOP.
BTW, it's the same symptom with undo handling: cluttering
functions like ControllerHub::moveBy(). This belongs in
the state machine itself.
> Where I won't have a lot of time for coding, I will support your
> efforts with explaining the CDK/CDK-JChemPaint code and design, make
> sure you talk to the right people, (e.g. meet Arvid who works with the
> Bioclipse team in Uppsala and on the SWT layers and a lot in core
> renderer/controller development too, and he is the key person to talk
> about ensuring we do not sneak in Swing/AWT specific things),
> approving patches for the core CDK library, etc...
Good to know.