fenfire-dev
[Top][All Lists]
Advanced

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

Re: [Fenfire-dev] NodeTypeManager


From: Tuomas Lukka
Subject: Re: [Fenfire-dev] NodeTypeManager
Date: Mon, 8 Sep 2003 16:57:01 +0300
User-agent: Mutt/1.5.4i

On Mon, Sep 08, 2003 at 03:55:38PM +0300, Asko Soukka wrote:
> 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.

Not only that - getNodeType would return the buoy view node type - we also need
the description of the node type from a separate method, maybe? 
getNodeTypeId(Object)?

> 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).

Not "set into eventhandler" but exist as a specified member of the FenPDF object
for others to access.

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

.view?

> And FenPDF implemention:
> 
> ``org.fenfire.fenpdf.FenPDFNodeTypeManager``

Fine.
        
        Tuomas




reply via email to

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