org.gjt.btools.license
Class License

java.lang.Object
  |
  +--org.gjt.btools.license.License

public class License
extends java.lang.Object

Provides access to the full descriptions of various licenses.


Field Summary
static int Artistic
          The Artistic License.
static int BSD
          The BSD License.
static int GPL
          The GNU General Public License.
static int LGPL
          The GNU Lesser General Public License.
 
Constructor Summary
License()
           
 
Method Summary
static java.io.BufferedReader getReader(int license)
          Returns an open reader to the full description of the given license.
static java.net.URL getResource(int license)
          Returns an URL to a resource that contains a full description of the given license.
static javax.swing.JTextArea getViewer(int license)
          Returns an uneditable text area displaying the full description of the given license.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GPL

public static final int GPL
The GNU General Public License.

See Also:
Constant Field Values

LGPL

public static final int LGPL
The GNU Lesser General Public License.

See Also:
Constant Field Values

BSD

public static final int BSD
The BSD License.

See Also:
Constant Field Values

Artistic

public static final int Artistic
The Artistic License.

See Also:
Constant Field Values
Constructor Detail

License

public License()
Method Detail

getResource

public static java.net.URL getResource(int license)
Returns an URL to a resource that contains a full description of the given license. The resource will be in the form of a plain text file.

Parameters:
license - specifies which license to locate; this must be one of the static license constants defined in this class.
Returns:
an URL to the corresponding full description, or null if an invalid license was specified.

getReader

public static java.io.BufferedReader getReader(int license)
Returns an open reader to the full description of the given license. The description will be in the form of a plain text file.

Parameters:
license - specifies which license to read; this must be one of the static license constants defined in this class.
Returns:
an open reader to the corresponding full description, or null if an invalid license was specified or the description could not be read.

getViewer

public static javax.swing.JTextArea getViewer(int license)
Returns an uneditable text area displaying the full description of the given license.

Parameters:
license - specifies which license to display; this must be one of the static license constants defined in this class.
Returns:
a component displaying the corresponding full description, or null if an invalid license was specified or the description could not be read.


Copyright © 1998-2001, Ben Burton
This software is released under the GNU Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).