API Request: WebView.scale property

Alexander Kouznetsov alexander.kouznetsov at oracle.com
Sun May 13 12:51:29 PDT 2012


Peter,

Maybe it would be better to name it "Zoom" to avoid name clash with 
scaleX/scaleY property?

Do you want to add information on which mouse gestures/keyboard shortcut 
will affect it?

Best regards,
Alexander Kouznetsov


On 12.05.2012 16:02, Peter Zhelezniakov wrote:
> 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