public void initialize(Object[] arg0) throws Exception { if (arg0.length > 0) { this.frame = (XFrame) UnoRuntime.queryInterface(XFrame.class, arg0[0]); } }
if (UnoRuntime.areSame(elem, elementData[i]))
/** * Gets a mapping from environment <code>from</code> to environment * <code>to</code>. * * <p>The used environments are retrieved through * <code>getEnvironment</code>.</p> * * @param from the name of the source environment * @param to the name of the target environment * @return the requested mapping * @see #getEnvironment * @see #getMapping * @see com.sun.star.uno.IMapping * * @deprecated As of UDK 3.2.0, this method is deprecated, without * offering a replacement. */ public static IMapping getMappingByName(String from, String to) throws java.lang.Exception { return getMapping(getEnvironment(from, null), getEnvironment(to, null)); }
Object[] args) throws java.lang.Exception return getBridge( getEnvironment(from, fromContext), getEnvironment(to, toContext), args);
/** * Checks if a component is registered at the <code>ServiceManager</code>. The given object argument must * provide a <code>XServiceInfo</code> interface. * <p> * @return true if the component is registred otherwise false. * @param object object which provides a <code>XServiceInfo</code> interface. * @see com.sun.star.container.XSet * @see com.sun.star.lang.XServiceInfo */ public boolean has( Object object ) throws com.sun.star.uno.RuntimeException { if (object == null) throw new com.sun.star.uno.RuntimeException("The parameter must not been null"); XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); return xServiceInfo != null && UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); }
if (!areSame(Array.get(v1, i), Array.get(v2, i))) { return false; if (!areSame( completeValue(ft, fs[i].getField().get(v1)), completeValue(ft, fs[i].getField().get(v2))))
/** * Constructs a new bridge. * <p> This method is not part of the provided <code>api</code> * and should only be used by the UNO runtime.</p> * * @param args the custom parameters: arg[0] == protocol_name, * arg[1] == xConnection, arg[2] == xInstanceProvider. * * @deprecated as of UDK 1.0 */ public java_remote_bridge(Object args[]) throws Exception { this(UnoRuntime.getEnvironment("java", null), UnoRuntime.getEnvironment("remote", null), args); }
/** * Retrieves the object identifier for a registered interface from this * environment. * * @param object a registered interface * @see com.sun.star.uno.IEnvironment#getRegisteredObjectIdentifier */ public String getRegisteredObjectIdentifier(Object object) { return UnoRuntime.generateOid(object); }
/** * Checks if a component is registered at the <code>ServiceManager</code>. * * <p>The given object argument must provide a <code>XServiceInfo</code> * interface.</p> * * @param object object which provides a <code>XServiceInfo</code> interface. * @return true if the component is registred otherwise false. * * @see com.sun.star.container.XSet * @see com.sun.star.lang.XServiceInfo */ public boolean has( Object object ) throws com.sun.star.uno.RuntimeException { if (object == null) throw new com.sun.star.uno.RuntimeException("The parameter must not been null"); XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); return xServiceInfo != null && UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); }
if (!areSame(Array.get(v1, i), Array.get(v2, i))) { return false; if (!areSame( completeValue(ft, fs[i].getField().get(v1)), completeValue(ft, fs[i].getField().get(v2))))
Object[] args) throws java.lang.Exception return getBridge( getEnvironment(from, fromContext), getEnvironment(to, toContext), args);
/** * Constructs a new bridge. * <p> * This method is not part of the provided <code>api</code> * and should only be used by the UNO runtime. * <p> * @deprecated as of UDK 1.0 * <p> * @param args the custom parameters: arg[0] == protocol_name, arg[1] == xConnection, arg[2] == xInstanceProvider */ public java_remote_bridge(Object args[]) throws Exception { this(UnoRuntime.getEnvironment("java", null), UnoRuntime.getEnvironment("remote", null), args); }
/** * Retrieves the object identifier for a registered interface from this * environment. * * @param object a registered interface. * @see com.sun.star.uno.IEnvironment#getRegisteredObjectIdentifier */ public String getRegisteredObjectIdentifier(Object object) { return UnoRuntime.generateOid(object); }
public void initialize( Object[] object ) throws com.sun.star.uno.Exception { if ( object.length > 0 ) { m_xFrame = (com.sun.star.frame.XFrame)UnoRuntime.queryInterface( com.sun.star.frame.XFrame.class, object[0]); } }
if (UnoRuntime.areSame(elem, elementData[i]))
/** * Gets a mapping from environment <code>from</code> to environment * <code>to</code>. * * <p>The used environments are retrieved through * <code>getEnvironment</code>.</p> * * @param from the name of the source environment * @param to the name of the target environment * @throws Exception if something goes awry. * @return the requested mapping * @see #getEnvironment * @see #getMapping * @see com.sun.star.uno.IMapping * * @deprecated As of UDK 3.2.0, this method is deprecated, without * offering a replacement. */ public static IMapping getMappingByName(String from, String to) throws java.lang.Exception { return getMapping(getEnvironment(from, null), getEnvironment(to, null)); }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.equals(METHOD_EQUALS) || method.equals(METHOD_IS_SAME)) { return Boolean.valueOf(args[0] != null && oid.equals(UnoRuntime.generateOid(args[0]))); } else if (method.equals(METHOD_HASH_CODE)) { return new Integer(oid.hashCode()); } else if (method.equals(METHOD_TO_STRING)) { return "[Proxy:" + System.identityHashCode(proxy) + "," + oid + "," + type + "]"; } else if (method.equals(METHOD_QUERY_INTERFACE)) { // See the comment in java_remote_bridge.mapInterfaceTo for one // reason why this implementation must not satisfy a request for // a super-interface with a proxy itself: return args[0].equals(type) ? proxy : request("queryInterface", args); } else if (method.equals(METHOD_GET_OID)) { return oid; } else { return request(method.getName(), args); } }
public void focusLost(FocusEvent _focusEvent) { short nFocusFlags = _focusEvent.FocusFlags; int nFocusChangeReason = nFocusFlags & FocusChangeReason.TAB; if (nFocusChangeReason == FocusChangeReason.TAB) { // get the window of the Window that has gained the Focus... // Note that the xWindow is just a representation of the controlwindow // but not of the control itself XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, _focusEvent.NextFocus); } }
if (UnoRuntime.areSame(elem, elementData[i]))
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.equals(METHOD_EQUALS) || method.equals(METHOD_IS_SAME)) { return Boolean.valueOf(args[0] != null && oid.equals(UnoRuntime.generateOid(args[0]))); } else if (method.equals(METHOD_HASH_CODE)) { return Integer.valueOf(oid.hashCode()); } else if (method.equals(METHOD_TO_STRING)) { return "[Proxy:" + System.identityHashCode(proxy) + "," + oid + "," + type + "]"; } else if (method.equals(METHOD_QUERY_INTERFACE)) { // See the comment in java_remote_bridge.mapInterfaceTo for one // reason why this implementation must not satisfy a request for // a super-interface with a proxy itself: return args[0].equals(type) ? proxy : request("queryInterface", args); } else if (method.equals(METHOD_GET_OID)) { return oid; } else { return request(method.getName(), args); } }