本文整理了Java中com.sun.star.frame.XDesktop
类的一些代码示例,展示了XDesktop
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XDesktop
类的具体详情如下:
包路径:com.sun.star.frame.XDesktop
类名称:XDesktop
暂无
代码示例来源:origin: stackoverflow.com
import com.sun.star.frame.XDesktop;
...
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
XComponent xComponent = xDesktop.getCurrentComponent();
代码示例来源:origin: mirkonasato/jodconverter
private void doStopProcess() {
try {
XDesktop desktop = OfficeUtils.cast(XDesktop.class, connection.getService(OfficeUtils.SERVICE_DESKTOP));
desktop.terminate();
} catch (DisposedException disposedException) {
// expected
} catch (Exception exception) {
// in case we can't get hold of the desktop
doTerminateProcess();
}
doEnsureProcessExited();
}
代码示例来源:origin: cogroo/cogroo4
public XFrame getCurrentFrame(){
XFrame xRetFrame = null;
try {
Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
xRetFrame = xDesktop.getCurrentFrame();
} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace();
}
return xRetFrame;
}
代码示例来源:origin: org.libreoffice/officebean
public void end()
{
// do not listen on a dying connection anymore
try {
iConnection.removeEventListener( this );
}
catch ( Throwable aExc ) {}
// do not listen on a terminating OOo anymore
try {
getOOoDesktop().removeTerminateListener( this );
}
catch ( Throwable aExc ) {}
// stop thread
this.interrupt();
}
代码示例来源:origin: org.libreoffice/officebean
EventListener( String aTag )
throws NoConnectionException
{
// init members
this.aTag = aTag;
// listen on a dying connection
iConnection.addEventListener( this );
// listen on a terminating OOo
getOOoDesktop().addTerminateListener( this );
// start this thread as a daemon
setDaemon( true );
start();
}
代码示例来源:origin: com.bbossgroups.plugins/bboss-jodconverter-core
private void doStopProcess() {
try {
XDesktop desktop = OfficeUtils.cast(XDesktop.class, connection.getService(OfficeUtils.SERVICE_DESKTOP));
desktop.terminate();
} catch (DisposedException disposedException) {
// expected
} catch (Exception exception) {
// in case we can't get hold of the desktop
doTerminateProcess();
}
doEnsureProcessExited();
}
代码示例来源:origin: org.cogroo.lang.pt_br/cogroo-addon-pt_br
public XFrame getCurrentFrame(){
XFrame xRetFrame = null;
try {
Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
xRetFrame = xDesktop.getCurrentFrame();
} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace();
}
return xRetFrame;
}
代码示例来源:origin: com.github.livesense/jodconverter-core
private void doStopProcess() {
try {
XDesktop desktop = OfficeUtils.cast(XDesktop.class, connection.getService(OfficeUtils.SERVICE_DESKTOP));
desktop.terminate();
} catch (DisposedException disposedException) {
// expected
} catch (Exception exception) {
// in case we can't get hold of the desktop
doTerminateProcess();
}
doEnsureProcessExited();
}
代码示例来源:origin: org.cogroo.lang.pt_br/cogroo-addon-pt_br
public XFrame getCurrentFrame(){
XFrame xRetFrame = null;
try {
Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
xRetFrame = xDesktop.getCurrentFrame();
} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace();
}
return xRetFrame;
}
}
代码示例来源:origin: com.haulmont.yarg/yarg
xDesktop.terminate();
代码示例来源:origin: cogroo/cogroo4
public XFrame getCurrentFrame(){
XFrame xRetFrame = null;
try {
Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
xRetFrame = xDesktop.getCurrentFrame();
} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace();
}
return xRetFrame;
}
}
代码示例来源:origin: cuba-platform/yarg
xDesktop.terminate();
内容来源于网络,如有侵权,请联系作者删除!