tribble.build
Class AbstractVersion

java.lang.Object
  extended bytribble.build.AbstractVersion
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.event.WindowListener
Direct Known Subclasses:
TestVersionInfo, VersionInfo

public abstract class AbstractVersion
extends java.lang.Object
implements java.awt.event.WindowListener, java.awt.event.ActionListener

Display the version information for a package.

This abstract base class provides the capabilities to display version/build information for a package. Concrete classes that extend this base class must provide the actual version information. Such derived classes can be machine-generated; see MakeVersionInfo.

Since:
2002-07-31
Version:
$Revision: 1.6 $ $Date: 2002/11/03 15:54:47 $
Author:
David R. Tribble, david@tribble.com.
Copyright ©2002 by David R. Tribble, all rights reserved.
Permission is granted to freely use and distribute this source code provided that the original copyright and authorship notices remain intact.
See Also:
MakeVersionInfo

Field Summary
protected  java.awt.Frame m_frame
          The main GUI frame/window.
 
Constructor Summary
protected AbstractVersion()
          Default constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          AWT window event: a window action has been performed.
abstract  java.util.Date getBuildDate()
          Retrieve the build date.
abstract  java.lang.String getIsoBuildDate()
          Retrieve the build date.
abstract  int getMajor()
          Retrieve the major release number.
abstract  int getMinor()
          Retrieve the minor release number.
abstract  java.lang.String getName()
          Retrieve the component name.
abstract  java.lang.String getPackage()
          Retrieve the package name.
abstract  java.lang.String getPatch()
          Retrieve the patch number/name.
abstract  java.lang.String getVersion()
          Retrieve the version string.
abstract  java.lang.String getWhatString()
          Retrieve the embedded 'what' string.
static void run(java.lang.String[] args, AbstractVersion vs)
          Execute this class.
 void showGui()
          Display the version information (contained in the 'what' string) in GUI windowing form.
 void showText()
          Display the version information (contained in the 'what' string) in text form to the standard output stream.
 void windowActivated(java.awt.event.WindowEvent ev)
          AWT window event: window has been activated.
 void windowClosed(java.awt.event.WindowEvent ev)
          AWT window event: window has been closed.
 void windowClosing(java.awt.event.WindowEvent ev)
          AWT window event: window is being closed.
 void windowDeactivated(java.awt.event.WindowEvent ev)
          AWT window event: window has been deactivated.
 void windowDeiconified(java.awt.event.WindowEvent ev)
          AWT window event: window has been deiconified (maximized).
 void windowIconified(java.awt.event.WindowEvent ev)
          AWT window event: window has been iconified (minimized).
 void windowOpened(java.awt.event.WindowEvent ev)
          AWT window event: window has been opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_frame

protected java.awt.Frame m_frame
The main GUI frame/window.

Constructor Detail

AbstractVersion

protected AbstractVersion()
Default constructor.

Since:
1.1, 2002-07-31
Method Detail

run

public static void run(java.lang.String[] args,
                       AbstractVersion vs)
Execute this class.

Parameters:
args - Command line arguments.
vs - Version information, which should be an object of a class derived from this class (AbstractVersion).
Since:
1.6, 2002-11-03

getName

public abstract java.lang.String getName()
Retrieve the component name.

Returns:
The name (or title) of the component.
Since:
1.1, 2002-07-31

getPackage

public abstract java.lang.String getPackage()
Retrieve the package name.

Returns:
The name of the package, e.g. "my.package.name".
Since:
1.1, 2002-07-31

getVersion

public abstract java.lang.String getVersion()
Retrieve the version string.

Returns:
The version number of the package. This is typically of the form "M.m.u.p".
Since:
1.1, 2002-07-31

getMajor

public abstract int getMajor()
Retrieve the major release number.

Returns:
The major version number of the package. This is typically the first number of the whole version number.
Since:
1.1, 2002-07-31

getMinor

public abstract int getMinor()
Retrieve the minor release number.

Returns:
The minor version number of the package. This is typically the second number of the whole version number.
Since:
1.1, 2002-07-31

getPatch

public abstract java.lang.String getPatch()
Retrieve the patch number/name.

Returns:
The patch number or name of the package.
Since:
1.1, 2002-07-31

getBuildDate

public abstract java.util.Date getBuildDate()
Retrieve the build date.

Returns:
The date that the package was compiled.
Since:
1.1, 2002-07-31

getIsoBuildDate

public abstract java.lang.String getIsoBuildDate()
Retrieve the build date.

Returns:
The date that the package was compiled as a string in ISO-8601 format ("YYYY-MM-DD HH:MM").
Since:
1.1, 2002-07-31

getWhatString

public abstract java.lang.String getWhatString()
Retrieve the embedded 'what' string.

Returns:
A string containing one or more 'what' strings, each beginning with the prefix "@(#)" and ending with a suffix of "\n".
Since:
1.1, 2002-07-31

windowClosing

public void windowClosing(java.awt.event.WindowEvent ev)
AWT window event: window is being closed.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

windowActivated

public void windowActivated(java.awt.event.WindowEvent ev)
AWT window event: window has been activated.

Specified by:
windowActivated in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

windowClosed

public void windowClosed(java.awt.event.WindowEvent ev)
AWT window event: window has been closed.

Specified by:
windowClosed in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent ev)
AWT window event: window has been deactivated.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent ev)
AWT window event: window has been deiconified (maximized).

Specified by:
windowDeiconified in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

windowIconified

public void windowIconified(java.awt.event.WindowEvent ev)
AWT window event: window has been iconified (minimized).

Specified by:
windowIconified in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

windowOpened

public void windowOpened(java.awt.event.WindowEvent ev)
AWT window event: window has been opened.

Specified by:
windowOpened in interface java.awt.event.WindowListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
AWT window event: a window action has been performed.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
ev - The AWT window event.
Since:
1.1, 2002-07-31

showText

public void showText()
Display the version information (contained in the 'what' string) in text form to the standard output stream.

Since:
1.1, 2002-07-31

showGui

public void showGui()
Display the version information (contained in the 'what' string) in GUI windowing form.

Since:
1.1, 2002-07-31