diff options
author | Dorian Birsan | 2003-02-17 01:50:22 +0000 |
---|---|---|
committer | Dorian Birsan | 2003-02-17 01:50:22 +0000 |
commit | 76e8566e7c4c48b7c76a0048abd112d58f3015db (patch) | |
tree | 36ad484fe49f39e1812a2f12149e97a4d65171ed /org.eclipse.help.ui | |
parent | b3eb600de85110acbaabafe9d149b8c176fcc297 (diff) | |
download | eclipse.platform.ua-76e8566e7c4c48b7c76a0048abd112d58f3015db.tar.gz eclipse.platform.ua-76e8566e7c4c48b7c76a0048abd112d58f3015db.tar.xz eclipse.platform.ua-76e8566e7c4c48b7c76a0048abd112d58f3015db.zip |
Refactor the browsers to move them to core help
Diffstat (limited to 'org.eclipse.help.ui')
-rw-r--r-- | org.eclipse.help.ui/src/org/eclipse/help/ui/browser/IBrowser.java | 52 | ||||
-rw-r--r-- | org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/BrowserManager.java | 58 |
2 files changed, 58 insertions, 52 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/IBrowser.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/IBrowser.java index 73ca7d3bf..baa154041 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/IBrowser.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/IBrowser.java @@ -8,56 +8,6 @@ package org.eclipse.help.ui.browser; * by clients to display documents for the given URLs. * @deprecated Use the org.eclipse.help.browser.IBrowser instead. */ -public interface IBrowser { - /** - * Closes the browser. - */ - public void close(); - /** - * Queries the browser if close - * method is supported. - * @return true if the method is fully implemented - */ - public boolean isCloseSupported(); - /** - * Displays document with the given URL, - * and makes the browser visible. - * This method starts the browser if necessary. - * @param url the URL to display in the browser - */ - public void displayURL(String url); - /** - * Queries the browser if setLocation - * method is supported. - * @return true if the method is fully implemented - */ - public boolean isSetLocationSupported(); - /** - * Queries the browser if setSize - * method is supported. - * @return true if the method is fully implemented - */ - public boolean isSetSizeSupported(); - /** - * Causes browser to be moved to the specified - * location. If the actual browser is not visible, - * the next time it becomes visible, it will be shown - * at the give location - * @param x horizontal coordinates of the left-top - * external corner - * @param y vertical coordinates of the left-top - * external corner - */ - public void setLocation(int x, int y); - /** - * Causes browser to be resized to the specified - * size. If the actual browser is not visible, - * the next time it becomes visible, it will be shown - * with the give size. - * @param width width in pixels - * @param height height in pixels - * external corner - */ - public void setSize(int width, int height); +public interface IBrowser extends org.eclipse.help.browser.IBrowser { } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/BrowserManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/BrowserManager.java index a76032f4c..865efbdac 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/BrowserManager.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/BrowserManager.java @@ -31,7 +31,7 @@ public class BrowserManager { * Creates web browser */ public IBrowser createBrowser() { - return null; + return new Browser(org.eclipse.help.internal.browser.BrowserManager.getInstance().createBrowser()); } /** @@ -39,4 +39,60 @@ public class BrowserManager { */ public void closeAll() { } + + class Browser implements IBrowser { + private org.eclipse.help.browser.IBrowser browser; + public Browser(org.eclipse.help.browser.IBrowser browser) { + this.browser = browser; + } + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#close() + */ + public void close() { + browser.close(); + } + + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#displayURL(java.lang.String) + */ + public void displayURL(String url) throws Exception { + browser.displayURL(url); + } + + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#isCloseSupported() + */ + public boolean isCloseSupported() { + return browser.isCloseSupported(); + } + + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#isSetLocationSupported() + */ + public boolean isSetLocationSupported() { + return browser.isSetLocationSupported(); + } + + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#isSetSizeSupported() + */ + public boolean isSetSizeSupported() { + return browser.isSetSizeSupported(); + } + + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#setLocation(int, int) + */ + public void setLocation(int x, int y) { + browser.setLocation(x,y); + } + + /* (non-Javadoc) + * @see org.eclipse.help.browser.IBrowser#setSize(int, int) + */ + public void setSize(int width, int height) { + browser.setSize(width,height); + } + + } }
\ No newline at end of file |