API REVIEW: WebView.scale property (for JavaFX 3.0 now)
Richard Bair
richard.bair at oracle.com
Tue Jul 24 12:21:15 PDT 2012
Cool, thanks Phil!
On Jul 24, 2012, at 12:21 PM, Phil Race wrote:
> In general, that is true. However, WebView is a final class, so it makes no difference,
> ie its not really a change at all, and definitely not an incompatible one.
>
> -phil.
>
> On 7/24/2012 12:01 PM, Richard Bair wrote:
>> BTW, adding final to methods is an incompatible change so all such changes have to be weighed and approved.
>>
>> Richard
>>
>> On Jul 24, 2012, at 11:52 AM, Richard Bair wrote:
>>
>>> Every getter, setter, and property method should be final.
>>>
>>> Thanks
>>> Richard
>>>
>>> On Jul 24, 2012, at 11:16 AM, Leonid Popov wrote:
>>>
>>>> The issue is at
>>>> http://javafx-jira.kenai.com/browse/RT-21499
>>>>
>>>> I noticed that other similar methods of WebView, like fontScaleProperty() or minWidthProperty(), are not final. Should I made them final as well?
>>>>
>>>> Thanks,
>>>> Leonid
>>>>
>>>> On 7/24/2012 9:56 PM, Richard Bair wrote:
>>>>> Make sure the "zoomProperty" method is also final.
>>>>>
>>>>> What is the issue number again?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> On Jul 24, 2012, at 7:13 AM, Leonid Popov wrote:
>>>>>
>>>>>> So, here's a proposed API change for WebView with zoom instead of scale:
>>>>>>
>>>>>> class javafx.scene.web.WebView {
>>>>>> /**
>>>>>> * Zoom factor applied to the Web page. The zoom affects logical bounds
>>>>>> * of the Web page, but not bounds of the {@code WebView} node.
>>>>>> *
>>>>>> * @defaultValue 1.0
>>>>>> */
>>>>>> public final void setZoom(double value);
>>>>>> public final double getZoom();
>>>>>> public DoubleProperty zoomProperty();
>>>>>> }
>>>>>>
>>>>>> If no objections come, I'll prepare a changeset soon.
>>>>>>
>>>>>> Thanks,
>>>>>> Leonid
>>>>>>
>>>>>> On 7/23/2012 10:25 PM, Kevin Rushforth wrote:
>>>>>>> Kirill already answered the question of its being a node property: Node already has xScale and yScale properties...this is something subtly different.
>>>>>>>
>>>>>>> I think either zoom or zoomFactor would be fine (I would note that zoom is shorter, so might be better if it won't be confusing).
>>>>>>>
>>>>>>> -- Kevin
>>>>>>>
>>>>>>>
>>>>>>> John C. Turnbull wrote:
>>>>>>>> Just "zoomProperty" sounds right but, as I said, I think it should be at
>>>>>>>> Node level so that other node types can use it too, especially ImageView and
>>>>>>>> graphics nodes. It should zoom the contents only (not the scroll bars
>>>>>>>> though the latter should update accordingly to reflect the changes in the
>>>>>>>> dimensions of the content and the new relative position).
>>>>>>>>
>>>>>>>> -jct
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From:openjfx-dev-bounces at openjdk.java.net
>>>>>>>> [mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of Peter
>>>>>>>> Zhelezniakov
>>>>>>>> Sent: Monday, 23 July 2012 19:21
>>>>>>>> To: Leonid Popov
>>>>>>>> Cc:openjfx-dev at openjdk.java.net; Sergey Malenkov
>>>>>>>> Subject: Re: API REVIEW: WebView.scale property (for JavaFX 3.0 now)
>>>>>>>>
>>>>>>>> On 07/20/12 20:14, Leonid Popov wrote:
>>>>>>>>
>>>>>>>>> It sounds reasonable, assuming that scaleX/scaleY have slightly
>>>>>>>>> different semantics (they apply to the whole view, including
>>>>>>>>> scrollbars, while the proposed property should affect WebView contents
>>>>>>>>> only). Any other opinions on scale vs. zoom?
>>>>>>>>>
>>>>>>>> I named it scaleProperty for consistency as we already had
>>>>>>>> fontScaleProperty. OTOH I agree 'zoom' may sound more familiar and intuitive
>>>>>>>> than 'scale'. I don't have strong preference now.
>>>>>>>>
>>>>>>>> Should we name it just zoomProperty, or maybe zoomFactorProperty? Native
>>>>>>>> speakers please advise!
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> --
>>>>>>>> Peter
>>>>>>>>
>>>>>>>>
>
More information about the openjfx-dev
mailing list