Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327023 - Refactor Widget.js for better Graphics and Animation integration
Summary: Refactor Widget.js for better Graphics and Animation integration
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 1.4 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 12:24 EDT by Tim Buschtoens CLA
Modified: 2011-02-03 10:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2010-10-05 12:24:55 EDT
Right now GraphicsMixin and AnimationMixin have to do a lot of hacky stuff to work. Widget.js (possibly also Terminator.js and Parent.js) should be refactored so these mixins have less trouble.
Comment 1 Tim Buschtoens CLA 2010-10-06 04:55:37 EDT
- prepareEnhancedBorder should not have to be defined twice (Widget and GraphicsMixin)
- GraphicsMixin should not have to rename Widget._innerStyle to _innerStyleHidden
- Intead of overwriting _layoutPost in GraphicsMixin (which is problematic since it is defined in Parent, Terminator, and serveral widgets inheriting from those), a event should be fired or a callback used
- AnimationRenderer should not have to overwrite _applyVisibility on the widget-instance. (Besides beeing not very prettey, it keeps us from having more than one animationRenderer per widget. Idealy, this should also be done for the renderFunctions, but that might be hard to achieve.)
Comment 2 Tim Buschtoens CLA 2010-10-06 11:25:27 EDT
After fixing this, ScrolledComposite.js should be slightly updated, as it is currently also overwriting _layoutPost on an widget-instance.
Comment 3 Tim Buschtoens CLA 2011-02-02 11:14:16 EST
Partial fix in CVS HEAD:
- prepareEnhancedBorder is now mainly implemented in Widget.js. (Its, still overwritten, but the original is also called.)
- layoutPost is no longer overwritten, introduced "flush" event instead
- reformatted Widget.js for overview, removed some unused functions.
Comment 4 Tim Buschtoens CLA 2011-02-03 10:16:49 EST
Fixed in CVS HEAD:

- Instead of hiding innerStyleHidden, GraphicsMixin sets the field _layoutTargetNode to false.

- Widget now has a "getAdapter" function which can return a "WidgetRenderAdapter" class. WidgetRenderAdapter can be used by AnimationRenderer instead of overwriting functions. Currently only implemented for the critical "_applyVisibility", but should later be used for all renderfunctions.