KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > browser > macosx > DefaultBrowserFactory


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.help.internal.browser.macosx;
12
13 import org.eclipse.help.browser.*;
14
15 public class DefaultBrowserFactory implements IBrowserFactory {
16
17     public DefaultBrowserFactory() {
18         super();
19     }
20
21     /*
22      * @see IBrowserFactory#isAvailable()
23      */

24     public boolean isAvailable() {
25         return System.getProperty("os.name").equals("Mac OS X"); //$NON-NLS-1$ //$NON-NLS-2$
26
/*
27          * we assume that every Mac OS X has an "/usr/bin/osascript" so we don't
28          * test any further
29          */

30     }
31
32     /*
33      * @see IBrowserFactory#createBrowser()
34      */

35     public IBrowser createBrowser() {
36         return DefaultBrowserAdapter.getInstance();
37     }
38 }
39
Popular Tags