visad.data.amanda
Class NuView

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by visad.data.amanda.NuView
All Implemented Interfaces:
WindowFocusListener, WindowListener, WindowStateListener, EventListener, CmdlineConsumer

public class NuView
extends WindowAdapter
implements CmdlineConsumer

run 'java NuView in_file' to display data.
try 'java NuView 100events.r'


Constructor Summary
NuView(String[] args)
           
 
Method Summary
 int checkKeyword(String mainName, int thisArg, String[] args)
          Handle subclass-specific command line options and their arguments.
 int checkOption(String mainName, char ch, String arg)
          Handle subclass-specific command line options and their arguments.
 boolean finalizeArgs(String mainName)
          Validate arguments after argument parsing has finished.
 void initializeArgs()
          Method used to initialize any instance variables which may be changed by a cmdline option.
 String keywordUsage()
          A short string included in the usage message to indicate valid keywords.
static void main(String[] args)
           
 String optionUsage()
          A short string included in the usage message to indicate valid options.
 void windowClosing(WindowEvent evt)
           
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NuView

public NuView(String[] args)
       throws RemoteException,
              VisADException
Throws:
RemoteException
VisADException
Method Detail

checkKeyword

public int checkKeyword(String mainName,
                        int thisArg,
                        String[] args)
Description copied from interface: CmdlineConsumer
Handle subclass-specific command line options and their arguments.

Specified by:
checkKeyword in interface CmdlineConsumer
Parameters:
mainName - The name of the main class (useful for error messages.)
thisArg - The index of the current keyword.
args - The full list of arguments.
Returns:
less than 0 to indicate an error
0 to indicate that this argument is not used by this class
1 or more to indicate the number of arguments used

checkOption

public int checkOption(String mainName,
                       char ch,
                       String arg)
Description copied from interface: CmdlineConsumer
Handle subclass-specific command line options and their arguments.

If -abc -d efg -h -1 -i is specified, this method will be called a maximum of 5 times:
Note that either of the last two method calls may not happen if the preceeding method call claims to have used the following argument (by returning 2.

For example, if the third call (where ch is set to 'h') returns 0 or 1, the next call will contain '1' and "-i". If, however, the third call returns 2, the next call will contain 'i' and null.

Specified by:
checkOption in interface CmdlineConsumer
Parameters:
mainName - The name of the main class (useful for error messages.)
ch - Option character. If -a is specified on the command line, 'a' would be passed to this method.)
arg - The argument associated with this option.
Returns:
less than 0 to indicate an error
0 to indicate that this option is not used by this class
1 to indicate that only the option was used
2 or greater to indicate that both the option and the argument were used

finalizeArgs

public boolean finalizeArgs(String mainName)
Description copied from interface: CmdlineConsumer
Validate arguments after argument parsing has finished.

This is useful for verifying that all required keywords and options have been specified, that options don't conflict with one another, etc.

Specified by:
finalizeArgs in interface CmdlineConsumer
Parameters:
mainName - The name of the main class (useful for error messages.)
Returns:
true if everything is correct, false if there is a problem.

initializeArgs

public void initializeArgs()
Description copied from interface: CmdlineConsumer
Method used to initialize any instance variables which may be changed by a cmdline option.

This is needed when arguments are processed inside the constructor. If the first line in the constructor in a class which extends this class is super(args), CmdlineParser will be run before any instance variables for the extending class are initialized.

To ensure all instance variables are properly initialized, place the initialization code in the initializeArgs() method.

Specified by:
initializeArgs in interface CmdlineConsumer

keywordUsage

public String keywordUsage()
Description copied from interface: CmdlineConsumer
A short string included in the usage message to indicate valid keywords.

An example might be "[username] [password]".

Specified by:
keywordUsage in interface CmdlineConsumer
Returns:
A very terse description string.

optionUsage

public String optionUsage()
Description copied from interface: CmdlineConsumer
A short string included in the usage message to indicate valid options. An example might be "[-t type]".

Specified by:
optionUsage in interface CmdlineConsumer
Returns:
A very terse description string.

windowClosing

public void windowClosing(WindowEvent evt)
Specified by:
windowClosing in interface WindowListener
Overrides:
windowClosing in class WindowAdapter

main

public static void main(String[] args)
                 throws RemoteException,
                        VisADException
Throws:
RemoteException
VisADException