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

Method countFocusables

CodenameOne/src/com/codename1/ui/Form.java:3865–3878  ·  view source on GitHub ↗
(Container c)

Source from the content-addressed store, hash-verified

3863 }
3864
3865 private int countFocusables(Container c) {
3866 int count = 0;
3867 int t = c.getComponentCount();
3868 for (int iter = 0; iter < t; iter++) {
3869 Component cmp = c.getComponentAt(iter);
3870 if (cmp.isFocusable()) {
3871 count++;
3872 }
3873 if (cmp instanceof Container) {
3874 count += countFocusables((Container) cmp);
3875 }
3876 }
3877 return count;
3878 }
3879
3880 private int isSingleFocusMode(int b, Container c) {
3881 int t = c.getComponentCount();

Callers 1

isSingleFocusModeMethod · 0.95

Calls 3

isFocusableMethod · 0.95
getComponentCountMethod · 0.65
getComponentAtMethod · 0.45

Tested by

no test coverage detected