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