From f2b3b5f5e7e80e2c8ac1e4aebf3119494e1992f9 Mon Sep 17 00:00:00 2001 From: "ashuk%eng.sun.com" Date: Tue, 12 Sep 2000 16:44:32 +0000 Subject: [PATCH] author = ashuk r = a = edburns Bug = 51280 git-svn-id: svn://10.0.0.236/trunk@78881 18797224-902f-48f8-a5cc-f745e15eee43 --- .../org/mozilla/webclient/test/EMWindow.java | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/mozilla/java/webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java b/mozilla/java/webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java index 972d8ffed1b..78d788e7431 100644 --- a/mozilla/java/webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java +++ b/mozilla/java/webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java @@ -51,7 +51,7 @@ import org.w3c.dom.Document; * This is a test application for using the BrowserControl. * - * @version $Id: EMWindow.java,v 1.17 2000-08-17 19:54:43 edburns%acm.org Exp $ + * @version $Id: EMWindow.java,v 1.18 2000-09-12 16:44:32 ashuk%eng.sun.com Exp $ * * @see org.mozilla.webclient.BrowserControlFactory @@ -427,15 +427,7 @@ public void actionPerformed (ActionEvent evt) public void dialogDismissed(Dialog d) { if(findDialog.wasClosed()) { System.out.println("Find Dialog Closed"); - try { - CurrentPage currentPage = (CurrentPage) - browserControl.queryInterface(BrowserControl.CURRENT_PAGE_NAME); - currentPage.resetFind(); - } - catch (Exception e) { - System.out.println(e.getMessage()); - } - } + } else { String searchString = findDialog.getTextField().getText(); if(searchString == null) { @@ -444,6 +436,14 @@ public void dialogDismissed(Dialog d) { } else if(searchString.equals("")) { System.out.println("Clear button selected"); + try { + CurrentPage currentPage = (CurrentPage) + browserControl.queryInterface(BrowserControl.CURRENT_PAGE_NAME); + currentPage.resetFind(); + } + catch (Exception e) { + System.out.println(e.getMessage()); + } } else { System.out.println("Tring to Find String - " + searchString); @@ -462,14 +462,6 @@ public void dialogDismissed(Dialog d) { public void dialogCancelled(Dialog d) { System.out.println("Find Dialog Closed"); - try { - CurrentPage currentPage = (CurrentPage) - browserControl.queryInterface(BrowserControl.CURRENT_PAGE_NAME); - currentPage.resetFind(); - } - catch (Exception e) { - System.out.println(e.getMessage()); - } }