[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fenfire-dev] NodeTypeManager

From: Asko Soukka
Subject: Re: [Fenfire-dev] NodeTypeManager
Date: Mon, 8 Sep 2003 15:55:38 +0300 (EEST)

Sat, 6 Sep 2003, Tuomas Lukka kirjoitti:
> > Preliminarily it looks at least for me that FenPDF's Views class could 
> > handle also nodetype dependend keybindings. Views get a current 
> > EventHandler as constructor parameter and passes it on to BuoyManager 
> > constructor. Then Views.setFocus() is called always to set the new 
> > MainNode. I guess, there we could check the type of the new mainnode and 
> > fetch it's keybindings from NodeTypeManager (getEventHandler()?).
> But there are also global ones.
> And I'd like to keep the views as separate as possible from the actions.
> How about having identifiers for the node types used 
> ("CANVAS", "PAGESCROLL", "IMAGESCROLL") and have the keybindings 
> module ask that and then make its decision?
> This way, the keybindings would not be too dependent on the NodeTypeManager
> class and still modular enough.

Do you mean that keybinding module would:

- know the current node
- know the nodetypemanager
- know all the special keybindings for certain nodetypes
- ask the nodetype of the current node from the nodetypemanager
- decides whether to use the specialized keybinding
  for the nodetype or not

And NodeTypeManager would need only ``getNodeType(Object)`` method.

Anyway, I still believe that in the current FenPDF case, the
``fenpdf.appearance.views.Views()`` could create FenPDFNodeTypeManager and
set it to also into eventHandler from there, when separate 
keybindings exist (later on).

Where the interface class should be located? 
``org.fenfire.NodeTypeManager`` or ``org.fenfire.util.NodeTypeManager``?

And FenPDF implemention:


Asko Soukka <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]