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

Method getCurrent

CodenameOne/src/com/codename1/ui/Display.java:2743–2765  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2741 /// @return the form currently displayed on the screen or null if no form is
2742 /// currently displayed
2743 public Form getCurrent() {
2744 Form current = impl.getCurrentForm();
2745 if (current instanceof Dialog) {
2746 if (current.isMenu() || current.isDisposed()) {
2747 Form p = current.getPreviousForm();
2748 if (p != null) {
2749 return p;
2750 }
2751
2752 // we are in the middle of a transition so we should extract the next form
2753 if (animationQueue != null) {
2754 int size = animationQueue.size();
2755 for (int iter = 0; iter < size; iter++) {
2756 Animation o = animationQueue.get(iter);
2757 if (o instanceof Transition) {
2758 return (Form) ((Transition) o).getDestination();
2759 }
2760 }
2761 }
2762 }
2763 }
2764 return current;
2765 }
2766
2767 /// Return the number of alpha levels supported by the implementation.
2768 ///

Callers 15

isTextEditingMethod · 0.95
fireMouseWheelEventMethod · 0.95
fireMagnifyGestureMethod · 0.95
fireRotationGestureMethod · 0.95
delegatesDisplayStateMethod · 0.95
getActiveEditingAreaMethod · 0.95
dispatchPointerDragMethod · 0.95
showRSSEntryMethod · 0.45
getLayeredPaneMethod · 0.45
moveLayerToFrontMethod · 0.45

Calls 7

isMenuMethod · 0.95
isDisposedMethod · 0.95
getPreviousFormMethod · 0.95
getDestinationMethod · 0.80
sizeMethod · 0.65
getMethod · 0.65
getCurrentFormMethod · 0.45

Tested by 15

delegatesDisplayStateMethod · 0.76
getActiveEditingAreaMethod · 0.76
dispatchPointerDragMethod · 0.76
findByNameMethod · 0.36
findLabelTextMethod · 0.36
goBackMethod · 0.36
clickMenuItemMethod · 0.36
getToolbarCommandsMethod · 0.36
showSidemenuMethod · 0.36
ensureVisibleMethod · 0.36
waitForFormTitleImplMethod · 0.36