Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.document
Class AbstractDocument

java.lang.Object
  extended by ag.ion.bion.officelayer.document.AbstractDocument
All Implemented Interfaces:
IDocument, ISelectionProvider
Direct Known Subclasses:
DatabaseDocument, DrawingDocument, FormulaDocument, PresentationDocument, SpreadsheetDocument, TextDocument, WebDocument

public abstract class AbstractDocument
extends java.lang.Object
implements IDocument

OpenOffice.org base document implementation.


Field Summary
protected  com.sun.star.lang.XComponent xComponent
           
 
Fields inherited from interface ag.ion.bion.officelayer.document.IDocument
BASE, CALC, DRAW, EVENT_ON_ALPHA_CHAR_INPUT, EVENT_ON_FOCUS, EVENT_ON_INSERT_DONE, EVENT_ON_INSERT_START, EVENT_ON_LOAD, EVENT_ON_LOAD_DONE, EVENT_ON_LOAD_FINISHED, EVENT_ON_MODIFY_CHANGED, EVENT_ON_MOUSE_OUT, EVENT_ON_MOUSE_OVER, EVENT_ON_NEW, EVENT_ON_NON_ALPHA_CHAR_INPUT, EVENT_ON_SAVE, EVENT_ON_SAVE_AS, EVENT_ON_SAVE_AS_DONE, EVENT_ON_SAVE_DONE, EVENT_ON_SAVE_FINISHED, EVENT_ON_UNLOAD, GLOBAL, IMPRESS, MATH, WEB, WRITER
 
Constructor Summary
AbstractDocument(com.sun.star.lang.XComponent xComponent)
          Constructs new OpenOffice.org document.
 
Method Summary
 void addCloseListener(ICloseListener closeListener)
          Adds listener for closing events to the document.
 void addDocumentListener(IDocumentListener documentListener)
          Adds new document listener.
 void addDocumentModifyListener(IDocumentModifyListener documentModifyListener)
          Adds new document modify listener.
 void close()
          Closes the document.
 boolean equalsTo(IDocument compareDocument)
          Checks if the document equals another document.
 void fireDocumentEvent(java.lang.String documentEventName)
          Fires the document event for the submitted document event constant.
 IFilterProvider getFilterProvider()
          Returns filter provider.
 IFormService getFormService()
          Returns form service, or null if not available.
 IFrame getFrame()
          Returns Frame of the document.
 java.net.URL getLocationURL()
          Deprecated. Use the IPersistenceService instead.
 IPersistenceService getPersistenceService()
          Returns persistence service.
 IPrintService getPrintService()
          Returns the print service of the document.
 IScriptingService getScriptingService()
          Returns scripting service of the document.
 IServiceProvider getServiceProvider()
          Returns the applications service provider, or null if not available.
 com.sun.star.lang.XComponent getXComponent()
          Returns OpenOffice.org XComponent interface.
 com.sun.star.frame.XFrame getXFrame()
          Returns OpenOffice.org XFrame interface.
 boolean isModified()
          Returns information whether the document was modified.
 boolean isOpen()
          Returns information wheter the document is open.
 void print()
          Prints the document.
 void reformat()
          Reformats the document.
 void removeCloseListener(ICloseListener closeListener)
          Removes listener for closing events to the document.
protected  void removeCloseListeners()
          Removes all close listeners.
 void removeDocumentListener(IDocumentListener documentListener)
          Removes document listener.
protected  void removeDocumentListeners()
          Removes all document listeners.
 void removeDocumentModifyListener(IDocumentModifyListener documentModifyListener)
          removes specified document modify listener.
protected  void removeModifyListeners()
          Removes all modify listeners.
 void setModified(boolean modified)
          Sets modified flag.
 void setSelection(ISelection selection)
          Sets selection.
 void setServiceProvider(IServiceProvider serviceProvider)
          Sets the service provider for the document.
protected  void setXInterfaceObjectSelection(IXInterfaceObjectSelection interfaceObject)
          Sets selection on the XInterface object selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ag.ion.bion.officelayer.document.IDocument
getDocumentType
 

Field Detail

xComponent

protected com.sun.star.lang.XComponent xComponent
Constructor Detail

AbstractDocument

public AbstractDocument(com.sun.star.lang.XComponent xComponent)
                 throws java.lang.IllegalArgumentException
Constructs new OpenOffice.org document.

Parameters:
xComponent - OpenOffice.org XComponent interface
Throws:
java.lang.IllegalArgumentException - if the submitted OpenOffice.org XComponent interface is not valid
Method Detail

getXComponent

public com.sun.star.lang.XComponent getXComponent()
Returns OpenOffice.org XComponent interface. This method is not part of the public API.

Specified by:
getXComponent in interface IDocument
Returns:
OpenOffice.org XComponent interface

getXFrame

public com.sun.star.frame.XFrame getXFrame()
Returns OpenOffice.org XFrame interface.

Returns:
OpenOffice.org XFrame interface

getFrame

public IFrame getFrame()
Returns Frame of the document.

Specified by:
getFrame in interface IDocument
Returns:
Frame of the document

getPersistenceService

public IPersistenceService getPersistenceService()
Returns persistence service.

Specified by:
getPersistenceService in interface IDocument
Returns:
persistence service

getScriptingService

public IScriptingService getScriptingService()
Returns scripting service of the document.

Specified by:
getScriptingService in interface IDocument
Returns:
scripting service of the document

getFilterProvider

public IFilterProvider getFilterProvider()
Returns filter provider.

Specified by:
getFilterProvider in interface IDocument
Returns:
filter provider

getFormService

public IFormService getFormService()
Returns form service, or null if not available.

Specified by:
getFormService in interface IDocument
Returns:
form service, or null

addDocumentModifyListener

public void addDocumentModifyListener(IDocumentModifyListener documentModifyListener)
Adds new document modify listener.

Specified by:
addDocumentModifyListener in interface IDocument
Parameters:
documentModifyListener - new document modify listener

addDocumentListener

public void addDocumentListener(IDocumentListener documentListener)
Adds new document listener.

Specified by:
addDocumentListener in interface IDocument
Parameters:
documentListener - new document listener

removeDocumentModifyListener

public void removeDocumentModifyListener(IDocumentModifyListener documentModifyListener)
removes specified document modify listener.

Specified by:
removeDocumentModifyListener in interface IDocument
Parameters:
documentModifyListener - the modif listener to be removed

removeDocumentListener

public void removeDocumentListener(IDocumentListener documentListener)
Removes document listener.

Specified by:
removeDocumentListener in interface IDocument
Parameters:
documentListener - document listener

isModified

public boolean isModified()
Returns information whether the document was modified.

Specified by:
isModified in interface IDocument
Returns:
information whether the document was modified

setModified

public void setModified(boolean modified)
                 throws DocumentException
Sets modified flag.

Specified by:
setModified in interface IDocument
Parameters:
modified - flag value
Throws:
DocumentException - if the status of the document can not be set

getLocationURL

public java.net.URL getLocationURL()
                            throws DocumentException
Deprecated. Use the IPersistenceService instead.

Returns location of the document. Returns null if the URL is not available.

Specified by:
getLocationURL in interface IDocument
Returns:
location of the document
Throws:
DocumentException - if the URL is not valid

addCloseListener

public void addCloseListener(ICloseListener closeListener)
Adds listener for closing events to the document.

Specified by:
addCloseListener in interface IDocument
Parameters:
closeListener - close listener Andreas Bröcker

removeCloseListener

public void removeCloseListener(ICloseListener closeListener)
Removes listener for closing events to the document.

Specified by:
removeCloseListener in interface IDocument
Parameters:
closeListener - close listener

isOpen

public boolean isOpen()
Returns information wheter the document is open.

Specified by:
isOpen in interface IDocument
Returns:
information wheter the document is open

close

public void close()
Closes the document.

Specified by:
close in interface IDocument

print

public void print()
           throws DocumentException
Prints the document.

Specified by:
print in interface IDocument
Throws:
DocumentException - if printing fails

getPrintService

public IPrintService getPrintService()
Returns the print service of the document.

Specified by:
getPrintService in interface IDocument
Returns:
the print service of the document

equalsTo

public boolean equalsTo(IDocument compareDocument)
Checks if the document equals another document.

Specified by:
equalsTo in interface IDocument
Parameters:
compareDocument - document to be compared
Returns:
true if they are equal, flase if they are different

reformat

public void reformat()
Reformats the document. The default behaviour is to do nothing.

Specified by:
reformat in interface IDocument

setSelection

public void setSelection(ISelection selection)
                  throws NOAException
Sets selection.

Specified by:
setSelection in interface ISelectionProvider
Parameters:
selection - selection to be set
Throws:
NOAException - if the selection type is not supported

fireDocumentEvent

public void fireDocumentEvent(java.lang.String documentEventName)
Fires the document event for the submitted document event constant.

Specified by:
fireDocumentEvent in interface IDocument
Parameters:
documentEventName - string constant for document event
See Also:
IDocument.EVENT_ON_NEW, IDocument.EVENT_ON_LOAD, IDocument.EVENT_ON_LOAD_DONE, IDocument.EVENT_ON_LOAD_FINISHED, IDocument.EVENT_ON_SAVE_DONE, IDocument.EVENT_ON_SAVE_FINISHED, IDocument.EVENT_ON_SAVE, IDocument.EVENT_ON_SAVE_AS, IDocument.EVENT_ON_SAVE_AS_DONE, IDocument.EVENT_ON_MODIFY_CHANGED, IDocument.EVENT_ON_MOUSE_OVER, IDocument.EVENT_ON_MOUSE_OUT, IDocument.EVENT_ON_FOCUS, IDocument.EVENT_ON_ALPHA_CHAR_INPUT, IDocument.EVENT_ON_NON_ALPHA_CHAR_INPUT, IDocument.EVENT_ON_INSERT_DONE, IDocument.EVENT_ON_INSERT_START, IDocument.EVENT_ON_UNLOAD

getServiceProvider

public IServiceProvider getServiceProvider()
Returns the applications service provider, or null if not available.

Specified by:
getServiceProvider in interface IDocument
Returns:
the applications service provider, or null

setServiceProvider

public void setServiceProvider(IServiceProvider serviceProvider)
Sets the service provider for the document.

Parameters:
serviceProvider - the service provider to be set

setXInterfaceObjectSelection

protected void setXInterfaceObjectSelection(IXInterfaceObjectSelection interfaceObject)
                                     throws NOAException
Sets selection on the XInterface object selection.

Parameters:
interfaceObject - XInterface object selection to be set
Throws:
NOAException - if the selection type is not supported

removeCloseListeners

protected void removeCloseListeners()
Removes all close listeners.


removeModifyListeners

protected void removeModifyListeners()
Removes all modify listeners.


removeDocumentListeners

protected void removeDocumentListeners()
Removes all document listeners.


Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013