com.teamdev.jxbrowser.event
Interface ContextMenuListener

All Superinterfaces:
java.util.EventListener

public interface ContextMenuListener
extends java.util.EventListener

Uses to listen contex menu (usually popup menu) requests.

See Also:
WebBrowser

Field Summary
static long CONTEXT_BACKGROUND_IMAGE
          Context is a background image.
static long CONTEXT_DOCUMENT
          Context is the whole document.
static long CONTEXT_IMAGE
          Context is an image element.
static long CONTEXT_INPUT
          Context is an input element.
static long CONTEXT_LINK
          Context is a link element.
static long CONTEXT_NONE
          No context.
static long CONTEXT_TEXT
          Context is a text area element.
 
Method Summary
 void contextMenuRequested(ContextMenuEvent event)
          Called when the browser receives a context menu event (for example user is right-mouse clicking somewhere on the document).
 

Field Detail

CONTEXT_NONE

static final long CONTEXT_NONE
No context.

See Also:
Constant Field Values

CONTEXT_LINK

static final long CONTEXT_LINK
Context is a link element.

See Also:
Constant Field Values

CONTEXT_IMAGE

static final long CONTEXT_IMAGE
Context is an image element.

See Also:
Constant Field Values

CONTEXT_DOCUMENT

static final long CONTEXT_DOCUMENT
Context is the whole document.

See Also:
Constant Field Values

CONTEXT_TEXT

static final long CONTEXT_TEXT
Context is a text area element.

See Also:
Constant Field Values

CONTEXT_INPUT

static final long CONTEXT_INPUT
Context is an input element.

See Also:
Constant Field Values

CONTEXT_BACKGROUND_IMAGE

static final long CONTEXT_BACKGROUND_IMAGE
Context is a background image.

See Also:
Constant Field Values
Method Detail

contextMenuRequested

void contextMenuRequested(ContextMenuEvent event)
Called when the browser receives a context menu event (for example user is right-mouse clicking somewhere on the document). The combination of flags, along with the other attributes of event, indicate where and what was clicked on.

The following table describes what context flags and node combinations are possible.

event.getContextFlags() event.getTargetNode()

CONTEXT_LINK <A>

CONTEXT_IMAGE <IMG>

CONTEXT_IMAGE | CONTEXT_LINK <IMG> with <A> as an ancestor

CONTEXT_INPUT <INPUT>

CONTEXT_INPUT | CONTEXT_IMAGE <INPUT> with type=image

CONTEXT_TEXT <TEXTAREA>

CONTEXT_DOCUMENT <HTML>

CONTEXT_BACKGROUND_IMAGE <HTML> with background image

Parameters:
event -