API REVIEW: WebView.scale property (for JavaFX 3.0 now)

John C. Turnbull ozemale at ozemail.com.au
Fri Jul 20 17:15:58 PDT 2012


Actually, zoomX() and zoomY() probably aren't necessary but why are we
focusing on WebView here?  Surely this should be at the Node level?  I want
to be able to zoom in on images, graphics etc. where only the contents zoom,
not the scroll bars.  I very much have a use case for this.

-jct

-----Original Message-----
From: openjfx-dev-bounces at openjdk.java.net
[mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of John C. Turnbull
Sent: Saturday, 21 July 2012 10:04
To: 'Richard Bair'; 'Leonid Popov'
Cc: openjfx-dev at openjdk.java.net; jfx-webnode_us_grp at oracle.com; 'Sergey
Malenkov'
Subject: RE: API REVIEW: WebView.scale property (for JavaFX 3.0 now)

Why not zoomX() and zoomY() for flexibility?

-jct

-----Original Message-----
From: openjfx-dev-bounces at openjdk.java.net
[mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of Richard Bair
Sent: Saturday, 21 July 2012 02:33
To: Leonid Popov
Cc: openjfx-dev at openjdk.java.net; jfx-webnode_us_grp at oracle.com; Sergey
Malenkov
Subject: Re: API REVIEW: WebView.scale property (for JavaFX 3.0 now)

Personally I liked zoom better.

On Jul 20, 2012, at 9:14 AM, Leonid Popov wrote:

> Hi Sergey,
> 
> 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?
> 
> Thanks,
> Leonid
> 
> On 7/20/2012 7:34 PM, Sergey Malenkov wrote:
>> Hi Leonid,
>> 
>> What do you think about renaming this property to "zoom"?
>> I think that "scale" will confuse users because of Node.scaleX/scaleY.
>> Also it is a common expression for webpage scaling, for example:
>> http://windows.microsoft.com/en-us/windows-vista/Zoom-in-on-a-webpage
>> 
>> Thanks,
>> SAM
>> 
>> On 20.07.2012 19:23, Leonid Popov wrote:
>>> (Sorry, re-sending the same request with the correct subject, as 
>>> specified by Richard)
>>> 
>>> Hi,
>>> 
>>> Some time ago Peter proposed an API change introducing a new 
>>> property for WebView. Unfortunately, it hasn't gone to 2.2, so I (as 
>>> the actual owner of this issue) am re-requesting the API change 
>>> described below in the original Peter's email, now for JavaFX 3.0.
>>> 
>>> Thanks,
>>> Leonid
>>> 
>>> -------- Original Message --------
>>> Subject: API Request: WebView.scale property
>>> Date: Sat, 12 May 2012 16:02:11 +0400
>>> From: Peter Zhelezniakov <Peter.Zhelezniakov at oracle.com>
>>> To: openjfx-dev at openjdk.java.net <openjfx-dev at openjdk.java.net>, 
>>> jfx-webnode_us_grp at oracle.com
>>> 
>>> 
>>> 
>>> I suggest adding 'scale' property to WebView:
>>> 
>>> class javafx.scene.web.WebView {
>>> /**
>>> * Scale factor applied to the Web page. The scale affects logical 
>>> bounds
>>> * of the Web page, but not bounds of the {@code WebView} node.
>>> *
>>> * @defaultValue 1.0
>>> */
>>> public final void setScale(double value); public final double 
>>> getScale(); public DoubleProperty scaleProperty(); }
>>> 
>>> This property is different from scaleX/Y in several ways:
>>> - scale is applied internally, i.e. logical bounds of the web page 
>>> change but WebView bounds don't; rather, scrollbars are updated.
>>> Likewise in a frameset document frame bounds don't change.
>>> - Scrollbars are not scaled and keep their regular size.
>>> 
>>> Similar functionality can be found in browsers, e.g. try Ctrl+/Ctrl- 
>>> in Firefox. WebView currently has a similar property called 
>>> fontScale, but that applies to text elements only.
>>> 
>>> http://javafx-jira.kenai.com/browse/RT-21499
>>> 
>>> Thanks!
> 



More information about the openjfx-dev mailing list