NASA World Wind

gov.nasa.worldwind.util.webview
Class BasicWebViewFactory

java.lang.Object
  extended by gov.nasa.worldwind.util.webview.BasicWebViewFactory
All Implemented Interfaces:
WebViewFactory

public class BasicWebViewFactory
extends Object
implements WebViewFactory

Factory implementation for creating WebView instances. This implementation detected the operating system, and creates an instance of WebView appropriate for that system. On Windows, it creates WindowsWebView. On Mac OS, it creates MacWebView. Other operating systems are not supported at this time.


Constructor Summary
BasicWebViewFactory()
          Create the factory.
 
Method Summary
protected  WebView createLinuxWebView(Dimension frameSize)
          Create a WebView for Linux.
protected  WebView createMacWebView(Dimension frameSize)
          Create a WebView for Mac OS.
protected  WebView createUnknownOSWebView(Dimension frameSize)
          Create a WebView for an operating system other than Windows, Mac, or Linux.
 WebView createWebView(Dimension frameSize)
          Returns a new WebView with the specified frameSize.
protected  WebView createWindowsWebView(Dimension frameSize)
          Create a WebView for Windows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicWebViewFactory

public BasicWebViewFactory()
Create the factory.

Method Detail

createLinuxWebView

protected WebView createLinuxWebView(Dimension frameSize)
Create a WebView for Linux. This implementation throws UnsupportedOperationException. Subclasses may override this method to add Linux support to the factory.

Parameters:
frameSize - The size in pixels of the WebView's window frame.
Returns:
WebView for Linux.
Throws:
UnsupportedOperationException - Linux WebView is not supported at this time.

createMacWebView

protected WebView createMacWebView(Dimension frameSize)
Create a WebView for Mac OS.

Parameters:
frameSize - The size in pixels of the WebView's window frame.
Returns:
WebView instance for Mac.

createUnknownOSWebView

protected WebView createUnknownOSWebView(Dimension frameSize)
Create a WebView for an operating system other than Windows, Mac, or Linux. This implementation throws UnsupportedOperationException. Subclasses may override this method to add support for another operating system to the factory.

Parameters:
frameSize - The size in pixels of the WebView's window frame.
Returns:
WebView instance
Throws:
UnsupportedOperationException - WebView is only implemented for Windows and Mac at this time.

createWebView

public WebView createWebView(Dimension frameSize)
Returns a new WebView with the specified frameSize.

Specified by:
createWebView in interface WebViewFactory
Parameters:
frameSize - The size in pixels of the WebView's window frame.
Returns:
a new WebView with the specified frameSize.

createWindowsWebView

protected WebView createWindowsWebView(Dimension frameSize)
Create a WebView for Windows.

Parameters:
frameSize - The size in pixels of the WebView's window frame.
Returns:
WebView instance for Windows.

NASA World Wind