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

Method getHiddenX

CodenameOne/src/com/codename1/ui/Sheet.java:1071–1085  ·  view source on GitHub ↗
(Container cnt)

Source from the content-addressed store, hash-verified

1069 ///
1070 /// - `cnt`: The container in the FormLayeredPane where the sheet is to be rendered.
1071 private int getHiddenX(Container cnt) {
1072 switch (getPositionInt()) {
1073 case S:
1074 case N:
1075 return 0;
1076 case C:
1077 return (cnt.getWidth() - getPreferredW(cnt)) / 2;
1078 case E:
1079 return cnt.getWidth();
1080 case W:
1081 return -getPreferredW(cnt);
1082 default:
1083 return 0;
1084 }
1085 }
1086
1087 /// Gets Y-coordinate of the sheet when it is hidden off-screen. This will be different
1088 /// depending on the position of the sheet.

Callers 3

showMethod · 0.95
hideMethod · 0.95

Calls 3

getPositionIntMethod · 0.95
getPreferredWMethod · 0.95
getWidthMethod · 0.65

Tested by

no test coverage detected