public abstract class JGloss extends Object implements ExitListener
JGlossApp
and
JDictionaryApp
. Provides the basic functionality for initialization
and destruction of the application instance and hooks for extending the process. Also provides
static access to resources used by the application UI classes.Modifier and Type | Field and Description |
---|---|
protected LookupModel |
mainLookupModel |
static Messages |
MESSAGES
The application-wide messages.
|
static Preferences |
PREFS
The application-wide preferences.
|
Modifier and Type | Method and Description |
---|---|
void |
addExitListener(ExitListener listener) |
protected void |
createDialogs()
Initialize dialogs before the main window is shown.
|
protected LookupModel |
createLookupModel() |
protected static void |
displayError(String message,
Throwable t,
boolean fatal)
Shows an error message to the user.
|
protected abstract boolean |
doExit() |
boolean |
exit() |
static JGloss |
getApplication() |
protected abstract String |
getApplicationName() |
String |
getCurrentDir()
Returns the current directory.
|
protected abstract PreferencesPanel[] |
getPreferencesPanels() |
protected void |
handleCommandLine(String[] args) |
protected void |
init(String[] args) |
protected void |
initUI() |
void |
onExit()
Called when the JGloss application is about to exit.
|
protected void |
registerDictionaries() |
void |
removeExitListener(ExitListener listener) |
void |
setCurrentDir(String dir)
Sets the current directory.
|
protected abstract void |
showMainWindow(String[] args) |
public static final Preferences PREFS
public static final Messages MESSAGES
protected LookupModel mainLookupModel
public static JGloss getApplication()
protected void init(String[] args)
public boolean exit()
protected abstract String getApplicationName()
protected abstract void showMainWindow(String[] args) throws Exception
Exception
protected abstract PreferencesPanel[] getPreferencesPanels()
protected abstract boolean doExit()
public String getCurrentDir()
public void setCurrentDir(String dir)
dir
- The new current directory.public void addExitListener(ExitListener listener)
public void removeExitListener(ExitListener listener)
protected void registerDictionaries()
protected void handleCommandLine(String[] args) throws Exception
Exception
protected static void displayError(String message, Throwable t, boolean fatal)
message
- A user-understandable error message.t
- The exception which signalled the error.fatal
- true
if the application cannot be started because of the error.protected LookupModel createLookupModel()
public void onExit()
ExitListener
onExit
in interface ExitListener
protected void createDialogs()
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.