|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the operation to load a document into the view. When a document is ready to be loaded into a RichDocumentView, the view closes the current document first.
If file name that is not valid is provided, UnsupportedOperationException
is
thrown when starting the operation on a RichDocumentView
.
The following code demonstrates how to load a document:
private void loadDocument()
{
RichDocumentView view = ...;
LoadOperation operation = OperationFactory.createLoadOperation("c:\\text.odt", false);
view.executeOperation( operation );
}
Method Summary | |
---|---|
boolean |
getAsTemplate()
Gets whether the document will be loaded as a template. |
java.lang.String |
getFileName()
Gets the absolute path for the file to be loaded. |
java.lang.Object |
getUNOModel()
Returns the com.sun.star.frame.XModel object when the operation is started. |
void |
setAsTemplate(boolean asTemplate)
Sets whether the document will be loaded as a template. |
void |
setFileName(java.lang.String fileName)
Sets the absolute path for the file to be loaded. |
Method Detail |
public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
fileName
- The absolute path for the file to be loadedpublic boolean getAsTemplate()
public void setAsTemplate(boolean asTemplate)
asTemplate
- true When the document should be loaded as a template, false otherwisepublic java.lang.Object getUNOModel()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |