Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » TreeRidget Custom Icon
TreeRidget Custom Icon [message #534167] Tue, 18 May 2010 09:00 Go to next message
Eclipse UserFriend
Originally posted by: matthias.rodler.gmx.net

Hi,

I'm currently using Riena 1.2.0.0 and want to use custom items with my
TreeRidget but I'm only able to use resources which are within the riena
client plugin(the keys are defined in
org.eclipse.riena.internal.ui.ridgets.swt.SharedImages).

Is there any possibility to use own resources or have I missed something?

Thanks.

Matthias
Re: TreeRidget Custom Icon [message #534830 is a reply to message #534167] Thu, 20 May 2010 13:03 Go to previous messageGo to next message
Thorsten Schenkel is currently offline Thorsten SchenkelFriend
Messages: 15
Registered: July 2009
Junior Member
Am 18.05.2010 11:00, schrieb Matthias Rodler:

Hallo,

in Riena it is not possible to change the images of folders of the tree.
The Riena Look&Feel provides a set of keys to define these images:
SUB_MODULE_TREE_FOLDER_OPEN_ICON
SUB_MODULE_TREE_FOLDER_CLOSED_ICON
SUB_MODULE_TREE_DOCUMENT_LEAF_ICON
But these are not displayed in the tree. See Bug #273817 -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273817

greeting

Thorsten


> Hi,
>
> I'm currently using Riena 1.2.0.0 and want to use custom items with my
> TreeRidget but I'm only able to use resources which are within the riena
> client plugin(the keys are defined in
> org.eclipse.riena.internal.ui.ridgets.swt.SharedImages).
>
> Is there any possibility to use own resources or have I missed something?
>
> Thanks.
>
> Matthias
Re: TreeRidget Custom Icon [message #535026 is a reply to message #534167] Fri, 21 May 2010 06:42 Go to previous messageGo to next message
Elias Volanakis is currently offline Elias VolanakisFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Matthias,

I believe your use case should work. See SnippetTreeRidget005 for a starting point.

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.riena/o rg.eclipse.riena.sample.snippets/src/org/eclipse/riena/sampl e/snippets/SnippetTreeRidget005.java?root=RT_Project&vie w=co

If the image is not in SharedImages the ImageStore is asked:

Activator.getSharedImage(...) {
// ...
image = ImageStore.getInstance().getImage(imageKey);
}

I'm not an expert on ImageStore (maybe another developer can confirm this), but I believe you have to add the directory that has your the images to the plugin.xml:

<extension
point="org.eclipse.riena.ui.swt.imagePaths">
<path
path="icons">
</path>
</extension>

Then you can use the imageName as a String value (file extension optional). This won't work in the Snippet, since there is no plugin.xml / ExtensionPoints in the snippets.

If you run into problems, please attach a runnable example to bugzilla and I'll work this out with you.

Elias.


Elias Volanakis | http://eclipsesource.com
elias (AT) eclipsesource.com | @evolanakis
Re: TreeRidget Custom Icon [message #535636 is a reply to message #535026] Tue, 25 May 2010 04:47 Go to previous message
Eclipse UserFriend
Originally posted by: matthias.rodler.gmx.net

Thank you Elias I will try this way.

Matthias

Am 21.05.2010 08:42, schrieb Elias Volanakis:
> Hi Matthias,
>
> I believe your use case should work. See SnippetTreeRidget005 for a
> starting point.
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.riena/o rg.eclipse.riena.sample.snippets/src/org/eclipse/riena/sampl e/snippets/SnippetTreeRidget005.java?root=RT_Project&vie w=co
>
>
> If the image is not in SharedImages the ImageStore is asked:
>
> Activator.getSharedImage(...) {
> // ...
> image = ImageStore.getInstance().getImage(imageKey);
> }
>
> I'm not an expert on ImageStore (maybe another developer can confirm
> this), but I believe you have to add the directory that has your the
> images to the plugin.xml:
>
> <extension
> point="org.eclipse.riena.ui.swt.imagePaths">
> <path
> path="icons">
> </path>
> </extension>
>
> Then you can use the imageName as a String value (file extension
> optional). This won't work in the Snippet, since there is no plugin.xml
> / ExtensionPoints in the snippets.
>
> If you run into problems, please attach a runnable example to bugzilla
> and I'll work this out with you.
>
> Elias.
Re: TreeRidget Custom Icon [message #585619 is a reply to message #534167] Thu, 20 May 2010 13:03 Go to previous message
Thorsten Schenkel is currently offline Thorsten SchenkelFriend
Messages: 15
Registered: July 2009
Junior Member
Am 18.05.2010 11:00, schrieb Matthias Rodler:

Hallo,

in Riena it is not possible to change the images of folders of the tree.
The Riena Look&Feel provides a set of keys to define these images:
SUB_MODULE_TREE_FOLDER_OPEN_ICON
SUB_MODULE_TREE_FOLDER_CLOSED_ICON
SUB_MODULE_TREE_DOCUMENT_LEAF_ICON
But these are not displayed in the tree. See Bug #273817 -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273817

greeting

Thorsten


> Hi,
>
> I'm currently using Riena 1.2.0.0 and want to use custom items with my
> TreeRidget but I'm only able to use resources which are within the riena
> client plugin(the keys are defined in
> org.eclipse.riena.internal.ui.ridgets.swt.SharedImages).
>
> Is there any possibility to use own resources or have I missed something?
>
> Thanks.
>
> Matthias
Re: TreeRidget Custom Icon [message #585631 is a reply to message #534167] Fri, 21 May 2010 06:42 Go to previous message
Elias Volanakis is currently offline Elias VolanakisFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Matthias,

I believe your use case should work. See SnippetTreeRidget005 for a starting point.

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.riena/o rg.eclipse.riena.sample.snippets/src/org/eclipse/riena/sampl e/snippets/SnippetTreeRidget005.java?root=RT_Project&vie w=co

If the image is not in SharedImages the ImageStore is asked:

Activator.getSharedImage(...) {
// ...
image = ImageStore.getInstance().getImage(imageKey);
}

I'm not an expert on ImageStore (maybe another developer can confirm this), but I believe you have to add the directory that has your the images to the plugin.xml:

<extension
point="org.eclipse.riena.ui.swt.imagePaths">
<path
path="icons">
</path>
</extension>

Then you can use the imageName as a String value (file extension optional). This won't work in the Snippet, since there is no plugin.xml / ExtensionPoints in the snippets.

If you run into problems, please attach a runnable example to bugzilla and I'll work this out with you.

Elias.
--
Elias Volanakis | http://eclipsesource.com
elias (AT) eclipsesource.com | @evolanakis


Elias Volanakis | http://eclipsesource.com
elias (AT) eclipsesource.com | @evolanakis
Re: TreeRidget Custom Icon [message #585688 is a reply to message #585631] Tue, 25 May 2010 04:47 Go to previous message
Eclipse UserFriend
Originally posted by: matthias.rodler.gmx.net

Thank you Elias I will try this way.

Matthias

Am 21.05.2010 08:42, schrieb Elias Volanakis:
> Hi Matthias,
>
> I believe your use case should work. See SnippetTreeRidget005 for a
> starting point.
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.riena/o rg.eclipse.riena.sample.snippets/src/org/eclipse/riena/sampl e/snippets/SnippetTreeRidget005.java?root=RT_Project&vie w=co
>
>
> If the image is not in SharedImages the ImageStore is asked:
>
> Activator.getSharedImage(...) {
> // ...
> image = ImageStore.getInstance().getImage(imageKey);
> }
>
> I'm not an expert on ImageStore (maybe another developer can confirm
> this), but I believe you have to add the directory that has your the
> images to the plugin.xml:
>
> <extension
> point="org.eclipse.riena.ui.swt.imagePaths">
> <path
> path="icons">
> </path>
> </extension>
>
> Then you can use the imageName as a String value (file extension
> optional). This won't work in the Snippet, since there is no plugin.xml
> / ExtensionPoints in the snippets.
>
> If you run into problems, please attach a runnable example to bugzilla
> and I'll work this out with you.
>
> Elias.
Previous Topic:Server thread status to the client
Next Topic:Riena 2.0.0.RC2 is available
Goto Forum:
  


Current Time: Thu Mar 28 14:41:45 GMT 2024

Powered by FUDForum. Page generated in 0.02409 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top