avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Swing and Avalon
Date Tue, 15 Oct 2002 01:45:45 GMT
Mircea Toma wrote:
> On Monday 14 October 2002 13:47, Gary Shea wrote:
> 
>>Hi --
>>
>>.... Moving that event through component interfaces would
>>violate IOC.  I'm thinking of an 'event service' component to address
>>that issue.  Sort of a local communications backbone orthogonal to both
>>the UI and the application core. 
> 
> 
> I think you could apply IoC and SoC by having visual components that can be 
> wired together using an interface descriptor like XUL. A second descriptor 
> could associate actions to the visual components. This will even allow to 
> change the user interface type (Swing, SWT, and JavaScript) without any code 
> changes in your application.

Another neat toy in Excalibur Util is the new "Delegate" functionality.
In essence, you can create a "proxy" to any method--static or instance.
That way, you can directly call a component's interface simply by wrapping
it in a "delegate".

To create a delegate, you have to have an Interface with one method.  That
method becomes your alias.  As long as the parameters and return value are
the same, you may access any method with any name.

It helps for generic handling of simple UI events.

Using a "central" event handler, we can call whatever components we want.
The main thing is that we need the "central" event handler to be a
ThreadSafe component so that it can have access to other components.


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message