public boolean canAcceptParent ( ElementBase parent ) { if ( ! canAcceptParent ( ) ) { return false ; } if ( ! canAcceptParent ( getClass ( ) , parent . getClass ( ) ) ) { rejectReason = getDisplayName ( ) + " does not accept " + parent . getDisplayName ( ) + " as a parent." ; } else { rejectReason = null ; } return rejectReason == null ; }
Returns true if this element may accept the specified element as a parent . Updates the reject reason with the result .