MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / longPointerPress

Method longPointerPress

CodenameOne/src/com/codename1/ui/Form.java:3066–3086  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

3064
3065 /// {@inheritDoc}
3066 @Override
3067 public void longPointerPress(int x, int y) {
3068 if (longPressListeners != null && longPressListeners.hasListeners()) {
3069 ActionEvent ev = new ActionEvent(this, ActionEvent.Type.LongPointerPress, x, y);
3070 longPressListeners.fireActionEvent(ev);
3071 if (ev.isConsumed()) {
3072 return;
3073 }
3074 }
3075 // a long press is the touch equivalent of a right click: surface it as a context menu request
3076 Component ctxCmp = resolveInputComponent(x, y);
3077 if (ctxCmp != null && ctxCmp.fireContextMenu(x, y)) {
3078 return;
3079 }
3080 if (focused != null && focused.contains(x, y)) {
3081 if (focused.getComponentForm() == this) { //NOPMD CompareObjectsWithEquals
3082 LeadUtil.longPointerPress(focused, x, y);
3083
3084 }
3085 }
3086 }
3087
3088 /// Indicates whether this form wants to receive pointerReleased events for touch
3089 /// events that started in a different form

Callers 5

edtLoopImplMethod · 0.95
testLongPressEventMethod · 0.95

Calls 8

isConsumedMethod · 0.95
resolveInputComponentMethod · 0.95
fireContextMenuMethod · 0.95
longPointerPressMethod · 0.95
containsMethod · 0.65
hasListenersMethod · 0.45
fireActionEventMethod · 0.45
getComponentFormMethod · 0.45