Navigation Menu

Skip to content

Commit

Permalink
Added utility method to recursively defocus children of a given paren…
Browse files Browse the repository at this point in the history
…t (useful wehn swapping items in a live form).
  • Loading branch information
ovidiuiliescu committed Mar 17, 2014
1 parent 48b7c8f commit b2182ac
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -5617,6 +5617,15 @@ public static int getPaddingRight(Item item) {
public static Image cast(de.enough.polish.ui.Image img) {
return (Image)img.getNativeImage();
}

public static void defocusRecursive(Container c) {
for (int i=0;i<c.size();i++) {
if ( c.get(i) instanceof Container ) {
defocusRecursive( (Container) (c.get(i)) );
}
}
c.focusChild(-1);
}
//
// /**
// * Casts a J2ME Polish font into a MIDP font
Expand Down

0 comments on commit b2182ac

Please sign in to comment.