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.internal.desktop
Class DesktopService

java.lang.Object
  extended by ag.ion.bion.officelayer.internal.desktop.DesktopService
All Implemented Interfaces:
IDesktopService, IDisposeable

public class DesktopService
extends java.lang.Object
implements IDesktopService

Desktop service of OpenOffice.org.


Constructor Summary
DesktopService(com.sun.star.frame.XDesktop xDesktop, IOfficeConnection officeConnection)
          Constructs new DesktopService.
DesktopService(com.sun.star.frame.XDesktop xDesktop, IOfficeConnection officeConnection, boolean preventTermination)
          Constructs new DesktopService.
 
Method Summary
 void activateTerminationPrevention()
          Activates the prevention of the termination.
 void addDocumentListener(IDocumentListener documentListener)
          Adds new document listener.
 void addTerminateListener(ITerminateListener terminateListener)
          Adds new terminate listener.
 IFrame constructNewOfficeFrame(java.awt.Container container)
          Constructs new OpenOffice.org frame which is integrated into the submitted AWT container.
 IFrame constructNewOfficeFrame(NativeView nativeView)
          Constructs new OpenOffice.org frame which uses the submitted native view.
 void deactivateTerminationPrevention()
          Deactivates the prevention of the termination.
 void dispose()
          Disposes all allocated resources.
 int getFramesCount()
          Returns the current number of frames, or -1 if an error occured returning it.
 void removeDocumentListener(IDocumentListener documentListener)
          Removes document listener.
 void removeTerminateListener(ITerminateListener terminateListener)
          Removes terminate listener.
 void terminate()
          Terminates the related OpenOffice.org process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesktopService

public DesktopService(com.sun.star.frame.XDesktop xDesktop,
                      IOfficeConnection officeConnection)
               throws java.lang.IllegalArgumentException
Constructs new DesktopService.

Parameters:
xDesktop - OpenOffice.org XDesktop interface to be used
officeConnection - connection to OpenOffice.org to be used
Throws:
java.lang.IllegalArgumentException - if the submitted OpenOffice.org XDesktop interface or the connection to OpenOffice.org is not valid

DesktopService

public DesktopService(com.sun.star.frame.XDesktop xDesktop,
                      IOfficeConnection officeConnection,
                      boolean preventTermination)
               throws java.lang.IllegalArgumentException
Constructs new DesktopService.

Parameters:
xDesktop - OpenOffice.org XDesktop interface to be used
officeConnection - connection to OpenOffice.org to be used
preventTermination - indicates if the termination should be prevented
Throws:
java.lang.IllegalArgumentException - if the submitted OpenOffice.org XDesktop interface or the connection to OpenOffice.org is not valid
Method Detail

terminate

public void terminate()
               throws NOAException
Terminates the related OpenOffice.org process.

Specified by:
terminate in interface IDesktopService
Throws:
NOAException - if the termination can not be done

activateTerminationPrevention

public void activateTerminationPrevention()
Activates the prevention of the termination.

Specified by:
activateTerminationPrevention in interface IDesktopService

deactivateTerminationPrevention

public void deactivateTerminationPrevention()
Deactivates the prevention of the termination.

Specified by:
deactivateTerminationPrevention in interface IDesktopService

addTerminateListener

public void addTerminateListener(ITerminateListener terminateListener)
Adds new terminate listener.

Specified by:
addTerminateListener in interface IDesktopService
Parameters:
terminateListener - new terminate listener

removeTerminateListener

public void removeTerminateListener(ITerminateListener terminateListener)
Removes terminate listener.

Specified by:
removeTerminateListener in interface IDesktopService
Parameters:
terminateListener - terminate listener to be removed

addDocumentListener

public void addDocumentListener(IDocumentListener documentListener)
                         throws DesktopException
Adds new document listener. Uses GlobalEventBroadcaster to listen to any events on any document.

Specified by:
addDocumentListener in interface IDesktopService
Parameters:
documentListener - new document listener
Throws:
DesktopException - if document listener can not be registered

removeDocumentListener

public void removeDocumentListener(IDocumentListener documentListener)
Removes document listener.

Specified by:
removeDocumentListener in interface IDesktopService
Parameters:
documentListener - document listener to be removed

constructNewOfficeFrame

public IFrame constructNewOfficeFrame(java.awt.Container container)
                               throws DesktopException
Constructs new OpenOffice.org frame which is integrated into the submitted AWT container. This method works only on local OpenOffice.org applications.

Specified by:
constructNewOfficeFrame in interface IDesktopService
Parameters:
container - AWT container to be used
Returns:
new OpenOffice.org frame which is integrated into the submitted AWT container
Throws:
DesktopException - if the frame can not be constructed

constructNewOfficeFrame

public IFrame constructNewOfficeFrame(NativeView nativeView)
                               throws DesktopException
Constructs new OpenOffice.org frame which uses the submitted native view. This method works only on local OpenOffice.org applications.

Specified by:
constructNewOfficeFrame in interface IDesktopService
Parameters:
nativeView - native view to be used
Returns:
new OpenOffice.org frame which uses the submitted native view
Throws:
DesktopException - if the frame can not be constructed

dispose

public void dispose()
Disposes all allocated resources.

Specified by:
dispose in interface IDisposeable

getFramesCount

public int getFramesCount()
Returns the current number of frames, or -1 if an error occured returning it.

Specified by:
getFramesCount in interface IDesktopService
Returns:
the current number of frames, or -1 if an error occured returning it

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