pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill van Melle <bill.van.me...@gmail.com>
Subject Scaling components
Date Fri, 15 Jul 2011 21:51:14 GMT
A while back I submitted a feature request for a "ScalePane", a container
that would automatically scale its contents to the container's actual size (
https://issues.apache.org/jira/browse/PIVOT-710). I find myself increasingly
in need of such a beast, or at least something like it -- I'd settle for a
container that I could set a scale factor on. Some of the work is already
done in the form of ScaleDecorator, but the decorator handles only the
output side. If you have any interactive content, the mouse hits are all
wrong (I include a simple demonstration of the issue below).

Anyway, I want to take a crack at implementing a scaling container, and
wondered if any of the experts here had suggestions for the right approach.
At first blush, it seems like I could add a ScaleDecorator, and then
override all the mouse-related events in the skin to scale the x,y
coordinates before passing them in to the container's component. Are there
other things to worry about?

The example: clicking on the first checkbox checks the second checkbox.

<Window title="Scale fail" maximized="true"
<Border styles="{color:10,thickness:8,padding:4}">
<effects:ScaleDecorator scaleY="2" scaleX="2"
horizontalAlignment="left" verticalAlignment="top" />
<BoxPane orientation="vertical">
<Checkbox buttonData="Checkbox 1" tooltipText="This is the first checkbox"
<Checkbox buttonData="Checkbox 2" tooltipText="This is the second checkbox"

View raw message