StringComposer - Help you to configure Your Own Click Message

From OO Lab
Jump to: navigation, search

Do you tired to see the original click message format ? Do you want edit the special string for the VM ? In this we are presenting for you , stringcomposermapping node. You can find the mapping node in the auxilary category.

Auxilary.jpg

Here is a simple example for how to use the stringcomposer mapping node. First , open the average.java in Example/Java and visualize cool in composite VM of ball_laser.

Mapping cool.jpg Cool result.jpg

Second , click the ball on the window and DIVA will unfold the variable cool. It will pop up the mapping dialog like this.

Mapping a b c d.jpg

In usually , we often mapped the VM like this.

Usually connect.jpg

When we click the VM , it will show the value of variable.

Click value.jpg

Although you can verify the variable by the VM attributes. However , if there are large amount of VMs ,what is the fastest way to identify each VM ? Imagine if you click one of VMs , the click message will show the variable name and value, ain't it good? Now , we use the cube ubvm for visualize a 、 b 、 c 、 d。 Click four stringcomposer and mapping like this.

Mapping sc a b c d.jpg

And modify the content of stringcomposer like this, you can enter any word in this dialog. $0 is means the value of variable in first inport and so on. You can connect one variable or more variables. After finish entering,please press ok button.

Modify stringcomposer.jpg Aftermodify.jpg

Then click four cubes and mapping like this.

Mapping a b c d cube.jpg

Using vmcollector to collect all of VMs , and push the collector to a container vm. Here we use the block ubvm. In block ubvm , you can list the VMs from up to bottom. The _margin port is set the VMs arrangment. If you set the value to 0 , the VMs will be arrange to left. Set the value to 1 , the VMs will be arrange tocenter. And set the value to 2, the VMs will be arrange to right.

Container.jpg

And you can see the string which typed by yourself when you click anyone of VMs.

Result2.jpg

The stringcomposer mapping node accepts zero inport. This kind of mapping means the stringcomposer is a normal text tag, there is no relationship between stringcomposer and variable.

Mapping zero inport.jpg Mapping zero inport edit.jpg The same.jpg Zero result.jpg

Personal tools