Added Mark Goddard from OMTP's changes to add "Refresh" to API and implementation.
Also added Refresh button to EmbeddedMozilla. git-svn-id: svn://10.0.0.236/trunk@45913 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -24,7 +24,7 @@ package org.mozilla.webclient;
|
||||
* <B>BrowserControlCore</B> Defines the core methods for browsing
|
||||
*
|
||||
|
||||
* @version $Id: BrowserControlCore.java,v 1.1 1999-07-30 01:03:04 edburns%acm.org Exp $
|
||||
* @version $Id: BrowserControlCore.java,v 1.2 1999-09-03 19:28:44 edburns%acm.org Exp $
|
||||
*
|
||||
|
||||
* @see org.mozilla.webclient.BrowserControlExtended
|
||||
@@ -47,6 +47,11 @@ public boolean back() throws Exception;
|
||||
|
||||
public boolean forward() throws Exception;
|
||||
|
||||
// added by Mark Goddard OTMP 9/2/1999
|
||||
public boolean refresh() throws Exception;
|
||||
|
||||
public int getNativeWebShell();
|
||||
|
||||
} // end of interface BrowserControlCore
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.awt.Rectangle;
|
||||
*
|
||||
* <B>Lifetime And Scope</B> <P>
|
||||
*
|
||||
* @version $Id: BrowserControlImpl.java,v 1.1 1999-07-30 01:03:05 edburns%acm.org Exp $
|
||||
* @version $Id: BrowserControlImpl.java,v 1.2 1999-09-03 19:28:44 edburns%acm.org Exp $
|
||||
*
|
||||
* @see org.mozilla.webclient.BrowserControl
|
||||
*
|
||||
@@ -202,6 +202,14 @@ public String getURL (int historyIndex) throws Exception
|
||||
return BrowserControlMozillaShim.webShellGetURL(nativeWebShell, historyIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Added by Mark Goddard OTMP 9/2/1999
|
||||
*/
|
||||
public boolean refresh() throws Exception
|
||||
{
|
||||
return BrowserControlMozillaShim.webShellRefresh(nativeWebShell);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -236,7 +244,7 @@ public static void main(String [] args)
|
||||
// BrowserControlImpl me = new BrowserControlImpl();
|
||||
Log.setApplicationName("BrowserControlImpl");
|
||||
Log.setApplicationVersion("0.0");
|
||||
Log.setApplicationVersionDate("$Id: BrowserControlImpl.java,v 1.1 1999-07-30 01:03:05 edburns%acm.org Exp $");
|
||||
Log.setApplicationVersionDate("$Id: BrowserControlImpl.java,v 1.2 1999-09-03 19:28:44 edburns%acm.org Exp $");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import java.awt.*;
|
||||
* There is one instance of this class and all of the exposed methods
|
||||
* are static.
|
||||
|
||||
* @version $Id: BrowserControlMozillaShim.java,v 1.2 1999-08-10 03:59:04 mark.lin%eng.sun.com Exp $
|
||||
* @version $Id: BrowserControlMozillaShim.java,v 1.3 1999-09-03 19:28:45 edburns%acm.org Exp $
|
||||
*
|
||||
* @see org.mozilla.webclient.BrowserControlImpl
|
||||
|
||||
@@ -485,6 +485,21 @@ public static String webShellGetURL(int webShellPtr,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Added by Mark Goddard OTMP 9/2/1999
|
||||
*/
|
||||
|
||||
public static boolean webShellRefresh(int webShellPtr) throws Exception
|
||||
{
|
||||
synchronized(lock) {
|
||||
if (initialized) {
|
||||
return instance.nativeWebShellRefresh(webShellPtr);
|
||||
}
|
||||
else {
|
||||
throw new Exception("instance is not initialized.");
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Native interfaces
|
||||
//
|
||||
@@ -553,6 +568,11 @@ private native int nativeWebShellGetHistoryLength (int webShellPtr) throws Exce
|
||||
private native int nativeWebShellGetHistoryIndex (int webShellPtr) throws Exception;
|
||||
private native String nativeWebShellGetURL (int webShellPtr, int aHistoryIndex) throws Exception;
|
||||
|
||||
/**
|
||||
* Added by Mark Goddard OTMP 9/2/1999
|
||||
*/
|
||||
private native boolean nativeWebShellRefresh (int webShellPtr) throws Exception;
|
||||
|
||||
//
|
||||
// General Methods
|
||||
//
|
||||
@@ -569,7 +589,7 @@ public static void main(String [] args)
|
||||
BrowserControlMozillaShim me = new BrowserControlMozillaShim();
|
||||
Log.setApplicationName("BrowserControlMozillaShim");
|
||||
Log.setApplicationVersion("0.0");
|
||||
Log.setApplicationVersionDate("$Id: BrowserControlMozillaShim.java,v 1.2 1999-08-10 03:59:04 mark.lin%eng.sun.com Exp $");
|
||||
Log.setApplicationVersionDate("$Id: BrowserControlMozillaShim.java,v 1.3 1999-09-03 19:28:45 edburns%acm.org Exp $");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.mozilla.webclient.*;
|
||||
* This is a test application for using the BrowserControl.
|
||||
|
||||
*
|
||||
* @version $Id: EmbeddedMozilla.java,v 1.1 1999-07-30 01:03:07 edburns%acm.org Exp $
|
||||
* @version $Id: EmbeddedMozilla.java,v 1.2 1999-09-03 19:28:45 edburns%acm.org Exp $
|
||||
*
|
||||
* @see org.mozilla.webclient.BrowserControlCanvasFactory
|
||||
|
||||
@@ -85,6 +85,7 @@ public class EmbeddedMozilla extends Frame implements ActionListener {
|
||||
makeItem(buttonsPanel, "Back", 0, 0, 1, 1, 0.0, 0.0);
|
||||
makeItem(buttonsPanel, "Forward", 1, 0, 1, 1, 0.0, 0.0);
|
||||
makeItem(buttonsPanel, "Stop", 2, 0, 1, 1, 0.0, 0.0);
|
||||
makeItem(buttonsPanel, "Refresh", 3, 0, 1, 1, 0.0, 0.0);
|
||||
|
||||
// Create the control panel
|
||||
controlPanel = new Panel();
|
||||
@@ -148,6 +149,9 @@ public class EmbeddedMozilla extends Frame implements ActionListener {
|
||||
else if (command.equals("Stop")) {
|
||||
browserControl.stop();
|
||||
}
|
||||
else if (command.equals("Refresh")) {
|
||||
browserControl.refresh();
|
||||
}
|
||||
else {
|
||||
browserControl.loadURL(urlField.getText());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user