Spec-Zone .ru
спецификации, руководства, описания, API
|
public final class WebView extends Parent
WebView
is a Node
that manages a
WebEngine
and displays its content. The associated WebEngine
is created automatically at construction time and cannot be changed
afterwards. WebView
handles mouse and some keyboard events, and
manages scrolling automatically, so there's no need to put it into a
ScrollPane
.
WebView
objects must be created and accessed solely from the
FX thread.
Type | Property and Description |
---|---|
BooleanProperty |
contextMenuEnabled
Specifies whether context menu is enabled.
|
DoubleProperty |
fontScale
Scale factor applied to font.
|
ObjectProperty<FontSmoothingType> |
fontSmoothingType
Specifies a requested font smoothing type : gray or LCD.
|
ReadOnlyDoubleProperty |
height
Height of this
WebView . |
DoubleProperty |
maxHeight
Maximum height property.
|
DoubleProperty |
maxWidth
Maximum width property.
|
DoubleProperty |
minHeight
Minimum height property.
|
DoubleProperty |
minWidth
Minimum width property.
|
DoubleProperty |
prefHeight
Preferred height property.
|
DoubleProperty |
prefWidth
Preferred width property.
|
ReadOnlyDoubleProperty |
width
Width of this
WebView . |
DoubleProperty |
zoom
Returns zoom property object.
|
needsLayout
blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, visible
Constructor and Description |
---|
WebView()
Creates a
WebView object. |
Modifier and Type | Method and Description |
---|---|
BooleanProperty |
contextMenuEnabledProperty()
Specifies whether context menu is enabled.
|
DoubleProperty |
fontScaleProperty()
Scale factor applied to font.
|
ObjectProperty<FontSmoothingType> |
fontSmoothingTypeProperty()
Specifies a requested font smoothing type : gray or LCD.
|
protected ObservableList<Node> |
getChildren()
Gets the list of children of this
Parent . |
static java.util.List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
java.util.List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
This method should delegate to
Node.getClassCssMetaData() so that
a Node's CssMetaData can be accessed without the need for reflection. |
WebEngine |
getEngine()
Returns the
WebEngine object. |
double |
getFontScale()
Returns scale factor applied to font.
|
FontSmoothingType |
getFontSmoothingType()
Gets the value of the property fontSmoothingType.
|
double |
getHeight()
Returns height of this
WebView . |
double |
getMaxHeight()
Returns maximum height.
|
double |
getMaxWidth()
Returns maximum width.
|
double |
getMinHeight()
Sets minimum height.
|
double |
getMinWidth()
Returns minimum width.
|
double |
getPrefHeight()
Returns preferred height.
|
double |
getPrefWidth()
Returns preferred width.
|
double |
getWidth()
Returns width of this
WebView . |
double |
getZoom()
Returns current zoom factor applied to the whole page contents.
|
ReadOnlyDoubleProperty |
heightProperty()
Height of this
WebView . |
protected boolean |
impl_computeContains(double localX,
double localY)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
com.sun.javafx.geom.BaseBounds |
impl_computeGeomBounds(com.sun.javafx.geom.BaseBounds bounds,
com.sun.javafx.geom.transform.BaseTransform tx)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
protected void |
impl_pickNodeLocal(com.sun.javafx.geom.PickRay pickRay,
com.sun.javafx.scene.input.PickResultChooser result)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
void |
impl_transformsChanged()
Deprecated.
|
void |
impl_updatePG()
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
boolean |
isContextMenuEnabled()
Gets the value of the property contextMenuEnabled.
|
boolean |
isResizable()
Indicates whether this node is a type which can be resized by its parent.
|
double |
maxHeight(double width)
Called during layout to determine the maximum height for this node.
|
DoubleProperty |
maxHeightProperty()
Maximum height property.
|
double |
maxWidth(double height)
Called during layout to determine the maximum width for this node.
|
DoubleProperty |
maxWidthProperty()
Maximum width property.
|
double |
minHeight(double width)
Called during layout to determine the minimum height for this node.
|
DoubleProperty |
minHeightProperty()
Minimum height property.
|
double |
minWidth(double height)
Called during layout to determine the minimum width for this node.
|
DoubleProperty |
minWidthProperty()
Minimum width property.
|
double |
prefHeight(double width)
Called during layout to determine the preferred height for this node.
|
DoubleProperty |
prefHeightProperty()
Preferred height property.
|
double |
prefWidth(double height)
Called during layout to determine the preferred width for this node.
|
DoubleProperty |
prefWidthProperty()
Preferred width property.
|
void |
resize(double width,
double height)
If the node is resizable, will set its layout bounds to the specified
width and height.
|
void |
setContextMenuEnabled(boolean value)
Sets the value of the property contextMenuEnabled.
|
void |
setFontScale(double value)
Sets scale factor applied to font.
|
void |
setFontSmoothingType(FontSmoothingType value)
Sets the value of the property fontSmoothingType.
|
void |
setMaxHeight(double value)
Sets maximum height.
|
void |
setMaxSize(double maxWidth,
double maxHeight)
Convenience method for setting maximum width and height.
|
void |
setMaxWidth(double value)
Sets maximum width.
|
void |
setMinHeight(double value)
Sets minimum height.
|
void |
setMinSize(double minWidth,
double minHeight)
Convenience method for setting minimum width and height.
|
void |
setMinWidth(double value)
Sets minimum width.
|
void |
setPrefHeight(double value)
Sets preferred height.
|
void |
setPrefSize(double prefWidth,
double prefHeight)
Convenience method for setting preferred width and height.
|
void |
setPrefWidth(double value)
Sets preferred width.
|
void |
setZoom(double value)
Sets current zoom factor applied to the whole page contents.
|
ReadOnlyDoubleProperty |
widthProperty()
Width of this
WebView . |
DoubleProperty |
zoomProperty()
Returns zoom property object.
|
computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, requestLayout, setNeedsLayout
addEventFilter, addEventHandler, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public ReadOnlyDoubleProperty widthProperty
WebView
.getWidth()
public ReadOnlyDoubleProperty heightProperty
WebView
.getHeight()
public final DoubleProperty zoomProperty
getZoom()
,
setZoom(double value)
public DoubleProperty fontScaleProperty
public DoubleProperty minWidthProperty
getMinWidth()
,
setMinWidth(double)
public DoubleProperty minHeightProperty
getMinHeight()
,
setMinHeight(double)
public DoubleProperty prefWidthProperty
getPrefWidth()
,
setPrefWidth(double)
public DoubleProperty prefHeightProperty
getPrefHeight()
,
setPrefHeight(double)
public DoubleProperty maxWidthProperty
getMaxWidth()
,
setMaxWidth(double)
public DoubleProperty maxHeightProperty
getMaxHeight()
,
setMaxHeight(double)
public final ObjectProperty<FontSmoothingType> fontSmoothingTypeProperty
getFontSmoothingType()
,
setFontSmoothingType(FontSmoothingType)
public final BooleanProperty contextMenuEnabledProperty
isContextMenuEnabled()
,
setContextMenuEnabled(boolean)
public WebView()
WebView
object.public final double getWidth()
WebView
.public ReadOnlyDoubleProperty widthProperty()
WebView
.getWidth()
public final double getHeight()
WebView
.public ReadOnlyDoubleProperty heightProperty()
WebView
.getHeight()
public final void setZoom(double value)
value
- zoom factor to be setzoomProperty()
,
getZoom()
public final double getZoom()
zoomProperty()
,
setZoom(double value)
public final DoubleProperty zoomProperty()
getZoom()
,
setZoom(double value)
public final void setFontScale(double value)
public final double getFontScale()
public DoubleProperty fontScaleProperty()
public boolean isResizable()
Node
If this method returns false, then the parent cannot resize it during layout (resize() is a no-op) and it should return its layoutBounds for minimum, preferred, and maximum sizes. Group, Text, and all Shapes are not resizable and hence depend on the application to establish their sizing by setting appropriate properties (e.g. width/height for Rectangle, text on Text, and so on). Non-resizable nodes may still be relocated during layout.
isResizable
in class Node
Node.getContentBias()
,
Node.minWidth(double)
,
Node.minHeight(double)
,
Node.prefWidth(double)
,
Node.prefHeight(double)
,
Node.maxWidth(double)
,
Node.maxHeight(double)
,
Node.resize(double, double)
,
Node.getLayoutBounds()
public void resize(double width, double height)
Node
This method should generally only be called by parent nodes from their layoutChildren() methods. All Parent classes will automatically resize resizable children, so resizing done directly by the application will be overridden by the node's parent, unless the child is unmanaged.
Parents are responsible for ensuring the width and height values fall within the resizable node's preferred range. The autosize() method may be used if the parent just needs to resize the node to its preferred size.
resize
in class Node
width
- the target layout bounds widthheight
- the target layout bounds heightNode.isResizable()
,
Node.getContentBias()
,
Node.autosize()
,
Node.minWidth(double)
,
Node.minHeight(double)
,
Node.prefWidth(double)
,
Node.prefHeight(double)
,
Node.maxWidth(double)
,
Node.maxHeight(double)
,
Node.getLayoutBounds()
public final double minWidth(double height)
minWidth
in class Parent
height
- the height that should be used if minimum width depends on itNode.isResizable()
,
Node.getContentBias()
public final double minHeight(double width)
minHeight
in class Parent
width
- the width that should be used if minimum height depends on itNode.isResizable()
,
Node.getContentBias()
public final double prefWidth(double height)
prefWidth
in class Parent
height
- the height that should be used if preferred width depends on itNode.isResizable()
,
Node.getContentBias()
,
Node.autosize()
public final double prefHeight(double width)
prefHeight
in class Parent
width
- the width that should be used if preferred height depends on itNode.getContentBias()
,
Node.autosize()
public final double maxWidth(double height)
maxWidth
in class Node
height
- the height that should be used if maximum width depends on itNode.isResizable()
,
Node.getContentBias()
public final double maxHeight(double width)
maxHeight
in class Node
width
- the width that should be used if maximum height depends on itNode.isResizable()
,
Node.getContentBias()
public DoubleProperty minWidthProperty()
getMinWidth()
,
setMinWidth(double)
public final void setMinWidth(double value)
public final double getMinWidth()
public DoubleProperty minHeightProperty()
getMinHeight()
,
setMinHeight(double)
public final void setMinHeight(double value)
public final double getMinHeight()
public void setMinSize(double minWidth, double minHeight)
public DoubleProperty prefWidthProperty()
getPrefWidth()
,
setPrefWidth(double)
public final void setPrefWidth(double value)
public final double getPrefWidth()
public DoubleProperty prefHeightProperty()
getPrefHeight()
,
setPrefHeight(double)
public final void setPrefHeight(double value)
public final double getPrefHeight()
public void setPrefSize(double prefWidth, double prefHeight)
public DoubleProperty maxWidthProperty()
getMaxWidth()
,
setMaxWidth(double)
public final void setMaxWidth(double value)
public final double getMaxWidth()
public DoubleProperty maxHeightProperty()
getMaxHeight()
,
setMaxHeight(double)
public final void setMaxHeight(double value)
public final double getMaxHeight()
public void setMaxSize(double maxWidth, double maxHeight)
public final void setFontSmoothingType(FontSmoothingType value)
public final FontSmoothingType getFontSmoothingType()
public final ObjectProperty<FontSmoothingType> fontSmoothingTypeProperty()
getFontSmoothingType()
,
setFontSmoothingType(FontSmoothingType)
public final void setContextMenuEnabled(boolean value)
public final boolean isContextMenuEnabled()
public final BooleanProperty contextMenuEnabledProperty()
isContextMenuEnabled()
,
setContextMenuEnabled(boolean)
public static java.util.List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public java.util.List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
so that
a Node's CssMetaData can be accessed without the need for reflection.getCssMetaData
in interface Styleable
getCssMetaData
in class Node
@Deprecated protected void impl_pickNodeLocal(com.sun.javafx.geom.PickRay pickRay, com.sun.javafx.scene.input.PickResultChooser result)
Node
impl_pickNodeLocal
in class Parent
protected ObservableList<Node> getChildren()
Parent
Parent
.
See the class documentation for Node
for scene graph structure
restrictions on setting a Parent
's children list.
If these restrictions are violated by a change to the list of children,
the change is ignored and the previous value of the children list is
restored. An <code>IllegalArgumentException</code> is thrown in this case.
If this Parent
node is attached to a Scene
, then its
list of children must only be modified on the JavaFX Application Thread.
An <code>IllegalStateException</code> is thrown if this restriction is
violated.
Note to subclasses: if you override this method, you must return from your implementation the result of calling this super method. The actual list instance returned from any getChildren() implementation must be the list owned and managed by this Parent. The only typical purpose for overriding this method is to promote the method to be public.
getChildren
in class Parent
Parent
.@Deprecated public com.sun.javafx.geom.BaseBounds impl_computeGeomBounds(com.sun.javafx.geom.BaseBounds bounds, com.sun.javafx.geom.transform.BaseTransform tx)
Node
impl_computeGeomBounds
in class Parent
@Deprecated protected boolean impl_computeContains(double localX, double localY)
impl_computeContains
in class Parent
@Deprecated public void impl_updatePG()
Node
impl_updatePG
in class Parent
@Deprecated public void impl_transformsChanged()
Node
impl_transformsChanged
in class Node
Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. Use is subject to