|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norvelle.textcite.Application
public class Application
Title: Application.java
Description: Startup class for the TextCite GUI. Also provides a universal point of access for a number of global objects, including the CiteBook object.
Copyright: Copyright (c) 2006 by Erik Norvelle
Field Summary | |
---|---|
static double |
APPLICATION_VERSION_NUMBER
|
static java.lang.String |
APPLICATION_VERSION_STRING
|
static java.lang.String |
CATEGORY_CLIPBOARD_TPROP
|
static java.lang.String |
CATEGORY_EXPANSION_TPROP
|
static java.lang.String |
ENGLISH_INTERFACE
|
static int |
EXPORT_FILE_CHOOSER
|
static int |
LOAD_FILE_CHOOSER
|
static java.util.logging.Logger |
logger
A global Logger instance |
static int |
OS_OSX
|
static int |
OS_UNIX
|
static int |
OS_WINDOWS
|
static java.lang.String |
OUTLINE_EXPANSION_TPROP
|
static int |
SAVE_FILE_CHOOSER
|
static java.lang.String |
SPANISH_INTERFACE
|
static java.lang.String[] |
supportedLocales
|
static java.util.HashMap<java.lang.String,java.lang.Object> |
transientProperties
A HashMap that stores transient data for the application... not saved or restored from disk |
Constructor Summary | |
---|---|
Application(boolean useGUI)
Construct and show the application. |
Method Summary | |
---|---|
static void |
exit()
Terminate the application, first saving the global preferences. |
static CiteBook |
getCiteBook()
Getter method for the application CiteBook |
static Clipboard |
getClipboard()
|
static javax.swing.JFileChooser |
getFileChooser(int chooserType)
Returns our global JFileChooser instance. |
static HelpBroker |
getHelpBroker()
Access to the global HelpBroker object |
static java.lang.String |
getLocaleIdentifier()
Returns the current locale identifier |
static java.lang.String |
getLocalizedString(java.lang.String stringName)
Returns a localized string, given the string's identifier |
static MainFrame |
getMainFrame()
Returns the main JFrame of the application |
static int |
getNextId()
Allow other objects to request an id that is unique for a given CiteBook. |
static int |
getOS()
Returns an integer corresponding to the operating system we are running under. |
static PreferenceManager |
getPrefs()
Access to the global preferences container |
static void |
initCiteBook()
Used for setting up an empty CiteBook |
static boolean |
initializing()
Returns true if the application is in the process of initializing. |
static boolean |
isLocaleSupported(java.lang.String localeId)
Determines whether a given locale is supported. |
static void |
load(java.io.File file,
SaveLoadStatusListener status)
Read the CiteBook from the specified file. |
static void |
logError(java.lang.String message)
Log a given message to the Logger, with the level SEVERE |
static void |
logInfo(java.lang.String message)
Log a given message to the Logger, with the level INFO |
static void |
main(java.lang.String[] args)
Application entry point. |
static void |
save(java.io.File file,
SaveLoadStatusListener status)
Save the CiteBook to a given file. |
static void |
setCiteBook(CiteBook cb)
Setter method for the application CiteBook... to be used in order to run the TextCite engine without the GUI. |
static void |
setLanguage(java.lang.String langId)
Change the language of the GUI. |
static void |
setNextId(int i)
Allows the global id generator to be reset to a given value upon loading a different CiteBook. |
static void |
testInit()
Initialize all aspects of the Application that are required for running JUnit tests |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String APPLICATION_VERSION_STRING
public static final double APPLICATION_VERSION_NUMBER
public static final java.lang.String ENGLISH_INTERFACE
public static final java.lang.String SPANISH_INTERFACE
public static final java.lang.String[] supportedLocales
public static final java.lang.String OUTLINE_EXPANSION_TPROP
public static final java.lang.String CATEGORY_EXPANSION_TPROP
public static final java.lang.String CATEGORY_CLIPBOARD_TPROP
public static final int SAVE_FILE_CHOOSER
public static final int EXPORT_FILE_CHOOSER
public static final int LOAD_FILE_CHOOSER
public static final int OS_WINDOWS
public static final int OS_OSX
public static final int OS_UNIX
public static java.util.logging.Logger logger
public static java.util.HashMap<java.lang.String,java.lang.Object> transientProperties
Constructor Detail |
---|
public Application(boolean useGUI)
Method Detail |
---|
public static void initCiteBook()
public static void testInit()
public static boolean initializing()
public static void logInfo(java.lang.String message)
public static void logError(java.lang.String message)
public static void load(java.io.File file, SaveLoadStatusListener status) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException
file
- The File object to be opened and loaded from
java.io.FileNotFoundException
- Thrown if the file cannot be located
java.io.IOException
- Thrown if a general IO error occurs
java.lang.ClassNotFoundException
- Thrown if a class mentioned in the serialization cannot be instantiatedpublic static void save(java.io.File file, SaveLoadStatusListener status) throws java.io.FileNotFoundException, java.io.IOException
file
- The File object to write to.
java.io.FileNotFoundException
- Thrown if the file cannot be opened for writing
java.io.IOException
- Thrown if an unspecified output error occurspublic static void exit()
public static int getNextId()
public static void setNextId(int i)
public static CiteBook getCiteBook()
public static void setCiteBook(CiteBook cb)
cb
- The CiteBook to be set as the default CiteBook.public static Clipboard getClipboard()
public static java.lang.String getLocalizedString(java.lang.String stringName)
public static java.lang.String getLocaleIdentifier()
public static boolean isLocaleSupported(java.lang.String localeId)
localeId
- The string identifier for the locale to be tested
public static void setLanguage(java.lang.String langId)
langId
- The identifier of the language chosen (one of the constants defined in the Application class)public static HelpBroker getHelpBroker()
public static PreferenceManager getPrefs()
public static javax.swing.JFileChooser getFileChooser(int chooserType)
chooserType
- Indicate the file chooser to be returned.
public static int getOS()
public static MainFrame getMainFrame()
public static void main(java.lang.String[] args)
args
- String[]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |