How to set the display icon for a class?

40 views
Skip to first unread message

Tim Smith

unread,
Nov 19, 2021, 10:54:00 AM11/19/21
to topbrai...@googlegroups.com
Hi,

I would like to be able to change the icon for instances (from the purple diamond) to a custom icon based on class membership - e.g. like I see with instances of edg:BusinessFunction.

Is it possible to assign an icon to a class?  If so, how would I do this?

Thanks,

Tim

Irene Polikoff

unread,
Nov 19, 2021, 11:00:06 AM11/19/21
to topbrai...@googlegroups.com
Hi Tim,

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAF0WbnJiPN_FrWv%2BEM8cazFFct-HpAkWuH1%3DAz1B_hKn3rBDDQ%40mail.gmail.com.

Tim Smith

unread,
Nov 19, 2021, 11:32:09 AM11/19/21
to topbrai...@googlegroups.com
Thanks Irene!

This is good to know if I am able to upgrade to full EDG at some point.

I noticed the description for IconRole indicates it sets the Icon in trees and at the top of the form.  Is it possible to do this in a list of values produced by a property shape on a form?

For example, we use "generic" properties like "composed of" to define the composition of things.  Sometimes people use the same name (i.e. label) for instances of different classes.  In this context, this makes sense but it makes the list of instances shown with the property shape ambiguous.  I would like to either show the icon with the instance label or be able to append the class name to the instance label for display on the form.  In the screenshot below, one entry is an Order, the other is a Plan which, in this case, is shown by the labels but in other cases it is not so being able to use an icon or append the class name would be very helpful.

image.png

Tim

Irene Polikoff

unread,
Nov 19, 2021, 12:27:33 PM11/19/21
to topbrai...@googlegroups.com
Please see below

On Nov 19, 2021, at 11:31 AM, Tim Smith <smith...@gmail.com> wrote:

Thanks Irene!

This is good to know if I am able to upgrade to full EDG at some point.

I noticed the description for IconRole indicates it sets the Icon in trees and at the top of the form.  Is it possible to do this in a list of values produced by a property shape on a form?

For example, we use "generic" properties like "composed of" to define the composition of things.  Sometimes people use the same name (i.e. label) for instances of different classes. 

During editing, if there are two instances with the same label, they will be differentiated in the dropdown e.g:



Once selected, both values will be displayed the same way. However, on the mouse over, details for each are shown, including type and icon e.g.,



Another option is to use a tabular view, described here: https://datashapes.org/forms.html#ValueTableViewer

You would need to define a Node Shape (e.g., SimpleTableView) with just two properties - label and type. It is not necessary to give it a target. Then, specify for the property shape in question:


        dash:viewer dash:ValueTableViewer ;
sh:node ex:SimpleTableView .

This will get you a table with two columns: Label and Type.


I believe all of this is available in 7.0.

In this context, this makes sense but it makes the list of instances shown with the property shape ambiguous.  I would like to either show the icon with the instance label or be able to append the class name to the instance label for display on the form.  In the screenshot below, one entry is an Order, the other is a Plan which, in this case, is shown by the labels but in other cases it is not so being able to use an icon or append the class name would be very helpful.

<image.png>

Tim

On Fri, Nov 19, 2021 at 11:00 AM Irene Polikoff <ir...@topquadrant.com> wrote:
Hi Tim,

Please see https://datashapes.org/propertyroles.html#IconRole 

This requires 7.1. 

On Nov 19, 2021, at 10:53 AM, Tim Smith <smith...@gmail.com> wrote:

Hi,

I would like to be able to change the icon for instances (from the purple diamond) to a custom icon based on class membership - e.g. like I see with instances of edg:BusinessFunction.

Is it possible to assign an icon to a class?  If so, how would I do this?

Thanks,

Tim


--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAF0WbnJiPN_FrWv%2BEM8cazFFct-HpAkWuH1%3DAz1B_hKn3rBDDQ%40mail.gmail.com.


--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/35D68A64-92AB-4CB5-8A82-1F3B4628BA2E%40topquadrant.com.

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Tim Smith

unread,
Nov 19, 2021, 12:55:32 PM11/19/21
to topbrai...@googlegroups.com
Thanks Irene!  That will work wonderfully.

Reply all
Reply to author
Forward
0 new messages