Class CefriumContextMenu

java.lang.Object
com.cefrium.CefriumContextMenu

@CefriumExperimental public final class CefriumContextMenu extends Object
A context menu the page asks for (a long press or a right click on a link or an image), as CefriumChromeClient.onContextMenu(CefriumBrowser, CefriumContextMenu) sees it. Show the items, then run the one chosen with CefriumContextMenu.Item.execute() or close the menu with cancel(); the first of those counts. Any thread.
  • Method Details

    • getItems

      public List<CefriumContextMenu.Item> getItems()
      The entries, in order. Unmodifiable.
    • getPageUrl

      public String getPageUrl()
      The page the menu is on.
    • getLinkUrl

      public String getLinkUrl()
      The link under the touch; empty when none.
    • getSourceUrl

      public String getSourceUrl()
      The image or media under the touch (src); empty when none.
    • getSelectionText

      public String getSelectionText()
      The selected text; empty when none.
    • isEditable

      public boolean isEditable()
      Whether the menu is for an editable field.
    • getMediaType

      public CefriumContextMenu.MediaType getMediaType()
    • getX

      public int getX()
      Where the menu was asked for, in the units CefriumBrowser.sendMouseClick(int, int, int) takes.
    • getY

      public int getY()
    • cancel

      public void cancel()
      Closes the menu without running an entry.