protected Object getModelByName(String sName) { Object model = null; try { model = m_xDlgModelNameContainer.getByName(sName); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(System.out); } return model; }
protected Object getModelByName(String sName) { Object model = null; try { model = m_xDlgModelNameContainer.getByName(sName); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(System.out); } return model; }
/** * Get the current step */ private int getCurrentStep() { int step = -1; try { XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel); step = ((Integer) xDialogModelPropertySet.getPropertyValue("Step")).intValue(); } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); } return step; }
/** * Get the current step */ private int getCurrentStep() { int step = -1; try { XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel); step = ((Integer) xDialogModelPropertySet.getPropertyValue("Step")).intValue(); } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); } return step; }
public void initialize(String[] PropertyNames, Object[] PropertyValues) throws com.sun.star.script.BasicErrorException{ try{ XMultiPropertySet xMultiPropertySet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, m_xDlgModelNameContainer); xMultiPropertySet.setPropertyValues(PropertyNames, PropertyValues); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(System.out); }}
protected void setModelProperties(Object model, String[] pNames, Object[] pValues) { XPropertySet xCFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, model); for(int i = 0; i < pNames.length; i++) { try { xCFModelPSet.setPropertyValue(pNames[i], pValues[i]); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(System.out); } } }
public void initialize(String[] PropertyNames, Object[] PropertyValues) throws com.sun.star.script.BasicErrorException{ try{ XMultiPropertySet xMultiPropertySet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, m_xDlgModelNameContainer); xMultiPropertySet.setPropertyValues(PropertyNames, PropertyValues); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(System.out); }}
protected void setModelProperties(Object model, String[] pNames, Object[] pValues) { XPropertySet xCFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, model); for(int i = 0; i < pNames.length; i++) { try { xCFModelPSet.setPropertyValue(pNames[i], pValues[i]); } catch (com.sun.star.uno.Exception ex) { ex.printStackTrace(System.out); } } }
/** * Moves to another step * @param nNewID the step to move to. */ private void setCurrentStep(int nNewID) { try { XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel); int nOldStep = getCurrentStep(); // in the following line "ID" and "Step" are mixed together. // In fact in this case they denot the same if (nNewID != nOldStep){ xDialogModelPropertySet.setPropertyValue("Step", new Integer(nNewID)); } } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); } }
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; }
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; } }
/** * Moves to another step * @param nNewID the step to move to. */ private void setCurrentStep(int nNewID) { try { XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel); int nOldStep = getCurrentStep(); // in the following line "ID" and "Step" are mixed together. // In fact in this case they denot the same if (nNewID != nOldStep){ xDialogModelPropertySet.setPropertyValue("Step", new Integer(nNewID)); } } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); } }
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; } }
public Object getProperty(String configPath, String property) { Object theObject = null; try { Object root = this.getRootNode(configPath, true); XHierarchicalPropertySet props = (XHierarchicalPropertySet) UnoRuntime .queryInterface(XHierarchicalPropertySet.class, root); theObject = props.getHierarchicalPropertyValue(property); } catch (Exception e) { e.printStackTrace(); } return theObject; }
public Object getProperty(String configPath, String property) { Object theObject = null; try { Object root = this.getRootNode(configPath, true); XHierarchicalPropertySet props = (XHierarchicalPropertySet) UnoRuntime .queryInterface(XHierarchicalPropertySet.class, root); theObject = props.getHierarchicalPropertyValue(property); } catch (Exception e) { e.printStackTrace(); } return theObject; }
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; }
public Object getChildNode(Object parent, String child) { Object theObject = null; try { XNameAccess childNode = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, parent); if (childNode.hasByName(child)) { theObject = childNode.getByName(child); } } catch (Exception e) { e.printStackTrace(); } return theObject; }
public Object getChildNode(Object parent, String child) { Object theObject = null; try { XNameAccess childNode = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, parent); if (childNode.hasByName(child)) { theObject = childNode.getByName(child); } } catch (Exception e) { e.printStackTrace(); } return theObject; }
public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) throws com.sun.star.script.BasicErrorException{ try { Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName); XMultiPropertySet xControlMultiPropertySet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel); xControlMultiPropertySet.setPropertyValues(sProperties, sValues); m_xDlgModelNameContainer.insertByName(sName, oControlModel); return oControlModel; } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); return null; } }
public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) throws com.sun.star.script.BasicErrorException{ try { Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName); XMultiPropertySet xControlMultiPropertySet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel); xControlMultiPropertySet.setPropertyValues(sProperties, sValues); m_xDlgModelNameContainer.insertByName(sName, oControlModel); return oControlModel; } catch (com.sun.star.uno.Exception exception) { exception.printStackTrace(System.out); return null; } }