public class Application extends Object implements AlternateUIInteraction
| Modifier and Type | Class and Description |
|---|---|
static interface |
Application.LifecycleListener
Interface that allows the caller to do post shutdown processing.
|
| Constructor and Description |
|---|
Application(Application.LifecycleListener lifecycleListener) |
| Modifier and Type | Method and Description |
|---|---|
void |
browseFile(File file) |
boolean |
determineIfSupportsEditingFiles()
Determines if we support editing files.
|
boolean |
doesSupportEditingOpeningFiles()
Determines if we can call editFiles.
|
void |
editFile(File file,
int line)
This is called when we should edit the specified file.
|
void |
editFileInExternalApplication(File file,
boolean attemptToOpen)
This edits the application using java.awt.Desktop.
|
static String |
getFileNameExtension(String fileName)
Returns the file extension preserving its case.
|
boolean |
invokeDesktopFunction(String name,
Class argumentClass,
Object argument)
This invokes one of the java.awt.Desktop functions.
|
static void |
main(String[] args) |
void |
openFile(File file,
int line)
Notification that you should open the specified file and go to the specified line.
|
void |
openFileInExternalApplication(File file) |
public Application(Application.LifecycleListener lifecycleListener)
public static void main(String[] args)
public void openFile(File file, int line)
openFile in interface AlternateUIInteractionfile - the file to editline - the line to go to. -1 if no line is specified.public void browseFile(File file)
public void editFile(File file, int line)
editFile in interface AlternateUIInteractionpublic void editFileInExternalApplication(File file, boolean attemptToOpen)
file - the file to editattemptToOpen - true if we should attempt to just open the file is editing it fails. Often, file associations don't distinguish edit from open and open is the default.public void openFileInExternalApplication(File file)
public boolean invokeDesktopFunction(String name, Class argumentClass, Object argument)
name - the function to invokeargumentClass - the class of the argument of the above function.argument - the argument itself.public static String getFileNameExtension(String fileName)
fileName - the file namepublic boolean doesSupportEditingOpeningFiles()
doesSupportEditingOpeningFiles in interface AlternateUIInteractionpublic boolean determineIfSupportsEditingFiles()
Copyright © 2013. All rights reserved