hi,
.
how did you create the form???
assuming you have developed the the .xdl file for the form(dialog)..
in your dispatch method, you have to just use XDialogProvider,
like:
(assuming you have the Service Factory)
.
 XDialogProvider xDialogProvider =
mxServiceFactory.createInstance("com.sun.star.awt.DialogProvider2" );
 XDialog xDialog = xDialogProvider.createDialog("<path to the .xdl file>");
 xDialog.execute();
.
soooo.. for your dispatch:
it would be like:
.
public void dispatch( com.sun.star.util.URL aURL,
com.sun.star.beans.PropertyValue[] aArguments )
{
if ( aURL.Protocol.compareTo("com.example.kbshortcutreminder:") == 0 )
{
if ( aURL.Path.compareTo("ShortcutReminder") == 0 )
{
   XDialogProvider xDialogProvider =
mxServiceFactory.createInstance("com.sun.star.awt.DialogProvider2" );
   XDialog xDialog = xDialogProvider.createDialog("<path to the .xdl
file>");
   xDialog.execute();

   return;
}
}
}
Path to the .xdl file can be specified as:
"vnd.sun.star.extension://your-extension-identifier/path" +
"/within/oxt/file/interface1.xdl"
   .
hope its what you are looking for.
.
regards
kushal
.
On Sat, Dec 18, 2010 at 4:34 PM, Nathasha Jazkrina <
[email protected]> wrote:

>
> Im new to OO and not familiar with UNO concepts used here in developing OO
> plugins. Hope u can help me.
>
> I am developing a plug in for OO Writer. Using the plug in available here
> http://netbeans.org/community/magazine/html/03/openoffice/ I could
> straghtaway generate the necassary code to intgrate the appication as a
> plugin.
>
> I also created a new form, say Interface1 (which is a UI for my plug in),
> and i need to know how to make this form visible. I am supposed to do this
> by editting the method called dispatch wich is in some other class.
>
>
> public void dispatch( com.sun.star.util.URL aURL,
>                           com.sun.star.beans.PropertyValue[] aArguments )
>    {
>         if ( aURL.Protocol.compareTo("com.example.kbshortcutreminder:") ==
> 0 )
>        {
>            if ( aURL.Path.compareTo("ShortcutReminder") == 0 )
>            {
>
>                 //code to make the form 'Interface1' visible
>
>                return;
>            }
>        }
>    }
>
> Thank u in advance

Reply via email to