com.jniwrapper.win32.automation
Interface FileOperationsHandler

All Superinterfaces:
ContainerHandler

public interface FileOperationsHandler
extends ContainerHandler

This class is a callback for OleContainer.

If the container embeds a document object (for example, Excel.Sheet) when the container has a toolbar with the "Open", "Save" buttons.
When a user clicks "Open" or "Save", OleContainer calls methods of this callback to get the name of an opened or saved file (implementing the class could show the file chooser for getting filename or using some predefined document).

Note: There are several notification methods in the callback which are called when a document is opened or saved in the container (using the OleContainer.open() method, toolbar, or other).


Method Summary
 void documentOpened(java.io.File file)
          This method is called when the document is opened.
 void documentSaved(java.io.File file)
          This method is called when the document is saved.
 java.io.File getOpenFile()
          Returns a file that should be opened.
 java.io.File getSaveFile()
          Returns a file for saving the document.
 void newDocumentCreated()
          This method is called when a new document is created.
 
Methods inherited from interface com.jniwrapper.win32.automation.ContainerHandler
setContainer
 

Method Detail

getOpenFile

public java.io.File getOpenFile()
Returns a file that should be opened.

This method is executed when the "Open" button is clicked.

Returns:
returns a file that should be opened or null if the operation is cancelled.

getSaveFile

public java.io.File getSaveFile()
Returns a file for saving the document.

This method is executed when the "Save" button is clicked.

Returns:
a file for saving the document or null if the operation is cancelled.

newDocumentCreated

public void newDocumentCreated()
This method is called when a new document is created.


documentOpened

public void documentOpened(java.io.File file)
This method is called when the document is opened.


documentSaved

public void documentSaved(java.io.File file)
This method is called when the document is saved.