public boolean isAllSpace(){
  boolean isAllSpace=true;
  for (int i=0; i < text.length(); i++) {
    if (!Character.isWhitespace(text.charAt(i))) {
      isAllSpace=false;
      break;
    }
  }
  return isAllSpace;
}

public boolean isAllSpace ( ) { boolean isAllSpace = true ; for ( int i = 0 ; i < text . length ( ) ; i ++ ) { if ( ! Character . isWhitespace ( text . charAt ( i ) ) ) { isAllSpace = false ; break ; } } return isAllSpace ; }
returns true if this template text contains whitespace only .
