Gatekeeper (16 13: 9 9:22), "if". if (ac instanceof Disable) {--- code -}
public static void disableComponents( AbstractComponent pComponent ) {
for( Object o : pComponent.getChildren() ) {
AbstractComponent ac = ( AbstractComponent ) o;
try {
if (ac instanceof Disable) {
Method m = ac.getClass().getMethod("setDisabled", Boolean.TYPE);
m.invoke(ac, true);
}
} catch( Exception e ) {
e.printStackTrace();
}
List children = ac.getChildren();
if( children != null ) {
disableComponents( ac );
}
}
}