Hi Sebastian,
> No, but I would be interested in your ideas :)
>   
I want to use decorators in the layer, which renders the row 
backgrounds. This layer uses plain HTML and DOM manipulations for fast 
rendering. The decorators currently expect an instance of 
"qx.html.Element" as first parameter in the "init", "resize" and "tint" 
methods and this is a problem for me.

This is the way the widget uses the decorators right now:

1. create the decorator element as instance of "qx.html.Element"
2. initialize the decorator element:  decorator.init(decoratorelement)
  2.1 The init method in all qooxdoo decorators is the same and looks 
like "decoratorElement.useMarkup(this.getMarkup());
3. after the widget's final size has been calculated be the layout 
engine the decorator element is resized: 
decorator.resize(decoratorElement, width, height);
  3.1 The resize method in all qooxdoo decorators first get the real DOM 
element of the decorator element and only work with this DOM element

step three is repeated after each widget resize. This is how I plan to 
use decorators in the widget:

1. create the decorator element as instance of "qx.html.Element"
2. initialize the decorator element:  
decoratorElement.useMarkup(decorator.getMarkup());
3. after the widget's final size has been calculated be the layout 
engine the decorator element is resized: 
decorator.resize(decoratorElement.getDomElement(), width, height);

As you see it is easy the change the decorators to only work with HTML 
strings and DOM elements. The init method will be removed and the 
"resize" and "tint" method will work with plain DOM elements. The 
changes to qooxdoo's decorators and the widget code is minimal. The 
benefit is that we are able to use decorators in areas where only HTML 
and DOM operations are used.

Best Fabian



>> Hi,
>>
>> I plan to use the qooxdoo decorator classes to render some parts of the 
>> virtual widgets. To do so I have change the API of the decorator 
>> interface (qx.ui.core.decoration.IDecorator) a little. This change only 
>> affects qooxdoo users, who have implemented their own decorator classes. 
>> To get an idea of the impact of such a change I would be interested who 
>> of you has written his/her own decorators?
>>
>> Best Fabian
>>
>>     
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>   


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim 
Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to