public class XJApplication extends XJObject implements XJApplicationInterface, XJFrameDelegate
| Modifier and Type | Class and Description |
|---|---|
static class |
XJApplication.AutoSaveTimer |
protected static class |
XJApplication.ScheduledTimer |
| Modifier and Type | Field and Description |
|---|---|
protected XJFrame |
about |
protected static String |
appName |
protected static XJScheduledTimerDelegate |
autoSaveTimer |
protected static XJApplicationDelegate |
delegate |
protected static int |
DOCUMENT_OFFSET_PIXELS |
protected static int |
documentAbsoluteCount |
protected static int |
documentAbsPositionCount |
protected static List<XJDocumentFactory> |
documentFactories |
protected static List<String> |
documentsToOpenAtStartup |
protected static String[] |
launchArguments |
static int |
MAX_RECENT_FILES |
static boolean |
NO |
protected XJPanel |
prefs |
protected static String |
propertiesPath |
protected static List<String> |
recentFiles |
protected static long |
SCHEDULED_TIMER_MINUTES |
protected static List<XJScheduledTimer> |
scheduledTimers |
protected static XJApplicationInterface |
shared |
protected static boolean |
startingUp |
protected XJPreferences |
userPrefs |
protected static List<XJWindow> |
windows |
static String |
XJ_PREFS_RECENT_FILES |
static boolean |
YES |
| Constructor and Description |
|---|
XJApplication() |
addObserver, addObserverForKey, awake, bindObserverForKey, keyValueChanged, observeValueForKey, removeObserver, removeObserverForKeypublic static final boolean YES
public static final boolean NO
public static final String XJ_PREFS_RECENT_FILES
protected static XJApplicationInterface shared
protected static XJApplicationDelegate delegate
protected static List<XJScheduledTimer> scheduledTimers
protected static final long SCHEDULED_TIMER_MINUTES
public static final int MAX_RECENT_FILES
protected static int documentAbsoluteCount
protected static int documentAbsPositionCount
protected static final int DOCUMENT_OFFSET_PIXELS
protected static List<XJDocumentFactory> documentFactories
protected static String propertiesPath
protected static boolean startingUp
protected static String[] launchArguments
protected static String appName
protected XJPreferences userPrefs
protected XJFrame about
protected XJPanel prefs
protected static XJScheduledTimerDelegate autoSaveTimer
public static void setShared(XJApplicationInterface shared)
public static XJApplicationInterface shared()
public static String getAppVersionShort()
public static String getAppVersionLong()
public static XJApplicationDelegate getAppDelegate()
public static Container getActiveContainer()
public static void run(XJApplicationDelegate delegate, String[] args, String applicationName)
public static void run(XJApplicationDelegate delegate, String[] args)
protected void startup()
protected void updateRecentFilesPrefs()
protected void shutdown()
public static void setDelegate(XJApplicationDelegate delegate)
public static void addScheduledTimer(XJScheduledTimerDelegate delegate, long minutes, boolean scheduleAtStartup)
public static void removeScheduledTimer(XJScheduledTimerDelegate delegate)
public static void setPropertiesPath(String path)
public static String getPropertiesPath()
public String getApplicationName()
getApplicationName in interface XJApplicationInterfacepublic XJPreferences getPreferences()
getPreferences in interface XJApplicationInterfacepublic void displayAbout()
displayAbout in interface XJApplicationInterfacepublic void displayPrefs()
displayPrefs in interface XJApplicationInterfacepublic void displayHelp()
displayHelp in interface XJApplicationInterfacepublic void frameDidClose(XJFrame frame)
frameDidClose in interface XJFrameDelegatepublic void addRecentFile(String file)
addRecentFile in interface XJApplicationInterfacepublic void removeRecentFile(String file)
removeRecentFile in interface XJApplicationInterfacepublic void clearRecentFiles()
clearRecentFiles in interface XJApplicationInterfacepublic List recentFiles()
recentFiles in interface XJApplicationInterfaceprotected void addPreferencesMenuItem()
protected void removePreferencesMenuItem()
public static void addDocumentFactory(Class documentClass, Class windowClass, Class dataClass, String ext, String description)
public static void addDocumentFactory(XJDocumentFactory factory)
public static boolean handlesDocument(XJDocument doc)
public XJDocumentFactory getDocumentTypeForPath(String path)
public List getDocumentExtensions()
getDocumentExtensions in interface XJApplicationInterfacepublic XJDocumentFactory askForDocumentType()
public XJDocument newDocument(boolean visible, XJDocumentFactory docFactory)
public XJDocument newDocument()
newDocument in interface XJApplicationInterfacepublic boolean openDocuments(List<String> files)
openDocuments in interface XJApplicationInterfacepublic boolean openDocument(String file)
openDocument in interface XJApplicationInterfacepublic boolean loadDocument(String file, XJDocument doc)
public boolean openDocument()
openDocument in interface XJApplicationInterfacepublic boolean openLastUsedDocument()
openLastUsedDocument in interface XJApplicationInterfacepublic void closeFirstCreatedWindowIfNonDirty(XJWindow excludeWindow)
public XJWindow getWindowContainingDocumentForPath(String path)
getWindowContainingDocumentForPath in interface XJApplicationInterfacepublic XJWindow getActiveWindow()
getActiveWindow in interface XJApplicationInterfacepublic void addWindow(XJWindow window)
addWindow in interface XJApplicationInterfacepublic int getNumberOfNonAuxiliaryWindows()
public void removeWindow(XJWindow window)
removeWindow in interface XJApplicationInterfacepublic List<XJWindow> getWindows()
getWindows in interface XJApplicationInterfacepublic List<XJWindow> getWindowsInWindowMenu()
getWindowsInWindowMenu in interface XJApplicationInterfacepublic static void setAutoSave(boolean enabled,
int delayInMinutes)
public void performPreferences()
public void performQuit()
performQuit in interface XJApplicationInterfacepublic boolean supportsPersistence()
supportsPersistence in interface XJApplicationInterfacepublic boolean hasPreferencesMenuItem()
hasPreferencesMenuItem in interface XJApplicationInterfacepublic boolean shouldQuitAfterLastWindowClosed()
public boolean useDesktopMode()
useDesktopMode in interface XJApplicationInterfacepublic Class getPreferencesClass()
Copyright © 2013. All rights reserved.