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

Method showDialog

CodenameOne/src/com/codename1/ui/Form.java:2837–2844  ·  view source on GitHub ↗
(boolean modal, boolean reverse)

Source from the content-addressed store, hash-verified

2835 /// The default version of show dialog shows the dialog occupying the center portion
2836 /// of the screen.
2837 void showDialog(boolean modal, boolean reverse) {
2838 int h = Display.getInstance().getDisplayHeight() - menuBar.getPreferredH() - title.getPreferredH();
2839 int w = Display.getInstance().getDisplayWidth();
2840 int topSpace = h / 100 * 20;
2841 int bottomSpace = h / 100 * 10;
2842 int sideSpace = w / 100 * 20;
2843 showModal(topSpace, bottomSpace, sideSpace, sideSpace, true, modal, reverse);
2844 }
2845
2846 /// Works only for modal forms by returning to the previous form
2847 void dispose() {

Callers 1

showModalMethod · 0.95

Calls 5

getInstanceMethod · 0.95
showModalMethod · 0.95
getDisplayHeightMethod · 0.45
getPreferredHMethod · 0.45
getDisplayWidthMethod · 0.45

Tested by

no test coverage detected