|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoadOperation
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 a 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:
public class WriterView extends DefaultRichDocumentView {
public WriterView() {
super();
}
public void createPartControl(Composite parent) {
super.createPartControl(parent);
loadDocument();
}
private void loadDocument() {
LoadOperation operation = OperationFactory.createLoadOperation("c:\\text.odt", false);
this.executeOperation( operation );
}
}
Method Summary | |
---|---|
boolean |
getAsTemplate()
Gets whether the document is 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 is loaded as a template. |
void |
setFileName(java.lang.String fileName)
Sets the absolute path for the file to be loaded. |
Method Detail |
---|
java.lang.String getFileName()
c:\\test.odt
on Windows® operating systems, and /home/test.odt
on
Linux® operating systems.
void setFileName(java.lang.String fileName)
c:\\test.odt
on Windows® operating systems, and /home/test.odt
on
Linux® operating systems.
fileName
- the absolute path for the file to be loadedboolean getAsTemplate()
void setAsTemplate(boolean asTemplate)
asTemplate
- true when the document should be loaded as a template, false otherwisejava.lang.Object getUNOModel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |