New widget [message #33556] |
Fri, 15 June 2007 10:17 |
Eclipse User |
|
|
|
Originally posted by: oberhack.softwarefabrik.net
Hi all,
I'm just trying to create a new control. I already figured out how to
register a new kit and LCA class.
In my NewControlLCA class, the "renderInitialization" method calls
"writer.newWidget( "org.eclipse.swt.widgets.NewControl",...).
But it seems to me that NewControl.js is newer called.
Any hints what to do to register NewControl.js?
Thanks for the help
Andreas
|
|
|
Re: New widget [message #33590 is a reply to message #33556] |
Fri, 15 June 2007 14:28 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Andreas,
the org.eclipse.rap.ui.workbench.resources extension point can be used
therefore.
Implement the IResource interface like this:
public class MyControlResource implements IResource {
public String getCharset() {
return "utf-8"; // or whatever the resource was saved with
}
public ClassLoader getLoader() {
return this.getClass().getClassLoader();
}
public RegisterOptions getOptions() {
return RegisterOptions.VERSION; //
}
public String getLocation() {
return "path/to/MyControl.js";
}
public boolean isJSLibrary() {
return true;
}
public boolean isExternal() {
return false;
}
}
HTH
Rüdiger
Andreas wrote:
> Hi all,
>
> I'm just trying to create a new control. I already figured out how to
> register a new kit and LCA class.
>
> In my NewControlLCA class, the "renderInitialization" method calls
> "writer.newWidget( "org.eclipse.swt.widgets.NewControl",...).
>
> But it seems to me that NewControl.js is newer called.
>
> Any hints what to do to register NewControl.js?
>
> Thanks for the help
>
> Andreas
>
>
|
|
|
|
Re: New widget - source? [message #39602 is a reply to message #33760] |
Wed, 18 July 2007 17:51 |
Eclipse User |
|
|
|
Originally posted by: giuliapo.gmail.com
Hi Andreas!
Would it be possible for you to give me/us a working case of a basic
widget? I can't find any tutorial, but maybe with your experience in
this case we can manage to give us something.
Many regards,
Bruno.
Andreas wrote:
> Hi Rüdiger,
>
> works great!! Fantastic.
>
> Thanks
>
> Andreas
>
> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
> news:f4u7m9$t3p$1@build.eclipse.org...
>> Hi Andreas,
>>
>> the org.eclipse.rap.ui.workbench.resources extension point can be used
>> therefore.
>> Implement the IResource interface like this:
>>
>> public class MyControlResource implements IResource {
>>
>> public String getCharset() {
>> return "utf-8"; // or whatever the resource was saved with
>> }
>>
>> public ClassLoader getLoader() {
>> return this.getClass().getClassLoader();
>> }
>>
>> public RegisterOptions getOptions() {
>> return RegisterOptions.VERSION; //
>> }
>>
>> public String getLocation() {
>> return "path/to/MyControl.js";
>> }
>>
>> public boolean isJSLibrary() {
>> return true;
>> }
>>
>> public boolean isExternal() {
>> return false;
>> }
>> }
>>
>> HTH
>> Rüdiger
>>
>> Andreas wrote:
>>> Hi all,
>>>
>>> I'm just trying to create a new control. I already figured out how to
>>> register a new kit and LCA class.
>>>
>>> In my NewControlLCA class, the "renderInitialization" method calls
>>> "writer.newWidget( "org.eclipse.swt.widgets.NewControl",...).
>>>
>>> But it seems to me that NewControl.js is newer called.
>>>
>>> Any hints what to do to register NewControl.js?
>>>
>>> Thanks for the help
>>>
>>> Andreas
>
>
|
|
|
Re: New widget - source? [message #39632 is a reply to message #39602] |
Wed, 18 July 2007 22:55 |
Eclipse User |
|
|
|
Originally posted by: mehow.infogenia.pl
Hello Bruno,
I also recently started to learn how to write a custom widget, and I
think I already know some basics. You may want to check the thread
titled "Custom widgets" as well as the one titled "LCA for your custom
widget" (which then changed its title to "Theming of the custom
widgets") if haven't done so yet. The first one includes some code I
wrote (or in fact copied) and both include answers to many questions
that arised, thanks to Ralf, Benjamin and Andreas.
I'd be glad to answer some more specific question if only I know the
answers to them.
Best Regards
Michał
Bruno Vieira pisze:
> Hi Andreas!
>
> Would it be possible for you to give me/us a working case of a basic
> widget? I can't find any tutorial, but maybe with your experience in
> this case we can manage to give us something.
>
> Many regards,
> Bruno.
>
>
>
>
>
> Andreas wrote:
>> Hi Rüdiger,
>>
>> works great!! Fantastic.
>>
>> Thanks
>>
>> Andreas
>>
>> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
>> news:f4u7m9$t3p$1@build.eclipse.org...
>>> Hi Andreas,
>>>
>>> the org.eclipse.rap.ui.workbench.resources extension point can be
>>> used therefore.
>>> Implement the IResource interface like this:
>>>
>>> public class MyControlResource implements IResource {
>>>
>>> public String getCharset() {
>>> return "utf-8"; // or whatever the resource was saved with
>>> }
>>>
>>> public ClassLoader getLoader() {
>>> return this.getClass().getClassLoader();
>>> }
>>>
>>> public RegisterOptions getOptions() {
>>> return RegisterOptions.VERSION; //
>>> }
>>>
>>> public String getLocation() {
>>> return "path/to/MyControl.js";
>>> }
>>>
>>> public boolean isJSLibrary() {
>>> return true;
>>> }
>>>
>>> public boolean isExternal() {
>>> return false;
>>> }
>>> }
>>>
>>> HTH
>>> Rüdiger
>>>
>>> Andreas wrote:
>>>> Hi all,
>>>>
>>>> I'm just trying to create a new control. I already figured out how
>>>> to register a new kit and LCA class.
>>>>
>>>> In my NewControlLCA class, the "renderInitialization" method calls
>>>> "writer.newWidget( "org.eclipse.swt.widgets.NewControl",...).
>>>>
>>>> But it seems to me that NewControl.js is newer called.
>>>>
>>>> Any hints what to do to register NewControl.js?
>>>>
>>>> Thanks for the help
>>>>
>>>> Andreas
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03856 seconds