Language
Asturianu (ast)
Català (ca)
Čeština (cs)
Dansk (da)
Deutsch (de)
English [US] (en-US)
Español (es)
Esperanto (eo)
Eesti keel (et)
Euskara (eu)
Français (fr)
Gàidhlig (gd)
Galego (gl)
Italiano (it)
Lietuvių (lt)
Magyar (hu)
Nederlands (nl)
Norsk (no)
Polski (pl)
Português [do Brasil] (pt-BR)
Português [Europeu] (pt)
Română (ro)
Slovenčina (sk)
Slovenščina (sl)
Suomi (fi)
Svenska (sv)
Yкраїнська (uk)
Tiếng Việt (vi)
Türkçe (tr)
ኦሮሚኛ (om)
Հայերեն (hy)
Ελληνικά (el)
български език (bg)
Русский (ru)
Cрпски [ћирилицом] (sr)
עברית (he)
हिन्दी (hi)
ភាសាខ្មែរ (km)
தமிழ் (ta)
ภาษาไทย (th)
简体中文 (zh-CN)
正體中文 (zh-TW)
日本語 (ja)
한국어 (ko)
The Free and Open Productivity Suite
:: com :: sun :: star :: frame ::
interface XDispatch
Description
serves state information of objects which can be connected to
controls (e.g. toolbox controls).
Each state change is to be broadcasted to all registered
status listeners. The first notification should be performed
synchronously from addStatusListener() ;
if not, controls may flicker. State listener must be aware of this
synchronous notification.
The state consists of enabled/disabled and a short descriptive text
of the function (e.g. "undo insert character"). It is to be broadcasted
whenever this state changes or the control should re-get the value
for the URL it is connected to. Additionally, a context-switch-event
is to be broadcasted whenever the object may be out of scope,
to force the state listener to requery the XDispatch .
See also
Frame , FeatureStateEvent
Methods' Summary
dispatch
dispatches (executes) an URL asynchronously.
addStatusListener
registers a listener of a control for a specific URL
at this object to receive status events.
removeStatusListener
unregisters a listener from a control.
Methods' Details
dispatch
[oneway] void
dispatch (
[in] ::com::sun::star::util ::URL
URL,
[in] sequence< ::com::sun::star::beans ::PropertyValue >
Arguments );
Description
dispatches (executes) an URL asynchronously.
It is only allowed to dispatch URLs for which this XDispatch
was explicitely queried. Additional arguments ("'#..." or "?...") are allowed.
Parameter URL
fully parsed URL describing the feature which should be dispatched (=executed)
Parameter Arguments
optional arguments for this request.
They depend on the real implementation of the dipsatch object.
Example
// some code for a click-handler (Java)
void myOnClick (String sURL,String sTargetFrame,com.sun.star.beans.PropertyValue[] lArguments)
{
com.sun.star.util.URL[] aURL = new com.sun.star.util.URL[1];
aURL[0] = new com.sun.star.util.URL();
aURL[0].Complete = sURL;
com.sun.star.util.XURLTransformer xParser = (com.sun.star.util.XURLTransformer)UnoRuntime.queryInterface(
com.sun.star.util.XURLTransformer.class,
mxServiceManager.createInstance("com.sun.star.util.URLTransformer"));
xParser.parseStrict(aURL);
com.sun.star.frame.XDispatch xDispatcher = mxFrame.queryDispatch(aURL[0], sTargetFrame, com.sun.star.frame.FrameSearchFlag.GLOBAL);
if(xDispatcher!=null)
xDispatcher.dispatch(aURL[0], lArguments);
}
addStatusListener
Description
registers a listener of a control for a specific URL
at this object to receive status events.
It is only allowed to register URLs for which this XDispatch
was explicitely queried. Additional arguments ("#..." or "?...") will be ignored.
Note: Notifications can't be guaranteed! This will be a part of interface XNotifyingDispatch .
Parameter Control
listener that wishes to be informed
Parameter URL
the URL (without additional arguments) the listener wishes to be registered for.
A listener can be registered for more than one URL at the same time.
See also
XStatusListener , XDispatch ::removeStatusListener()
removeStatusListener
Description
unregisters a listener from a control.
Parameter Control
listener that wishes to be unregistered
Parameter URL
URL the listener was registered for.
Additional arguments ("#..." or "?...") will be ignored.
See also
XStatusListener , XDispatch ::addStatusListener()
Top of Page Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.