| 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 |