|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractAction GPLAboutDialog
GPLAboutDialog is an extension of AbstractAction which will display an "About" dialog and/or the GPL when actionPerformed is invoked. GPLAboutDialog assumes the GPL is kept in the current folder and called license.txt
If the file cannot be read, the user will be asked if the program should try and download a new copy of the GPL from the internet.
The icon for the dialog that displays the GPL defaults to the local file gnu-logo.jpeg
The source and class files can be found at http://www.eldritch.org/erskin/GPLAboutDialog/GPLAboutDialog.java and http://www.eldritch.org/erskin/GPLAboutDialog/GPLAboutDialog.class
Naturally, this program is licensed under the GPL as well. Which is availble at http://www.fsf.org/copyleft/gpl.txt or from the GPLAboutDialog site.
The java source, the class file, the default gnu-logo, and the GNU license can be downloaded in one file from http://www.eldritch.org/erskin/GPLAboutDialog/GPLAboutDialog.tar.gz (~22k)
Field Summary |
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
GPLAboutDialog(java.awt.Component parent,
java.lang.String name,
java.lang.String version,
java.lang.String blurb,
java.lang.String copyright)
Constructs a new GPLAboutDialog with the default gnu_logo, default program icon, and the assumption that we are not using internal frames. |
|
GPLAboutDialog(java.awt.Component parent,
java.lang.String name,
java.lang.String version,
java.lang.String blurb,
java.lang.String copyright,
boolean internalFrames)
Constructs a new GPLAboutDialog with the default gnu_logo and the default program icon. |
|
GPLAboutDialog(java.awt.Component parent,
java.lang.String name,
java.lang.String version,
java.lang.String blurb,
java.lang.String copyright,
javax.swing.Icon programLogo)
Constructs a new GPLAboutDialog with default gnu_logo and assumes we are not using internal frames. |
|
GPLAboutDialog(java.awt.Component parent,
java.lang.String name,
java.lang.String version,
java.lang.String blurb,
java.lang.String copyright,
javax.swing.Icon programLogo,
boolean internalFrames)
Constructs a new GPLAboutDialog with default gnu_logo.jpeg. |
|
GPLAboutDialog(java.awt.Component parent,
java.lang.String name,
java.lang.String version,
java.lang.String blurb,
java.lang.String copyright,
javax.swing.Icon programLogo,
javax.swing.Icon gnuLogo,
boolean internalFrames)
Constructs a new GPLAboutDialog with absolutely all options. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Displays and about dialog box, regardless of the event, and offers to display the GNU GPL, offering to download it if it is not found locally. |
java.lang.String |
getBlurb()
Returns the current program purpose blurb the about dialog will display. |
java.lang.String |
getCopyright()
Returns the current author/copyright string the about dialog will display. |
javax.swing.Icon |
getGnuLogo()
Returns the current Icon that will be displayed on the GPL dialog if requested. |
java.lang.String |
getName()
Returns the current program name the about dialog will display. |
java.awt.Component |
getParent()
Returns the current parent Component the dialog will use when displayed. |
javax.swing.Icon |
getProgramLogo()
Returns the current Icon that will be displayed on the about dialog for the program. |
java.lang.String |
getVersion()
Returns the current version number the about dialog will display. |
boolean |
isInternalFrames()
Returns true if the about dialog will open internal
frames. |
void |
setBlurb(java.lang.Object blurb)
Assigns the program purpose blurb the about dialog will display. |
void |
setCopyright(java.lang.Object copyright)
Assigns the author/copyright string the about dialog will display. |
void |
setGnuLogo(javax.swing.Icon gnuLogo)
Assigns the Icon that will be displayed on the GPL dialog if requested. |
void |
setInternalFrames(boolean newInternalFrames)
Determines if the about diaog should be displayed using internal frames. |
void |
setName(java.lang.Object name)
Assigns the program name the about dialog will display. |
void |
setParent(java.awt.Component parent)
Assigns the parent Component the dialog will use when displayed. |
void |
setProgramLogo(javax.swing.Icon programLogo)
Assigns the Icon that will be displayed on the about dialog for the program. |
void |
setVersion(java.lang.Object version)
Assigns the version number the about dialog will display. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GPLAboutDialog(java.awt.Component parent, java.lang.String name, java.lang.String version, java.lang.String blurb, java.lang.String copyright, javax.swing.Icon programLogo, javax.swing.Icon gnuLogo, boolean internalFrames)
parent
- the parent Component for the dialogname
- the program nameversion
- the program version numberblurb
- the program purpose textcopyright
- the author/copyright textprogramLogo
- the Icon for the about dialoggnuLogo
- the Icon for the GPL dialoginternalFrames
- true
if internal frames
should be usedpublic GPLAboutDialog(java.awt.Component parent, java.lang.String name, java.lang.String version, java.lang.String blurb, java.lang.String copyright, javax.swing.Icon programLogo, boolean internalFrames)
parent
- the parent Component for the dialogname
- the program nameversion
- the program version numberblurb
- the program purpose textcopyright
- the author/copyright textprogramLogo
- the Icon for the about dialoginternalFrames
- true
if internal frames
should be usedpublic GPLAboutDialog(java.awt.Component parent, java.lang.String name, java.lang.String version, java.lang.String blurb, java.lang.String copyright, javax.swing.Icon programLogo)
parent
- the parent Component for the dialogname
- the program nameversion
- the program version numberblurb
- the program purpose textcopyright
- the author/copyright textprogramLogo
- the Icon for the about dialogpublic GPLAboutDialog(java.awt.Component parent, java.lang.String name, java.lang.String version, java.lang.String blurb, java.lang.String copyright, boolean internalFrames)
parent
- the parent Component for the dialogname
- the program nameversion
- the program version numberblurb
- the program purpose textcopyright
- the author/copyright textinternalFrames
- true
if internal frames
should be usedpublic GPLAboutDialog(java.awt.Component parent, java.lang.String name, java.lang.String version, java.lang.String blurb, java.lang.String copyright)
parent
- the parent Component for the dialogname
- the program nameversion
- the program version numberblurb
- the program purpose textcopyright
- the author/copyright textMethod Detail |
public java.awt.Component getParent()
Component
the dialog will be attached topublic void setParent(java.awt.Component parent)
parent
- the new parent objectspublic java.lang.String getName()
public void setName(java.lang.Object name)
name
- the new program name that will be displayedpublic java.lang.String getVersion()
public void setVersion(java.lang.Object version)
version
- the new version number that will be displayedpublic java.lang.String getBlurb()
public void setBlurb(java.lang.Object blurb)
blurb
- the new that will be displayedpublic java.lang.String getCopyright()
public void setCopyright(java.lang.Object copyright)
copyright
- the new author/copyright that will be displayedpublic boolean isInternalFrames()
true
if the about dialog will open internal
frames.
true
if internal frames will be displayedpublic void setInternalFrames(boolean newInternalFrames)
public javax.swing.Icon getGnuLogo()
Icon
that will be displayed on the GPL dialogpublic void setGnuLogo(javax.swing.Icon gnuLogo)
gnuLogo
- the new Icon for the GPL dialogpublic javax.swing.Icon getProgramLogo()
null
which should result in
JOptionPane
using it's internal information icon
Icon
that will be displayed on the GPL dialogpublic void setProgramLogo(javax.swing.Icon programLogo)
programLogo
- the new program Icon for the about dialogpublic void actionPerformed(java.awt.event.ActionEvent e)
e
- ignored action event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |