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

Method initComponentImpl

CodenameOne/src/com/codename1/ui/Form.java:2618–2658  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

showModalMethod · 0.95

Calls 14

getInstanceMethod · 0.95
isDesktopNativeChromeMethod · 0.95
registerAnimatedMethod · 0.95
isNativeCommandsMethod · 0.80
getListenerCollectionMethod · 0.80
getParentMethod · 0.65
addLongPressListenerMethod · 0.65
setNativeCommandsMethod · 0.45
getCommandsMethod · 0.45
getComponentFormMethod · 0.45

Tested by

no test coverage detected