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 booleangetScreenInfo(CefBrowser browser, CefScreenInfo screenInfo)Retrieve the screen info.java.awt.PointgetScreenPoint(CefBrowser browser, java.awt.Point viewPoint)Retrieve the screen point for the specified view point.java.awt.RectanglegetViewRect(CefBrowser browser)Retrieve the view rectangle.voidonCursorChange(CefBrowser browser, int cursorIdentifer)Handle cursor changes.voidonPaint(CefBrowser browser, boolean popup, java.awt.Rectangle[] dirtyRects, java.nio.ByteBuffer buffer, int width, int height)Handle painting.voidonPopupShow(CefBrowser browser, boolean show)Show or hide the popup window.voidonPopupSize(CefBrowser browser, java.awt.Rectangle size)Size the popup window.booleanstartDragging(CefBrowser browser, CefDragData dragData, int mask, int x, int y)Called when the user starts dragging content in the web view.voidupdateDragCursor(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:CefRenderHandlerHandle cursor changes.- Specified by:
onCursorChangein interfaceCefRenderHandler- Parameters:
browser- The browser generating the event.cursorIdentifer- The new cursor.
-
getViewRect
public java.awt.Rectangle getViewRect(CefBrowser browser)
Description copied from interface:CefRenderHandlerRetrieve the view rectangle.- Specified by:
getViewRectin interfaceCefRenderHandler- Parameters:
browser- The browser generating the event.- Returns:
- The view rectangle.
-
getScreenInfo
public boolean getScreenInfo(CefBrowser browser, CefScreenInfo screenInfo)
Description copied from interface:CefRenderHandlerRetrieve the screen info.- Specified by:
getScreenInfoin 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:CefRenderHandlerRetrieve the screen point for the specified view point.- Specified by:
getScreenPointin 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:CefRenderHandlerShow or hide the popup window.- Specified by:
onPopupShowin 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:CefRenderHandlerSize the popup window.- Specified by:
onPopupSizein 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:CefRenderHandlerHandle painting.- Specified by:
onPaintin 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:CefRenderHandlerCalled 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:
startDraggingin 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:CefRenderHandlerCalled when the web view wants to update the mouse cursor during a drag & drop operation.- Specified by:
updateDragCursorin interfaceCefRenderHandler- Parameters:
browser- The browser generating the event.operation- Describes the allowed operation (none, move, copy, link).
-
-