VTT Java
2010 Version

gov.nih.nlm.nls.vtt.Api
Class VttApi

java.lang.Object
  extended by gov.nih.nlm.nls.vtt.Api.VttApi

public class VttApi
extends java.lang.Object

This class is the VTT Java API class. Its data members include a list of VttObj for opening multiple Vtt files.

History:

Version:
V-2010
Author:
NLM NLS Development Team, clu

Method Summary
static void Add()
          Add a VTT window without opening a VTT file.
static void Add(java.io.File inFile)
          Add a VTT window with opening a VTT file.
static void Add(java.lang.String inFileStr)
          Add a VTT window with opening a VTT file.
static void CleanUp()
          Clean up VttApi Java up.
static boolean Contains(java.io.File inFile)
          Get a boolean flag if the specified VTT Java File is opened.
static int GetIndexByFile(java.io.File inFile)
          Get the index by specifying VTT File Java object.
static int GetIndexByVttObj(VttObj vttObj)
          Get the index by specifying vttObj Java object.
static VttObj GetLastVttObj()
          Get the last VttObj Java object from VTT.
static int GetSize()
          Get the size of all vttObj list (opened vtt file/window).
static VttObj GetVttObjAt(int index)
          Get a VttObj Java object from VTT by specifying index.
static void Init()
          Initiate VTT without opening any VTT file.
static void Init(java.io.File inFile, boolean verbose)
          Initiate VTT with specifying VTT File object and verbose flag.
static void Init(java.io.File inFile, java.lang.String configFile, boolean verbose)
          Initiate VTT with specifying VTT File object, configuration file, and verbose flag.
static void Init(java.io.File inFile, java.lang.String configFile, int xPos, int yPos, boolean verbose)
          Initiate VTT with specifying VTT File object, configuration file, initial x position and y position of VTT window, and verbose flag.
static void Init(java.lang.String inFileStr, boolean verbose)
          Initiate VTT with specifying VTT file and verbose flag.
static void Init(java.lang.String inFileStr, java.lang.String configFile, boolean verbose)
          Initiate VTT with specifying VTT file, configuration file, and verbose flag.
static void Init(VttObj vttObj)
          Initiate VTT with specifying VttObj Java object.
static void RemoveAt(int index)
          Remove a VTT window with specifying an index.
static void SetFocusAt(int index)
          Set focus at the specified VTT window by index.
static java.lang.String ToString()
          Convert information of all opened VTT files of VttApi to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Init

public static void Init()
Initiate VTT without opening any VTT file.


Init

public static void Init(java.lang.String inFileStr,
                        boolean verbose)
Initiate VTT with specifying VTT file and verbose flag.

Parameters:
inFileStr - the absolute path of VTT file
verbose - flag of verbose on reading VTT file

Init

public static void Init(java.lang.String inFileStr,
                        java.lang.String configFile,
                        boolean verbose)
Initiate VTT with specifying VTT file, configuration file, and verbose flag.

Parameters:
inFileStr - the absolute path of VTT file
configFile - the absolute path of VTT configuration file
verbose - flag of verbose on reading VTT file

Init

public static void Init(java.io.File inFile,
                        boolean verbose)
Initiate VTT with specifying VTT File object and verbose flag.

Parameters:
inFile - the Java File object of VTT file
verbose - flag of verbose on reading VTT file

Init

public static void Init(java.io.File inFile,
                        java.lang.String configFile,
                        boolean verbose)
Initiate VTT with specifying VTT File object, configuration file, and verbose flag.

Parameters:
inFile - the Java File object of VTT file
configFile - the absolute path of VTT configuration file
verbose - flag of verbose on reading VTT file

Init

public static void Init(VttObj vttObj)
Initiate VTT with specifying VttObj Java object.

Parameters:
vttObj - Java VttObj object

Init

public static void Init(java.io.File inFile,
                        java.lang.String configFile,
                        int xPos,
                        int yPos,
                        boolean verbose)
Initiate VTT with specifying VTT File object, configuration file, initial x position and y position of VTT window, and verbose flag.

Parameters:
inFile - the Java File object of VTT file
configFile - the absolute path of VTT configuration file
xPos - initial x position of VTT window
yPos - initial y position of VTT window
verbose - flag of verbose on reading VTT file

CleanUp

public static void CleanUp()
Clean up VttApi Java up. This method is used to close all opened VTT files and then close window.


Add

public static void Add()
Add a VTT window without opening a VTT file.


Add

public static void Add(java.lang.String inFileStr)
Add a VTT window with opening a VTT file.

Parameters:
inFileStr - the absolute path of VTT file

Add

public static void Add(java.io.File inFile)
Add a VTT window with opening a VTT file.

Parameters:
inFile - the Java File object of VTT file

RemoveAt

public static void RemoveAt(int index)
Remove a VTT window with specifying an index.

Parameters:
index - the index of vttObj list to be removed

GetSize

public static int GetSize()
Get the size of all vttObj list (opened vtt file/window).

Returns:
the size of all vttObj list

GetIndexByVttObj

public static int GetIndexByVttObj(VttObj vttObj)
Get the index by specifying vttObj Java object.

Parameters:
vttObj - vttObj Java object of interested
Returns:
the index of specified vttObj Java object

GetIndexByFile

public static int GetIndexByFile(java.io.File inFile)
Get the index by specifying VTT File Java object.

Parameters:
inFile - the Java File object of interested
Returns:
the index of specified VTT File Java object

Contains

public static boolean Contains(java.io.File inFile)
Get a boolean flag if the specified VTT Java File is opened.

Parameters:
inFile - the Java File object of interested
Returns:
a boolean flag if the specified VTT Java File is opened

GetVttObjAt

public static VttObj GetVttObjAt(int index)
Get a VttObj Java object from VTT by specifying index.

Parameters:
index - the index of intertested
Returns:
a VttObj Java object from VTT by specifying index

GetLastVttObj

public static VttObj GetLastVttObj()
Get the last VttObj Java object from VTT. Please note that the last vttObj is the latest one which is just added into the VTT.

Returns:
the last VttObj Java object from VTT

SetFocusAt

public static void SetFocusAt(int index)
Set focus at the specified VTT window by index. The focus VTT window will be bring up to the top.

Parameters:
index - the index of intertested

ToString

public static java.lang.String ToString()
Convert information of all opened VTT files of VttApi to a String.

Returns:
the String format of a VttApi. This includes all opened VTT file.

VTT Java
2010 Version

Submit a bug or feature

Copyright © 2010 National Library of Medicine