com.virtuosotechnologies.asaph.maingui
Interface GuiEnvironmentManager


public interface GuiEnvironmentManager

A miscellaneous API exported by the maingui plugin.

This API is not thread-safe, and should only be called from the AWT/Swing thread.


Field Summary
static ClassConstrainedKey DEFAULTNOTATIONLOCALE_PREF
          Key for default locale for notation.
static ClassConstrainedKey IS_AUTOSMARTQUOTES_PREF
          Key for automatic smart quotes.
static String JFRAME_PANEMANAGERTYPE
          Name for JFrame PaneManager
static String MDI_PANEMANAGERTYPE
          Name for MDI PaneManager
static ClassConstrainedKey NATIVE_PRINT_DIALOGS_PREF
          Key for use native print dialogs.
static ClassConstrainedKey NUM_UNDOLEVELS_PREF
          Key for the number of undo levels.
static ClassConstrainedKey PANEMANAGERTYPE_PREF
          Key for PaneManager implementation.
 
Method Summary
 AsyncJobRunner getDefaultAsyncJobRunner()
          Get the default AsyncJobRunner for running long jobs in a separate thread with a progress dialog.
 JComponent getDialogParent()
          Get the dialog parent.
 File getFileChooserDirectory()
          Get the current directory for file choosers
 PropertySet getMainGuiPrefs()
          Get the main gui prefs
 void registerAsyncJobRunner(AsyncJobRunner runner)
          Register an AsyncJobRunner that can run long operations.
 void setFileChooserDirectory(File directory)
          Set the current directory for file choosers
 

Field Detail

MDI_PANEMANAGERTYPE

public static final String MDI_PANEMANAGERTYPE
Name for MDI PaneManager

See Also:
Constant Field Values

JFRAME_PANEMANAGERTYPE

public static final String JFRAME_PANEMANAGERTYPE
Name for JFrame PaneManager

See Also:
Constant Field Values

NUM_UNDOLEVELS_PREF

public static final ClassConstrainedKey NUM_UNDOLEVELS_PREF
Key for the number of undo levels. (Class is Integer)


IS_AUTOSMARTQUOTES_PREF

public static final ClassConstrainedKey IS_AUTOSMARTQUOTES_PREF
Key for automatic smart quotes. (Class is Boolean)


NATIVE_PRINT_DIALOGS_PREF

public static final ClassConstrainedKey NATIVE_PRINT_DIALOGS_PREF
Key for use native print dialogs. (Class is Boolean)


DEFAULTNOTATIONLOCALE_PREF

public static final ClassConstrainedKey DEFAULTNOTATIONLOCALE_PREF
Key for default locale for notation. (Class is Locale)


PANEMANAGERTYPE_PREF

public static final ClassConstrainedKey PANEMANAGERTYPE_PREF
Key for PaneManager implementation. (Class is String)

Method Detail

getMainGuiPrefs

public PropertySet getMainGuiPrefs()
Get the main gui prefs

Returns:
a PropertySet

getDialogParent

public JComponent getDialogParent()
Get the dialog parent. This component should be used as the parent for displaying JDialogs and JOptionPanes.

Returns:
the gui's dialog parent component

getFileChooserDirectory

public File getFileChooserDirectory()
Get the current directory for file choosers

Returns:
the current file chooser directory

setFileChooserDirectory

public void setFileChooserDirectory(File directory)
Set the current directory for file choosers

Parameters:
directory - new file chooser directory

registerAsyncJobRunner

public void registerAsyncJobRunner(AsyncJobRunner runner)
Register an AsyncJobRunner that can run long operations. The main gui will respond to jobs being run on this runner by showing a progress dialog.

Parameters:
runner - AsyncJobRunner

getDefaultAsyncJobRunner

public AsyncJobRunner getDefaultAsyncJobRunner()
Get the default AsyncJobRunner for running long jobs in a separate thread with a progress dialog.

Returns:
default AsyncJobRunner