()
| 2616 | |
| 2617 | /// {@inheritDoc} |
| 2618 | @Override |
| 2619 | void initComponentImpl() { |
| 2620 | super.initComponentImpl(); |
| 2621 | dragged = null; |
| 2622 | if (Display.getInstance().isNativeCommands()) { |
| 2623 | Display.impl.setNativeCommands(menuBar.getCommands()); |
| 2624 | } else if (isDesktopNativeChrome() && toolbar != null) { |
| 2625 | // bridge the (hidden) toolbar's commands to the native desktop menu bar |
| 2626 | Display.impl.setNativeCommands(toolbar.getAllNativeMenuCommands()); |
| 2627 | } |
| 2628 | if (getParent() != null) { |
| 2629 | Form f = getParent().getComponentForm(); |
| 2630 | if (f != null) { |
| 2631 | f.registerAnimated(this); |
| 2632 | if (pointerPressedListeners != null) { |
| 2633 | for (ActionListener l : (Collection<ActionListener>) pointerPressedListeners.getListenerCollection()) { |
| 2634 | f.addPointerPressedListener(l); |
| 2635 | } |
| 2636 | pointerPressedListeners = null; |
| 2637 | } |
| 2638 | if (pointerDraggedListeners != null) { |
| 2639 | for (ActionListener l : (Collection<ActionListener>) pointerDraggedListeners.getListenerCollection()) { |
| 2640 | f.addPointerDraggedListener(l); |
| 2641 | } |
| 2642 | pointerDraggedListeners = null; |
| 2643 | } |
| 2644 | if (pointerReleasedListeners != null) { |
| 2645 | for (ActionListener l : (Collection<ActionListener>) pointerReleasedListeners.getListenerCollection()) { |
| 2646 | f.addPointerReleasedListener(l); |
| 2647 | } |
| 2648 | pointerReleasedListeners = null; |
| 2649 | } |
| 2650 | if (longPressListeners != null) { |
| 2651 | for (ActionListener l : (Collection<ActionListener>) longPressListeners.getListenerCollection()) { |
| 2652 | f.addLongPressListener(l); |
| 2653 | } |
| 2654 | longPressListeners = null; |
| 2655 | } |
| 2656 | } |
| 2657 | } |
| 2658 | } |
| 2659 | |
| 2660 | /// {@inheritDoc} |
| 2661 | @Override |
no test coverage detected