コード例 #1
0
 /** {@inheritDoc} */
 public void toBeDisplayed(boolean visible) {
   super.toBeDisplayed(visible);
   Window w = Utilities.getParentDialog(this);
   if (w instanceof GenericDialog) {
     ((GenericDialog) w).getRootPane().setDefaultButton(null);
   } else if (w instanceof GenericFrame) {
     ((GenericFrame) w).getRootPane().setDefaultButton(null);
   }
 }
コード例 #2
0
 /**
  * Sets the title that will be displayed in the dialog containing this panel.
  *
  * @param title the title.
  */
 public void setTitle(Message title) {
   this.title = title;
   Window w = Utilities.getParentDialog(this);
   if (w instanceof GenericDialog) {
     ((GenericDialog) w).updateTitle();
   } else if (w instanceof GenericFrame) {
     ((GenericFrame) w).updateTitle();
   }
 }