protected boolean isExpanded(Component node){
  Object e=node.getClientProperty(KEY_EXPANDED);
  return e != null && e.equals("true");
}

protected boolean isExpanded ( Component node ) { Object e = node . getClientProperty ( KEY_EXPANDED ) ; return e != null && e . equals ( "true" ) ; }
this method returns true if the given node is expanded .
