Package org.cef.handler
Class CefRenderHandlerAdapter
- java.lang.Object
-
- org.cef.handler.CefRenderHandlerAdapter
-
- All Implemented Interfaces:
CefRenderHandler
public abstract class CefRenderHandlerAdapter extends java.lang.Object implements CefRenderHandler
An abstract adapter class for receiving render events. The methods in this class are empty. This class exists as convenience for creating handler objects.
-
-
Constructor Summary
Constructors Constructor Description CefRenderHandlerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getScreenInfo(CefBrowser browser, CefScreenInfo screenInfo)
Retrieve the screen info.java.awt.Point
getScreenPoint(CefBrowser browser, java.awt.Point viewPoint)
Retrieve the screen point for the specified view point.java.awt.Rectangle
getViewRect(CefBrowser browser)
Retrieve the view rectangle.void
onCursorChange(CefBrowser browser, int cursorIdentifer)
Handle cursor changes.void
onPaint(CefBrowser browser, boolean popup, java.awt.Rectangle[] dirtyRects, java.nio.ByteBuffer buffer, int width, int height)
Handle painting.void
onPopupShow(CefBrowser browser, boolean show)
Show or hide the popup window.void
onPopupSize(CefBrowser browser, java.awt.Rectangle size)
Size the popup window.boolean
startDragging(CefBrowser browser, CefDragData dragData, int mask, int x, int y)
Called when the user starts dragging content in the web view.void
updateDragCursor(CefBrowser browser, int operation)
Called when the web view wants to update the mouse cursor during a drag & drop operation.
-
-
-
Method Detail
-
onCursorChange
public void onCursorChange(CefBrowser browser, int cursorIdentifer)
Description copied from interface:CefRenderHandler
Handle cursor changes.- Specified by:
onCursorChange
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.cursorIdentifer
- The new cursor.
-
getViewRect
public java.awt.Rectangle getViewRect(CefBrowser browser)
Description copied from interface:CefRenderHandler
Retrieve the view rectangle.- Specified by:
getViewRect
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.- Returns:
- The view rectangle.
-
getScreenInfo
public boolean getScreenInfo(CefBrowser browser, CefScreenInfo screenInfo)
Description copied from interface:CefRenderHandler
Retrieve the screen info.- Specified by:
getScreenInfo
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.screenInfo
- The screenInfo- Returns:
- True if this callback was handled. False to fallback to defaults.
-
getScreenPoint
public java.awt.Point getScreenPoint(CefBrowser browser, java.awt.Point viewPoint)
Description copied from interface:CefRenderHandler
Retrieve the screen point for the specified view point.- Specified by:
getScreenPoint
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.viewPoint
- The point in the view.- Returns:
- The screen point.
-
onPopupShow
public void onPopupShow(CefBrowser browser, boolean show)
Description copied from interface:CefRenderHandler
Show or hide the popup window.- Specified by:
onPopupShow
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.show
- True if the popup window is being shown.
-
onPopupSize
public void onPopupSize(CefBrowser browser, java.awt.Rectangle size)
Description copied from interface:CefRenderHandler
Size the popup window.- Specified by:
onPopupSize
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.size
- Size of the popup window.
-
onPaint
public void onPaint(CefBrowser browser, boolean popup, java.awt.Rectangle[] dirtyRects, java.nio.ByteBuffer buffer, int width, int height)
Description copied from interface:CefRenderHandler
Handle painting.- Specified by:
onPaint
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.popup
- True if painting a popup window.dirtyRects
- Array of dirty regions.buffer
- Pixel buffer for the whole window.width
- Width of the buffer.height
- Height of the buffer.
-
startDragging
public boolean startDragging(CefBrowser browser, CefDragData dragData, int mask, int x, int y)
Description copied from interface:CefRenderHandler
Called when the user starts dragging content in the web view. Contextual information about the dragged content is supplied by dragData. OS APIs that run a system message loop may be used within the StartDragging call. Return false to abort the drag operation. Don't call any of CefBrowser-dragSource*Ended* methods after returning false. Return true to handle the drag operation. Call CefBrowser.dragSourceEndedAt and CefBrowser.ragSourceSystemDragEnded either synchronously or asynchronously to inform the web view that the drag operation has ended.- Specified by:
startDragging
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.dragData
- Contextual information about the dragged contentmask
- Describes the allowed operation (none, move, copy, link).x
- Coordinate within CefBrowsery
- Coordinate within CefBrowser- Returns:
- false to abort the drag operation or true to handle the drag operation.
-
updateDragCursor
public void updateDragCursor(CefBrowser browser, int operation)
Description copied from interface:CefRenderHandler
Called when the web view wants to update the mouse cursor during a drag & drop operation.- Specified by:
updateDragCursor
in interfaceCefRenderHandler
- Parameters:
browser
- The browser generating the event.operation
- Describes the allowed operation (none, move, copy, link).
-
-