public class BrowserView
extends javafx.scene.layout.StackPane
Browser
instance. You can embed this container into any other JavaFX container to display web pages loaded in corresponding
Browser
object.
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, 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, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
Constructor and Description |
---|
BrowserView()
Creates a new
BrowserView instance.
|
BrowserView(Browser browser)
Creates a new
BrowserView instance that will display the passed
browser instance.
|
Modifier and Type | Method and Description |
---|---|
void |
forwardKeyEvent(javafx.scene.input.KeyEvent event)
Forwards the given keyboard
将给定的键盘事件转发到加载的网页上当前聚焦的HTML元素。 event to currently focused HTML element on the loaded web page.
|
Browser |
getBrowser()
Returns
返回与当前容器关联的Browser实例。 Browser instance associated with the current container.
|
boolean |
isDragAndDropEnabled()
Indicates whether functionality that allows dragging/dropping content from/onto the loaded web page is enabled.
指示是否启用了允许将内容从加载的网页拖放到加载的网页上的功能。 |
void |
requestFocus() |
void |
setDragAndDropEnabled(boolean enabled)
Enables or disables functionality that allows dragging/dropping content from/onto the loaded web page.
启用或禁用允许将内容从加载的网页拖放到加载的网页上的功能。 |
void |
setGestureEventsHandler(InputEventsHandler<GestureEvent> handler)
Registers gesture events handler for handling/filtering all gesture events before they will be sent to Chromium render process for processing.
注册手势事件处理程序,以便在将所有手势事件发送到Chromium渲染过程进行处理之前处理/过滤所有手势事件。 |
void |
setKeyEventsHandler(InputEventsHandler<javafx.scene.input.KeyEvent> handler)
Registers keyboard events handler for handling/filtering all key events before they will be sent to Chromium renderer process for processing.
注册键盘事件处理程序,以处理/过滤所有按键事件,然后将其发送到Chromium渲染器进程进行处理。 |
void |
setMouseEventsHandler(InputEventsHandler<javafx.scene.input.MouseEvent> handler)
Registers mouse events handler for handling/filtering all mouse events before they will be sent to Chromium render process for processing.
注册鼠标事件处理程序,以处理/过滤所有鼠标事件,然后将其发送到Chromium渲染过程进行处理。 |
void |
setScrollEventsHandler(InputEventsHandler<javafx.scene.input.ScrollEvent> handler)
Registers scroll events handler for handling/filtering all scroll events before they will be sent to Chromium render process for processing.
注册滚动事件处理程序,以处理/过滤所有滚动事件,然后将其发送到Chromium渲染过程进行处理。 |
alignmentProperty, clearConstraints, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, requestLayout, setAlignment, setAlignment, setMargin
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeGeomBounds, impl_createPeer, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapToPixelProperty, widthProperty
getBaselineOffset, getChildrenUnmodifiable, getImpl_traversalEngine, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, setImpl_traversalEngine
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, 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, impl_findStyles, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_isShowMnemonics, impl_isTreeVisible, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, 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, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, 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, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, 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, 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 BrowserView()
BrowserView
instance.
This method is equivalent of
new BrowserView(new Browser())
public Browser getBrowser()
Browser
instance associated with the current container.
public void setKeyEventsHandler(InputEventsHandler<javafx.scene.input.KeyEvent> handler)
handler
- handler instance that will be used to decide whether key event should be supressed (filtered) or not. Use
null
to reset handler and enabled default behavior where all key events are sent to Chromium render process.
-处理程序实例,该实例将用于决定是否应阻止(过滤)键事件。用于重置处理程序和已启用的默认行为,在该行为中,所有键事件均发送到Chromium渲染过程。
public void setMouseEventsHandler(InputEventsHandler<javafx.scene.input.MouseEvent> handler)
handler
- handler instance that will be used to decide whether mouse event should be supressed (filtered) or not. Use
null
to reset handler and enabled default behavior where all mouse events are sent to Chromium render process.
-处理程序实例,该实例将用于决定是否应抑制(过滤)鼠标事件。用于重置处理程序和启用的默认行为,在该行为中,所有鼠标事件均发送到Chromium渲染过程。
public void setGestureEventsHandler(InputEventsHandler<GestureEvent> handler)
Note: gesture events can be handled/filtered only when heavyweight rendering mode is enabled. In this case Chromium engine initiates gesture events and sends them to gesture events handler for processing.
handler
- handler instance that will be used to decide whether gesture event should be supressed (filtered) or not. Use
null
to reset handler and enabled default behavior where all gesture events are sent to Chromium render process.
-处理程序实例,将用于决定是否应禁止(过滤)手势事件。用于重置处理程序和已启用的默认行为,将所有手势事件发送到Chromium渲染过程。
public void setScrollEventsHandler(InputEventsHandler<javafx.scene.input.ScrollEvent> handler)
handler
- handler instance that will be used to decide whether scroll event should be supressed (filtered) or not. Use
null
to reset handler and enabled default behavior where all scroll events are sent to Chromium render process.
-处理程序实例,该实例将用于决定是否应禁止(过滤)滚动事件。用于重置处理程序和启用的默认行为,其中所有滚动事件均发送到Chromium渲染过程。
public boolean isDragAndDropEnabled()
true
.
true
when functionality that allows dragging/dropping content from/onto the loaded web page is enabled.
当启用了允许将内容从加载的网页拖放到加载的网页上的功能时。
public void setDragAndDropEnabled(boolean enabled)
enabled
- the new state.
-新状态。
public void requestFocus()
requestFocus
in class
javafx.scene.Node
public void forwardKeyEvent(javafx.scene.input.KeyEvent event)
event
to currently focused HTML element on the loaded web page. Even if the web page is being loaded or there's no focused HTML element on the loaded web page, the method still forwards key event to Chromium engine.
event
- the key event to forward. Cannot be
null
.
-要转发的关键事件。不可能是 。
java.lang.IllegalArgumentException
- when the event parameter is
null
.