示例#1
0
 public String getTitle() {
   if (f != null) {
     return f.getTitle();
   } else if (d != null) {
     return d.getTitle();
   } else if (jif != null) {
     return jif.getTitle();
   } else {
     return null; // throw new IllegalStateException();
   }
 }
 /**
  * Indicates whether the name and title of the given AWT or Swing {@code Dialog} match the ones in
  * this matcher.
  *
  * <p><b>Note:</b> This method is accessed in the current executing thread. Such thread may or may
  * not be the event dispatch thread (EDT.) Client code must call this method from the EDT.
  *
  * @param dialog the {@code Dialog} to match.
  * @return {@code true} if the {@code Dialog} matches the search criteria in this matcher.
  */
 @RunsInCurrentThread
 @Override
 protected boolean isMatching(@Nonnull Dialog dialog) {
   return isNameMatching(dialog.getName()) && arePropertyValuesMatching(title, dialog.getTitle());
 }
 public WindowMenuItem(final Dialog window) {
   this(window, window.getTitle());
 }