< prev index next >
modules/web/src/android/java/javafx/scene/web/WebView.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 28,42 ****
import com.sun.webkit.WebPage;
import javafx.css.converter.BooleanConverter;
import javafx.css.converter.EnumConverter;
import javafx.css.converter.SizeConverter;
import com.sun.javafx.geom.BaseBounds;
import com.sun.javafx.scene.DirtyBits;
import javafx.css.Styleable;
import com.sun.javafx.scene.NodeHelper;
import com.sun.javafx.sg.prism.NGNode;
! import com.sun.javafx.sg.prism.NGWebView;
import com.sun.javafx.tk.TKPulseListener;
import com.sun.javafx.tk.Toolkit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
--- 28,43 ----
import com.sun.webkit.WebPage;
import javafx.css.converter.BooleanConverter;
import javafx.css.converter.EnumConverter;
import javafx.css.converter.SizeConverter;
import com.sun.javafx.geom.BaseBounds;
+ import com.sun.javafx.geom.PickRay;
import com.sun.javafx.scene.DirtyBits;
import javafx.css.Styleable;
import com.sun.javafx.scene.NodeHelper;
import com.sun.javafx.sg.prism.NGNode;
! import com.sun.javafx.sg.prism.web.NGWebView;
import com.sun.javafx.tk.TKPulseListener;
import com.sun.javafx.tk.Toolkit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
*** 57,69 ****
import javafx.css.StyleableObjectProperty;
import javafx.css.StyleableProperty;
import javafx.event.EventType;
import javafx.geometry.NodeOrientation;
import com.sun.javafx.geom.transform.BaseTransform;
import javafx.scene.Node;
import javafx.scene.Parent;
- import javafx.scene.Scene;
import javafx.scene.input.DragEvent;
import javafx.scene.input.TransferMode;
import javafx.scene.text.FontSmoothingType;
/**
--- 58,71 ----
import javafx.css.StyleableObjectProperty;
import javafx.css.StyleableProperty;
import javafx.event.EventType;
import javafx.geometry.NodeOrientation;
import com.sun.javafx.geom.transform.BaseTransform;
+ import com.sun.javafx.scene.SceneHelper;
+ import com.sun.javafx.scene.input.PickResultChooser;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.input.DragEvent;
import javafx.scene.input.TransferMode;
import javafx.scene.text.FontSmoothingType;
/**
*** 87,96 ****
--- 89,119 ----
@Override
public void doUpdatePeer(Node node) {
((WebView) node).doUpdatePeer();
}
+
+ @Override
+ public void doTransformsChanged(Node node) {
+ ((WebView) node).doTransformsChanged();
+ }
+
+ @Override
+ public BaseBounds doComputeGeomBounds(Node node,
+ BaseBounds bounds, BaseTransform tx) {
+ return ((WebView) node).doComputeGeomBounds(bounds, tx);
+ }
+
+ @Override
+ public boolean doComputeContains(Node node, double localX, double localY) {
+ return ((WebView) node).doComputeContains(localX, localY);
+ }
+
+ @Override
+ public void doPickNodeLocal(Node node, PickRay localPickRay, PickResultChooser result) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
});
}
private static final Map<Object, Integer> idMap = new HashMap<Object, Integer>();
*** 307,317 ****
@Override public void resize(double width, double height) {
if ((width != this.width.get()) || (height != this.height.get())) {
this.width.set(width);
this.height.set(height);
NodeHelper.markDirty(this, DirtyBits.NODE_GEOMETRY);
! impl_geomChanged();
}
}
/**
* Called during layout to determine the minimum width for this node.
--- 330,340 ----
@Override public void resize(double width, double height) {
if ((width != this.width.get()) || (height != this.height.get())) {
this.width.set(width);
this.height.set(height);
NodeHelper.markDirty(this, DirtyBits.NODE_GEOMETRY);
! NodeHelper.geomChanged(this);
}
}
/**
* Called during layout to determine the minimum width for this node.
*** 970,987 ****
&& getScene().getWindow().isShowing();
if (reallyVisible) {
page.setVisible(true);
if (page.isDirty()) {
! Scene.impl_setAllowPGAccess(true);
final NGWebView peer = NodeHelper.getPeer(this);
peer.update(); // creates new render queues
if (page.isRepaintPending()) {
NodeHelper.markDirty(this, DirtyBits.WEBVIEW_VIEW);
}
! Scene.impl_setAllowPGAccess(false);
}
} else {
page.dropRenderFrames();
page.setVisible(false);
}
--- 993,1010 ----
&& getScene().getWindow().isShowing();
if (reallyVisible) {
page.setVisible(true);
if (page.isDirty()) {
! SceneHelper.setAllowPGAccess(true);
final NGWebView peer = NodeHelper.getPeer(this);
peer.update(); // creates new render queues
if (page.isRepaintPending()) {
NodeHelper.markDirty(this, DirtyBits.WEBVIEW_VIEW);
}
! SceneHelper.setAllowPGAccess(false);
}
} else {
page.dropRenderFrames();
page.setVisible(false);
}
*** 1028,1047 ****
if ((wkDndAction & WK_DND_ACTION_LINK) != 0)
tms.add(TransferMode.LINK);
return tms.toArray(new TransferMode[0]);
}
- /**
- * @treatAsPrivate implementation detail
- * @deprecated This is an internal API that is not intended for use and will be removed in the next version
- */
- // @Deprecated
- // @Override
- // protected void impl_pickNodeLocal(PickRay pickRay, PickResultChooser result) {
- // impl_intersects(pickRay, result);
- // }
-
@Override protected ObservableList<Node> getChildren() {
return super.getChildren();
}
// Node stuff
--- 1051,1060 ----
*** 1055,1082 ****
private NGWebView getNGWebView() {
return (NGWebView)NodeHelper.getPeer(this);
}
! /**
! * @treatAsPrivate implementation detail
! * @deprecated This is an internal API that is not intended for use and will be removed in the next version
*/
! @Deprecated
! @Override
! public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) {
bounds.deriveWithNewBounds(0, 0, 0, (float) getWidth(), (float)getHeight(), 0);
tx.transform(bounds, bounds);
return bounds;
}
! /**
! * @treatAsPrivate implementation detail
! * @deprecated This is an internal API that is not intended for use and will be removed in the next version
*/
! @Deprecated
! @Override protected boolean impl_computeContains(double localX, double localY) {
// Note: Local bounds contain test is already done by the caller. (Node.contains()).
return true;
}
/*
--- 1068,1096 ----
private NGWebView getNGWebView() {
return (NGWebView)NodeHelper.getPeer(this);
}
! /*
! * Note: This method MUST only be called via its accessor method.
*/
! private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) {
bounds.deriveWithNewBounds(0, 0, 0, (float) getWidth(), (float)getHeight(), 0);
tx.transform(bounds, bounds);
return bounds;
}
! /*
! * Note: This method MUST only be called via its accessor method.
! */
! private void doTransformsChanged() {
! }
!
! /*
! * Note: This method MUST only be called via its accessor method.
*/
! private boolean doComputeContains(double localX, double localY) {
// Note: Local bounds contain test is already done by the caller. (Node.contains()).
return true;
}
/*
< prev index next >