Skip to main content

Feature Request: Allow PropertySetter to modify (animate) Map

1 reply [Last post]
colbertphilippe
Offline
Joined: 2005-07-06

The current PropertySetter can modify (animate) a bean property via getXXX/setXXX but on some occasions, it would be nice to have the PropertySetter modify values in a Map (such as Map since animation requires float). I suggest that you add this capability to Timing Framework by allowing PropertySetter to take a Map as parameter as an alternative to attribute name and value.

Such Map is used in environments where attributes are configurable rather than hard-coded. For example, JavaScript contexts uses Map for local variables. It happens often enough.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rah003
Offline
Joined: 2004-05-26

Could you please elaborate on this a bit more? I don't really see how this could easily work.

PropertySetter takes name of the property (String) and 1..n parameter values (not limited to Floats, but anything of a same type for which it knows how to interpolate between values). Also if you provide more then 2 values for property you want to change, let's say 0,1,0 it will interpolate between values so that start and end values will be 0 while value of the property will be 1 exactly in the middle of the animation (with default Interpolator).
Having properties provided via Map mechanism would allow you to specify multiple properties to be modified at once, but would limit you in a way how you can interpolate between properties and would require some assumptions from PropertySetter to make it work ... is the value you've specified in the map initial value or the final value, what is the other value? what it was before animation started?, or 0 or 1 or what ... etc.

HTH,
Jan