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: Sat, 6 Sep 2003 15:23:45 +0300
User-agent: Mutt/1.5.4i

On Fri, Sep 05, 2003 at 03:46:04PM +0300, Asko Soukka wrote:
> Hi,
> 
> Not yet PEGging, but writing down thoughts... sorry for bad English. I got 
> a little hurry.

"I *am* in a hurry" or "I have [got] *to* hurry".

> Today resulted an idea of new interface, which would provide 
> getNodeType(Object) method. I suppose, it would be::
> 
>    public AbstractNodeType2D getNodeType(Object o);
> 
> The interface would be implemented only once in an applitude. Do you have
> ideas for naming the interface. I came up only with "NodeTypeManager",
> implemented as "FenPDFNodeTypeManager" in FenPDF.

Sounds reasonable.

> Then Tuomas proposed that also abstracting keybindings to depend on 
> type of the main node should be resolved at the same time. Well, I'm not 
> yet familiar enough with FenPDF event handling to resolve that, but it 
> would affect the place NodeTypeManager could be implemented.

And also the interface.

> This far, org.fenfire.fenpdf.appearance.views.Views() looks good, since 
> the creation FenPDF spesific nodetypes, Connectors and buoymanager is 
> located there. It feels natural to create the class implementing 
> getNodeType() there and pass it to Connectors.

Yes, I agree to that.

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

        Tuomas





reply via email to

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