|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An interface for a generic GUI application. Your Swing application can
override AbstractGUIApplication to have some of its
basic code already implemented.
This class provides the framework for a GUI application having the following features:
Exceptions and report them to
the user.
AbstractGUIApplication,
AbstractPluggableGUIApplication| Nested Class Summary | |
static class |
GUIApplication.AboutAction
The action that displays the application's About dialog. |
static class |
GUIApplication.ExitAction
Action that attempts to close the application. |
static class |
GUIApplication.HelpAction
The action that displays the application's Help dialog. |
static class |
GUIApplication.ToggleStatusBarAction
Action to toggle a GUIApplication's status bar. |
static class |
GUIApplication.ToggleToolBarAction
Action to toggle a GUIApplication's toolbar. |
| Field Summary |
| Fields inherited from interface org.fife.ui.app.GUIApplicationConstants |
OS_LINUX, OS_MAC_OSX, OS_OTHER, OS_WINDOWS |
| Fields inherited from interface org.fife.ui.dockablewindows.DockableWindowConstants |
BOTTOM, FLOATING, LEFT, RIGHT, TOP |
| Method Summary | |
void |
addAction(java.lang.String key,
javax.swing.Action action)
Adds an action to this application's action map. |
void |
displayException(java.awt.Dialog dialog,
java.lang.Throwable t)
This method should be overridden to convey to the user that an Exception occurred in some way, for example, in a dialog box. |
void |
displayException(java.awt.Frame frame,
java.lang.Throwable t)
This method should be overridden to convey to the user that an Exception occurred in some way, for example, in a dialog box. |
void |
displayException(java.lang.Throwable t)
This method should be overridden to convey to the user that an Exception occurred in some way, for example, in a dialog box. |
void |
doExit()
Called when the user attempts to close the application, whether from an "Exit" menu item, closing the main application window, or any other means. |
AboutDialog |
getAboutDialog()
Returns the About dialog for this application. |
javax.swing.Action |
getAction(java.lang.String key)
Returns one of this application's actions. |
javax.swing.Action[] |
getActions()
Returns the actions of this GUI application as an array. |
HelpDialog |
getHelpDialog()
Returns the Help dialog for this application, or null
if this application does not have a Help dialog. |
java.awt.Image |
getIconImage()
Return the image used for the icon of this GUI application. |
java.lang.String |
getInstallLocation()
Returns the directory in which this GUI application is installed (running). |
javax.swing.JMenuBar |
getJMenuBar()
Returns the menu bar this application is using. |
java.lang.String |
getLanguage()
Returns the language used by this GUI application, in a Locale-friendly language string; e.g., en
or es. |
int |
getOS()
Returns an integer constant representing the OS. |
java.util.ResourceBundle |
getResourceBundle()
Returns the resource bundle associated with this application. |
StatusBar |
getStatusBar()
Returns the status bar this application is using. |
boolean |
getStatusBarVisible()
Returns whether the status bar is visible. |
CustomizableToolBar |
getToolBar()
Returns the toolbar this application is using. |
boolean |
getToolBarVisible()
Returns whether the toolbar is visible in this application. |
java.lang.String |
getVersionString()
Returns the version string for this application. |
boolean |
isMaximized()
Returns true if this application's main window is maximized. |
GUIApplicationPreferences |
loadPreferences()
Loads the preferences for this GUI application. |
void |
pack()
Repacks the GUI application's main window. |
void |
setJMenuBar(javax.swing.JMenuBar menuBar)
Sets the menu bar to use in this application. |
void |
setLanguage(java.lang.String language)
Sets the language for this GUI application and all of its dialogs, UI widgets, etc. |
void |
setStatusBar(StatusBar statusBar)
Sets the status bar to use in this application. |
void |
setStatusBarVisible(boolean visible)
Sets whether the status bar is visible. |
void |
setToolBar(CustomizableToolBar toolBar)
Sets the toolbar used by this GUI application. |
void |
setToolBarVisible(boolean visible)
Sets whether the toolbar used by this GUI application is visible. |
| Method Detail |
public void addAction(java.lang.String key,
javax.swing.Action action)
key - The key with which to fetch the action via
getAction.action - The action to add.getAction(java.lang.String)public void displayException(java.lang.Throwable t)
t - The exception/throwable that occurred.
public void displayException(java.awt.Dialog dialog,
java.lang.Throwable t)
dialog - The child dialog that threw the Exception.t - The exception/throwable that occurred.
public void displayException(java.awt.Frame frame,
java.lang.Throwable t)
frame - The child frame that threw the Exception.t - The exception/throwable that occurred.public void doExit()
public AboutDialog getAboutDialog()
AboutDialogpublic javax.swing.Action getAction(java.lang.String key)
null if no action exists for the
specified key.addAction(java.lang.String, javax.swing.Action)public javax.swing.Action[] getActions()
getAction(java.lang.String)public HelpDialog getHelpDialog()
null
if this application does not have a Help dialog.
public java.awt.Image getIconImage()
public java.lang.String getInstallLocation()
public javax.swing.JMenuBar getJMenuBar()
setJMenuBar(javax.swing.JMenuBar)public java.lang.String getLanguage()
Locale-friendly language string; e.g., en
or es.
public int getOS()
public java.util.ResourceBundle getResourceBundle()
public StatusBar getStatusBar()
setStatusBar(org.fife.ui.StatusBar)public boolean getStatusBarVisible()
setStatusBarVisible(boolean)public CustomizableToolBar getToolBar()
setToolBar(org.fife.ui.CustomizableToolBar)public boolean getToolBarVisible()
setToolBarVisible(boolean)public java.lang.String getVersionString()
public boolean isMaximized()
true if this applicaiton's window is maximized, or
false if it isn't.public GUIApplicationPreferences loadPreferences()
null is
goes wrong, null is returned.
public void pack()
public void setJMenuBar(javax.swing.JMenuBar menuBar)
menuBar - The menu bar.getJMenuBar()public void setLanguage(java.lang.String language)
language - The language to use. If null,
English will be used.public void setStatusBar(StatusBar statusBar)
statusBar - The status bar to use.getStatusBar()public void setStatusBarVisible(boolean visible)
visible - Whether the status bar is to be visible.getStatusBarVisible()public void setToolBar(CustomizableToolBar toolBar)
toolBar - The toolbar to use.getToolBar()public void setToolBarVisible(boolean visible)
visible - Whether the toolbar should be visible.getToolBarVisible()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||