Roassal Tip #2: Labeling bar with GraphET.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal Tip #2: Labeling bar with GraphET.

abergel
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
Photo: Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

 | diagram |
 diagram := GET2DiagramBuilder new.
 diagram horizontalBarDiagram
 models: #(10 12 13 200 150 -13 149 -151);
 regularAxis.
 diagram build.
 
 "Pick the horizontal bars and add a label"
 diagram view elements do: [ :e |
 (e shape class == RTBox) ifTrue: [ 
 e @ RTLabelled new right
 ]
 ].
 diagram view open


Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

Leo Perard
Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
Photo: Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

 | diagram |
 diagram := GET2DiagramBuilder new.
 diagram horizontalBarDiagram
 models: #(10 12 13 200 150 -13 149 -151);
 regularAxis.
 diagram build.
 
 "Pick the horizontal bars and add a label"
 diagram view elements do: [ :e |
 (e shape class == RTBox) ifTrue: [ 
 e @ RTLabelled new right
 ]
 ].
 diagram view open


Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
Leo Perard

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
On any element.

Try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.

es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.

v open
-=-=-=-=-=-=-=-=-=-=-=-=


Alexandre


On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:

Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>

https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




-- 
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

Daniel Aviv Notario
Just for the record, if you want to do that with GraphET, you should use the message modelAxis, which does practically the same, but the label sticks in the axis, with negative numbers having it over the axis and positive numbers below the axis.

Here's an example:

| diagram |
diagram := GETDiagramBuilder new.
diagram verticalBarDiagram
models: (1 to: 10);
modelAxis.
diagram open

resulting in:

https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-2207520000.1397917107./566658236754111/


;) -Daniel


From: [hidden email]
Date: Sun, 20 Apr 2014 22:25:18 -0300
To: [hidden email]
Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.

On any element.

Try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.

es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.

v open
-=-=-=-=-=-=-=-=-=-=-=-=


Alexandre


On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:

Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>

https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




-- 
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
Indeed, this Roassal tip#2 is very hacky.
We will have to design something cleaner on some point...

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 10:12 AM, Daniel Aviv Notario <[hidden email]> wrote:

> Just for the record, if you want to do that with GraphET, you should use the message modelAxis, which does practically the same, but the label sticks in the axis, with negative numbers having it over the axis and positive numbers below the axis.
>
> Here's an example:
>
> | diagram |
> diagram := GETDiagramBuilder new.
> diagram verticalBarDiagram
> models: (1 to: 10);
> modelAxis.
> diagram open
>
> resulting in:
>
> https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-2207520000.1397917107./566658236754111/
>
>
> ;) -Daniel
>
> From: [hidden email]
> Date: Sun, 20 Apr 2014 22:25:18 -0300
> To: [hidden email]
> Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.
>
> On any element.
>
> Try this:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> | v es |
> v := RTView new.
> v @ RTDraggableView.
> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
> v addAll: es.
>
> es @ RTPopup @ RTLabelled @ RTDraggable.
> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>
> v open
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>
> Alexandre
>
>
> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>
> Looks pretty cool !
> Can we use on any RTShape or only RTBox ?
>
>
> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
> Roassal Tip #2: Labeling bar with GraphET.
> You can use @RTLabelled for each bar elements. Consider the following example:
>
> -=-=-=-=-=-=-=-=-=
> | diagram |
> diagram := GET2DiagramBuilder new.
> diagram horizontalBarDiagram
> models: #(10 12 13 200 150 -13 149 -151);
> regularAxis.
> diagram build.
>
> "Pick the horizontal bars and add a label"
> diagram view elements do: [ :e |
> (e shape class == RTBox)
> ifTrue: [ e @ RTLabelled new right ]
> ].
> diagram view open
> -=-=-=-=-=-=-=-=-=
> <10168048_620580701361864_1868405001679336135_n.png>
>
> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>
> Cheers,
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> Leo Perard
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________ Moose-dev mailing list [hidden email]://www.iam.unibe.ch/mailman/listinfo/moose-dev
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

jfabry
In reply to this post by abergel
I have a related question: how do I add a label to an edge? If I do the following it does not have any effect

((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.

Thanks in advance,

On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:

> On any element.
>
> Try this:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> | v es |
> v := RTView new.
> v @ RTDraggableView.
> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
> v addAll: es.
>
> es @ RTPopup @ RTLabelled @ RTDraggable.
> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>
> v open
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>
> Alexandre
>
>
> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>
>> Looks pretty cool !
>> Can we use on any RTShape or only RTBox ?
>>
>>
>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>> Roassal Tip #2: Labeling bar with GraphET.
>> You can use @RTLabelled for each bar elements. Consider the following example:
>>
>> -=-=-=-=-=-=-=-=-=
>> | diagram |
>> diagram := GET2DiagramBuilder new.
>> diagram horizontalBarDiagram
>> models: #(10 12 13 200 150 -13 149 -151);
>> regularAxis.
>> diagram build.
>>
>> "Pick the horizontal bars and add a label"
>> diagram view elements do: [ :e |
>> (e shape class == RTBox)
>> ifTrue: [ e @ RTLabelled new right ]
>> ].
>> diagram view open
>> -=-=-=-=-=-=-=-=-=
>> <10168048_620580701361864_1868405001679336135_n.png>
>>
>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>
>> Cheers,
>> Alexandre
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>>
>>
>> --
>> Leo Perard
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

PabloEstefo
In reply to this post by abergel
Hi everyone,

On Apr 21, 2014, at 10:53, Alexandre Bergel <[hidden email]> wrote:

Indeed, this Roassal tip#2 is very hacky.
We will have to design something cleaner on some point…


I think “showValues” could be a proper name for that. 
I implemented it for GraphET2 (version 50).
=.=.=.
| builder |
builder := GET2HorizontalBar data: #(10 12 13 200 150 -13 149 -151).
builder showValues.
builder open
=.=.=.
Another example

=.=.=.
| values builder |
values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).

builder := GET2Scatterplot data: values.
builder 
x: #first;
y: #second;
r: [:v | v third * 4];
color: (Color brown alpha:0.4).

builder showValues: #third.
builder open
=.=.=.


What do you think?

Cheers,
Pablo
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 10:12 AM, Daniel Aviv Notario <[hidden email]> wrote:

Just for the record, if you want to do that with GraphET, you should use the message modelAxis, which does practically the same, but the label sticks in the axis, with negative numbers having it over the axis and positive numbers below the axis.

Here's an example:

| diagram |
diagram := GETDiagramBuilder new.
diagram verticalBarDiagram
models: (1 to: 10);
modelAxis.
diagram open

resulting in:

https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-2207520000.1397917107./566658236754111/


;) -Daniel

From: [hidden email]
Date: Sun, 20 Apr 2014 22:25:18 -0300
To: [hidden email]
Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.

On any element.

Try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.

es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.

v open
-=-=-=-=-=-=-=-=-=-=-=-=

<Screen Shot 2014-04-20 at 10.23.14 PM.png>

Alexandre


On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:

Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET.
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox)
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>

https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________ Moose-dev mailing list [hidden email]://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
In reply to this post by jfabry
It was not implemented.

You need to update Roassal.
-=-=-=-=-=-=-=-=-=-=
| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTArrow new color: Color red).

e2 translateBy: 60 @ 80.
v addAll: { e1 . e2 . l }.

e1 @ RTLabelled.
e2 @ RTLabelled.

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!').

v open.
-=-=-=-=-=-=-=-=-=-=

There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.

Cheers,
Alexandre


-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:

I have a related question: how do I add a label to an edge? If I do the following it does not have any effect

((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.

Thanks in advance,

On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:

On any element.

Try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.

es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.

v open
-=-=-=-=-=-=-=-=-=-=-=-=

<Screen Shot 2014-04-20 at 10.23.14 PM.png>

Alexandre


On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:

Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>

https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




-- 
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTArrow new color: Color red).

e2 translateBy: 60 @ 80.


e1 @ (RTLabelled new view: v).
e2 @ (RTLabelled new view: v).

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!'; view: v).

v addAll: { e1 . e2 . l }.

v open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:

> It was not implemented.
>
> You need to update Roassal.
> -=-=-=-=-=-=-=-=-=-=
> | v e1 e2 l |
> v := RTView new.
>
> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> l := RTEdge from: e1 to: e2.
> l + (RTLine new color: Color red).
> l + (RTArrow new color: Color red).
>
> e2 translateBy: 60 @ 80.
> v addAll: { e1 . e2 . l }.
>
> e1 @ RTLabelled.
> e2 @ RTLabelled.
>
> "Note that the RTLabelled interaction has to be set after having added the element in the view"
> l @ (RTLabelled new text: 'lining up!').
>
> v open.
> -=-=-=-=-=-=-=-=-=-=
> <Screen Shot 2014-04-21 at 5.32.52 PM.png>
>
> There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.
>
> Cheers,
> Alexandre
>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:
>
>> I have a related question: how do I add a label to an edge? If I do the following it does not have any effect
>>
>> ((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.
>>
>> Thanks in advance,
>>
>> On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> On any element.
>>>
>>> Try this:
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>> | v es |
>>> v := RTView new.
>>> v @ RTDraggableView.
>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>> v addAll: es.
>>>
>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>
>>> v open
>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>
>>> Alexandre
>>>
>>>
>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>
>>>> Looks pretty cool !
>>>> Can we use on any RTShape or only RTBox ?
>>>>
>>>>
>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>
>>>> -=-=-=-=-=-=-=-=-=
>>>> | diagram |
>>>> diagram := GET2DiagramBuilder new.
>>>> diagram horizontalBarDiagram
>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>> regularAxis.
>>>> diagram build.
>>>>
>>>> "Pick the horizontal bars and add a label"
>>>> diagram view elements do: [ :e |
>>>> (e shape class == RTBox)
>>>> ifTrue: [ e @ RTLabelled new right ]
>>>> ].
>>>> diagram view open
>>>> -=-=-=-=-=-=-=-=-=
>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>
>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Leo Perard
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
In reply to this post by PabloEstefo
Strange, it does not work for me?
-=-=-=-=-=-=-=-=-=
| values builder |
values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).

builder := GET2Scatterplot data: values.
builder
        x: #first;
        y: #second;
        r: [:v | v third * 4];
        color: (Color brown alpha:0.4).

builder showValues: #third.
builder open
-=-=-=-=-=-=-=-=-=

I see no labels. Maybe this is due to my last change. Each circle should have a model (i.e., not nil value)

Alexandre


--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 4:59 PM, Pablo Estefó <[hidden email]> wrote:

> Hi everyone,
>
> On Apr 21, 2014, at 10:53, Alexandre Bergel <[hidden email]> wrote:
>
>> Indeed, this Roassal tip#2 is very hacky.
>> We will have to design something cleaner on some point…
>>
>
> I think “showValues” could be a proper name for that.
> I implemented it for GraphET2 (version 50).
> =.=.=.
> | builder |
> builder := GET2HorizontalBar data: #(10 12 13 200 150 -13 149 -151).
> builder showValues.
> builder open
> =.=.=.
> <PastedGraphic-3.tiff>
> Another example
>
> =.=.=.
> | values builder |
> values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).
>
> builder := GET2Scatterplot data: values.
> builder
> x: #first;
> y: #second;
> r: [:v | v third * 4];
> color: (Color brown alpha:0.4).
>
> builder showValues: #third.
> builder open
> =.=.=.
>
> <PastedGraphic-4.tiff>
>
> What do you think?
>
> Cheers,
> Pablo
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> On Apr 21, 2014, at 10:12 AM, Daniel Aviv Notario <[hidden email]> wrote:
>>
>>> Just for the record, if you want to do that with GraphET, you should use the message modelAxis, which does practically the same, but the label sticks in the axis, with negative numbers having it over the axis and positive numbers below the axis.
>>>
>>> Here's an example:
>>>
>>> | diagram |
>>> diagram := GETDiagramBuilder new.
>>> diagram verticalBarDiagram
>>> models: (1 to: 10);
>>> modelAxis.
>>> diagram open
>>>
>>> resulting in:
>>>
>>> https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-2207520000.1397917107./566658236754111/
>>>
>>>
>>> ;) -Daniel
>>>
>>> From: [hidden email]
>>> Date: Sun, 20 Apr 2014 22:25:18 -0300
>>> To: [hidden email]
>>> Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.
>>>
>>> On any element.
>>>
>>> Try this:
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>> | v es |
>>> v := RTView new.
>>> v @ RTDraggableView.
>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>> v addAll: es.
>>>
>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>
>>> v open
>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>
>>> Alexandre
>>>
>>>
>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>
>>> Looks pretty cool !
>>> Can we use on any RTShape or only RTBox ?
>>>
>>>
>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>> Roassal Tip #2: Labeling bar with GraphET.
>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>
>>> -=-=-=-=-=-=-=-=-=
>>> | diagram |
>>> diagram := GET2DiagramBuilder new.
>>> diagram horizontalBarDiagram
>>> models: #(10 12 13 200 150 -13 149 -151);
>>> regularAxis.
>>> diagram build.
>>>
>>> "Pick the horizontal bars and add a label"
>>> diagram view elements do: [ :e |
>>> (e shape class == RTBox)
>>> ifTrue: [ e @ RTLabelled new right ]
>>> ].
>>> diagram view open
>>> -=-=-=-=-=-=-=-=-=
>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>
>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>
>>> Cheers,
>>> Alexandre
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>>
>>>
>>> --
>>> Leo Perard
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>> _______________________________________________ Moose-dev mailing list [hidden email]://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

jfabry
In reply to this post by abergel
Cool, thanks!

But just to be clear, this last mail of you is code that does NOT work?

On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:

> Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> | v e1 e2 l |
> v := RTView new.
>
> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> l := RTEdge from: e1 to: e2.
> l + (RTLine new color: Color red).
> l + (RTArrow new color: Color red).
>
> e2 translateBy: 60 @ 80.
>
>
> e1 @ (RTLabelled new view: v).
> e2 @ (RTLabelled new view: v).
>
> "Note that the RTLabelled interaction has to be set after having added the element in the view"
> l @ (RTLabelled new text: 'lining up!'; view: v).
>
> v addAll: { e1 . e2 . l }.
>
> v open.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:
>
>> It was not implemented.
>>
>> You need to update Roassal.
>> -=-=-=-=-=-=-=-=-=-=
>> | v e1 e2 l |
>> v := RTView new.
>>
>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>
>> e1 @ RTDraggable.
>> e2 @ RTDraggable.
>>
>> l := RTEdge from: e1 to: e2.
>> l + (RTLine new color: Color red).
>> l + (RTArrow new color: Color red).
>>
>> e2 translateBy: 60 @ 80.
>> v addAll: { e1 . e2 . l }.
>>
>> e1 @ RTLabelled.
>> e2 @ RTLabelled.
>>
>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>> l @ (RTLabelled new text: 'lining up!').
>>
>> v open.
>> -=-=-=-=-=-=-=-=-=-=
>> <Screen Shot 2014-04-21 at 5.32.52 PM.png>
>>
>> There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.
>>
>> Cheers,
>> Alexandre
>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:
>>
>>> I have a related question: how do I add a label to an edge? If I do the following it does not have any effect
>>>
>>> ((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.
>>>
>>> Thanks in advance,
>>>
>>> On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> On any element.
>>>>
>>>> Try this:
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>> | v es |
>>>> v := RTView new.
>>>> v @ RTDraggableView.
>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>>> v addAll: es.
>>>>
>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>>
>>>> v open
>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>
>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>>
>>>> Alexandre
>>>>
>>>>
>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>>
>>>>> Looks pretty cool !
>>>>> Can we use on any RTShape or only RTBox ?
>>>>>
>>>>>
>>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>>
>>>>> -=-=-=-=-=-=-=-=-=
>>>>> | diagram |
>>>>> diagram := GET2DiagramBuilder new.
>>>>> diagram horizontalBarDiagram
>>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>>> regularAxis.
>>>>> diagram build.
>>>>>
>>>>> "Pick the horizontal bars and add a label"
>>>>> diagram view elements do: [ :e |
>>>>> (e shape class == RTBox)
>>>>> ifTrue: [ e @ RTLabelled new right ]
>>>>> ].
>>>>> diagram view open
>>>>> -=-=-=-=-=-=-=-=-=
>>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>>
>>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>>
>>>>> Cheers,
>>>>> Alexandre
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Leo Perard
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>>
>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>
>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
It does work. Maybe you need to update Roassal.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 22, 2014, at 12:38 PM, Johan Fabry <[hidden email]> wrote:

Cool, thanks!

But just to be clear, this last mail of you is code that does NOT work? 

On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:

Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTArrow new color: Color red).

e2 translateBy: 60 @ 80.


e1 @ (RTLabelled new view: v).
e2 @ (RTLabelled new view: v).

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!'; view: v).

v addAll: { e1 . e2 . l }.

v open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:

It was not implemented.

You need to update Roassal.
-=-=-=-=-=-=-=-=-=-=
| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTArrow new color: Color red).

e2 translateBy: 60 @ 80.
v addAll: { e1 . e2 . l }.

e1 @ RTLabelled.
e2 @ RTLabelled.

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!').

v open.
-=-=-=-=-=-=-=-=-=-=
<Screen Shot 2014-04-21 at 5.32.52 PM.png>

There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.

Cheers,
Alexandre


-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:

I have a related question: how do I add a label to an edge? If I do the following it does not have any effect

((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.

Thanks in advance,

On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:

On any element.

Try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.

es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.

v open
-=-=-=-=-=-=-=-=-=-=-=-=

<Screen Shot 2014-04-20 at 10.23.14 PM.png>

Alexandre


On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:

Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>

https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




-- 
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

PabloEstefo
In reply to this post by abergel

On Apr 21, 2014, at 18:26, Alexandre Bergel <[hidden email]> wrote:

> Strange, it does not work for me?
> -=-=-=-=-=-=-=-=-=
> | values builder |
> values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).
>
> builder := GET2Scatterplot data: values.
> builder
> x: #first;
> y: #second;
> r: [:v | v third * 4];
> color: (Color brown alpha:0.4).
>
> builder showValues: #third.
> builder open
> -=-=-=-=-=-=-=-=-=
>
> I see no labels. Maybe this is due to my last change. Each circle should have a model (i.e., not nil value)

Each one has its model. The problem was that the case for positioning at center (isCenter) was missing.
I added it and committed it.

Cheers,
Pablo

>
>
> Alexandre
>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 21, 2014, at 4:59 PM, Pablo Estefó <[hidden email]> wrote:
>
>> Hi everyone,
>>
>> On Apr 21, 2014, at 10:53, Alexandre Bergel <[hidden email]> wrote:
>>
>>> Indeed, this Roassal tip#2 is very hacky.
>>> We will have to design something cleaner on some point…
>>>
>>
>> I think “showValues” could be a proper name for that.
>> I implemented it for GraphET2 (version 50).
>> =.=.=.
>> | builder |
>> builder := GET2HorizontalBar data: #(10 12 13 200 150 -13 149 -151).
>> builder showValues.
>> builder open
>> =.=.=.
>> <PastedGraphic-3.tiff>
>> Another example
>>
>> =.=.=.
>> | values builder |
>> values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).
>>
>> builder := GET2Scatterplot data: values.
>> builder
>> x: #first;
>> y: #second;
>> r: [:v | v third * 4];
>> color: (Color brown alpha:0.4).
>>
>> builder showValues: #third.
>> builder open
>> =.=.=.
>>
>> <PastedGraphic-4.tiff>
>>
>> What do you think?
>>
>> Cheers,
>> Pablo
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> On Apr 21, 2014, at 10:12 AM, Daniel Aviv Notario <[hidden email]> wrote:
>>>
>>>> Just for the record, if you want to do that with GraphET, you should use the message modelAxis, which does practically the same, but the label sticks in the axis, with negative numbers having it over the axis and positive numbers below the axis.
>>>>
>>>> Here's an example:
>>>>
>>>> | diagram |
>>>> diagram := GETDiagramBuilder new.
>>>> diagram verticalBarDiagram
>>>> models: (1 to: 10);
>>>> modelAxis.
>>>> diagram open
>>>>
>>>> resulting in:
>>>>
>>>> https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-2207520000.1397917107./566658236754111/
>>>>
>>>>
>>>> ;) -Daniel
>>>>
>>>> From: [hidden email]
>>>> Date: Sun, 20 Apr 2014 22:25:18 -0300
>>>> To: [hidden email]
>>>> Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.
>>>>
>>>> On any element.
>>>>
>>>> Try this:
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>> | v es |
>>>> v := RTView new.
>>>> v @ RTDraggableView.
>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>>> v addAll: es.
>>>>
>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>>
>>>> v open
>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>
>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>>
>>>> Alexandre
>>>>
>>>>
>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>>
>>>> Looks pretty cool !
>>>> Can we use on any RTShape or only RTBox ?
>>>>
>>>>
>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>
>>>> -=-=-=-=-=-=-=-=-=
>>>> | diagram |
>>>> diagram := GET2DiagramBuilder new.
>>>> diagram horizontalBarDiagram
>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>> regularAxis.
>>>> diagram build.
>>>>
>>>> "Pick the horizontal bars and add a label"
>>>> diagram view elements do: [ :e |
>>>> (e shape class == RTBox)
>>>> ifTrue: [ e @ RTLabelled new right ]
>>>> ].
>>>> diagram view open
>>>> -=-=-=-=-=-=-=-=-=
>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>
>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Leo Perard
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________ Moose-dev mailing list [hidden email]://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
Yes, it works!

Alexandre

On Apr 22, 2014, at 2:20 PM, Pablo Estefó <[hidden email]> wrote:

>
> On Apr 21, 2014, at 18:26, Alexandre Bergel <[hidden email]> wrote:
>
>> Strange, it does not work for me?
>> -=-=-=-=-=-=-=-=-=
>> | values builder |
>> values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).
>>
>> builder := GET2Scatterplot data: values.
>> builder
>> x: #first;
>> y: #second;
>> r: [:v | v third * 4];
>> color: (Color brown alpha:0.4).
>>
>> builder showValues: #third.
>> builder open
>> -=-=-=-=-=-=-=-=-=
>>
>> I see no labels. Maybe this is due to my last change. Each circle should have a model (i.e., not nil value)
>
> Each one has its model. The problem was that the case for positioning at center (isCenter) was missing.
> I added it and committed it.
>
> Cheers,
> Pablo
>
>>
>>
>> Alexandre
>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> On Apr 21, 2014, at 4:59 PM, Pablo Estefó <[hidden email]> wrote:
>>
>>> Hi everyone,
>>>
>>> On Apr 21, 2014, at 10:53, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> Indeed, this Roassal tip#2 is very hacky.
>>>> We will have to design something cleaner on some point…
>>>>
>>>
>>> I think “showValues” could be a proper name for that.
>>> I implemented it for GraphET2 (version 50).
>>> =.=.=.
>>> | builder |
>>> builder := GET2HorizontalBar data: #(10 12 13 200 150 -13 149 -151).
>>> builder showValues.
>>> builder open
>>> =.=.=.
>>> <PastedGraphic-3.tiff>
>>> Another example
>>>
>>> =.=.=.
>>> | values builder |
>>> values :=  #( #(1 3 9) #(3 2 7) #(5 14 5) #(6 10 7) #(7 9 9) #(8 8 10) ).
>>>
>>> builder := GET2Scatterplot data: values.
>>> builder
>>> x: #first;
>>> y: #second;
>>> r: [:v | v third * 4];
>>> color: (Color brown alpha:0.4).
>>>
>>> builder showValues: #third.
>>> builder open
>>> =.=.=.
>>>
>>> <PastedGraphic-4.tiff>
>>>
>>> What do you think?
>>>
>>> Cheers,
>>> Pablo
>>>> Alexandre
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> On Apr 21, 2014, at 10:12 AM, Daniel Aviv Notario <[hidden email]> wrote:
>>>>
>>>>> Just for the record, if you want to do that with GraphET, you should use the message modelAxis, which does practically the same, but the label sticks in the axis, with negative numbers having it over the axis and positive numbers below the axis.
>>>>>
>>>>> Here's an example:
>>>>>
>>>>> | diagram |
>>>>> diagram := GETDiagramBuilder new.
>>>>> diagram verticalBarDiagram
>>>>> models: (1 to: 10);
>>>>> modelAxis.
>>>>> diagram open
>>>>>
>>>>> resulting in:
>>>>>
>>>>> https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-2207520000.1397917107./566658236754111/
>>>>>
>>>>>
>>>>> ;) -Daniel
>>>>>
>>>>> From: [hidden email]
>>>>> Date: Sun, 20 Apr 2014 22:25:18 -0300
>>>>> To: [hidden email]
>>>>> Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.
>>>>>
>>>>> On any element.
>>>>>
>>>>> Try this:
>>>>>
>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>> | v es |
>>>>> v := RTView new.
>>>>> v @ RTDraggableView.
>>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>>>> v addAll: es.
>>>>>
>>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>>>
>>>>> v open
>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>
>>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>>>
>>>>> Alexandre
>>>>>
>>>>>
>>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>>>
>>>>> Looks pretty cool !
>>>>> Can we use on any RTShape or only RTBox ?
>>>>>
>>>>>
>>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>>
>>>>> -=-=-=-=-=-=-=-=-=
>>>>> | diagram |
>>>>> diagram := GET2DiagramBuilder new.
>>>>> diagram horizontalBarDiagram
>>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>>> regularAxis.
>>>>> diagram build.
>>>>>
>>>>> "Pick the horizontal bars and add a label"
>>>>> diagram view elements do: [ :e |
>>>>> (e shape class == RTBox)
>>>>> ifTrue: [ e @ RTLabelled new right ]
>>>>> ].
>>>>> diagram view open
>>>>> -=-=-=-=-=-=-=-=-=
>>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>>
>>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>>
>>>>> Cheers,
>>>>> Alexandre
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Leo Perard
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________ Moose-dev mailing list [hidden email]://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

jfabry
In reply to this post by abergel

Ah, I did not notice the extra view: v call. Yes now it does work, thanks!

On Apr 22, 2014, at 1:43 PM, Alexandre Bergel <[hidden email]> wrote:

> It does work. Maybe you need to update Roassal.
> <Screen Shot 2014-04-22 at 1.42.31 PM.png>
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 22, 2014, at 12:38 PM, Johan Fabry <[hidden email]> wrote:
>
>> Cool, thanks!
>>
>> But just to be clear, this last mail of you is code that does NOT work?
>>
>> On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> | v e1 e2 l |
>>> v := RTView new.
>>>
>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>>
>>> e1 @ RTDraggable.
>>> e2 @ RTDraggable.
>>>
>>> l := RTEdge from: e1 to: e2.
>>> l + (RTLine new color: Color red).
>>> l + (RTArrow new color: Color red).
>>>
>>> e2 translateBy: 60 @ 80.
>>>
>>>
>>> e1 @ (RTLabelled new view: v).
>>> e2 @ (RTLabelled new view: v).
>>>
>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>>> l @ (RTLabelled new text: 'lining up!'; view: v).
>>>
>>> v addAll: { e1 . e2 . l }.
>>>
>>> v open.
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> It was not implemented.
>>>>
>>>> You need to update Roassal.
>>>> -=-=-=-=-=-=-=-=-=-=
>>>> | v e1 e2 l |
>>>> v := RTView new.
>>>>
>>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>>>
>>>> e1 @ RTDraggable.
>>>> e2 @ RTDraggable.
>>>>
>>>> l := RTEdge from: e1 to: e2.
>>>> l + (RTLine new color: Color red).
>>>> l + (RTArrow new color: Color red).
>>>>
>>>> e2 translateBy: 60 @ 80.
>>>> v addAll: { e1 . e2 . l }.
>>>>
>>>> e1 @ RTLabelled.
>>>> e2 @ RTLabelled.
>>>>
>>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>>>> l @ (RTLabelled new text: 'lining up!').
>>>>
>>>> v open.
>>>> -=-=-=-=-=-=-=-=-=-=
>>>> <Screen Shot 2014-04-21 at 5.32.52 PM.png>
>>>>
>>>> There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:
>>>>
>>>>> I have a related question: how do I add a label to an edge? If I do the following it does not have any effect
>>>>>
>>>>> ((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>
>>>>>> On any element.
>>>>>>
>>>>>> Try this:
>>>>>>
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>> | v es |
>>>>>> v := RTView new.
>>>>>> v @ RTDraggableView.
>>>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>>>>> v addAll: es.
>>>>>>
>>>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>>>>
>>>>>> v open
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>>
>>>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>>>>
>>>>>> Alexandre
>>>>>>
>>>>>>
>>>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>>>>
>>>>>>> Looks pretty cool !
>>>>>>> Can we use on any RTShape or only RTBox ?
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>>>>
>>>>>>> -=-=-=-=-=-=-=-=-=
>>>>>>> | diagram |
>>>>>>> diagram := GET2DiagramBuilder new.
>>>>>>> diagram horizontalBarDiagram
>>>>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>>>>> regularAxis.
>>>>>>> diagram build.
>>>>>>>
>>>>>>> "Pick the horizontal bars and add a label"
>>>>>>> diagram view elements do: [ :e |
>>>>>>> (e shape class == RTBox)
>>>>>>> ifTrue: [ e @ RTLabelled new right ]
>>>>>>> ].
>>>>>>> diagram view open
>>>>>>> -=-=-=-=-=-=-=-=-=
>>>>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>>>>
>>>>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Alexandre
>>>>>>>
>>>>>>> --
>>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Leo Perard
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>> --
>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>>
>>>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>>>
>>>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

Tudor Girba-2
In reply to this post by abergel
I have two questions:
- why are you using "view open" when in the playground?
- and what fonts are those?

:)

Doru


On Tue, Apr 22, 2014 at 6:43 PM, Alexandre Bergel <[hidden email]> wrote:
It does work. Maybe you need to update Roassal.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 22, 2014, at 12:38 PM, Johan Fabry <[hidden email]> wrote:

Cool, thanks!

But just to be clear, this last mail of you is code that does NOT work? 

On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:

Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTArrow new color: Color red).

e2 translateBy: 60 @ 80.


e1 @ (RTLabelled new view: v).
e2 @ (RTLabelled new view: v).

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!'; view: v).

v addAll: { e1 . e2 . l }.

v open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:

It was not implemented.

You need to update Roassal.
-=-=-=-=-=-=-=-=-=-=
| v e1 e2 l |
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
l + (RTArrow new color: Color red).

e2 translateBy: 60 @ 80.
v addAll: { e1 . e2 . l }.

e1 @ RTLabelled.
e2 @ RTLabelled.

"Note that the RTLabelled interaction has to be set after having added the element in the view"
l @ (RTLabelled new text: 'lining up!').

v open.
-=-=-=-=-=-=-=-=-=-=
<Screen Shot 2014-04-21 at 5.32.52 PM.png>

There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.

Cheers,
Alexandre


-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:

I have a related question: how do I add a label to an edge? If I do the following it does not have any effect

((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.

Thanks in advance,

On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:

On any element.

Try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.

es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.

v open
-=-=-=-=-=-=-=-=-=-=-=-=

<Screen Shot 2014-04-20 at 10.23.14 PM.png>

Alexandre


On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:

Looks pretty cool !
Can we use on any RTShape or only RTBox ?


On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
Roassal Tip #2: Labeling bar with GraphET. 
You can use @RTLabelled for each bar elements. Consider the following example:

-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.

"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox) 
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>

https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




-- 
Leo Perard
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
No particular reason for the "view open”. I usually never write it, but since some people told me “you forgot to open the view”. Well…

Helvetica Regular 12 :-)

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 22, 2014, at 3:28 PM, Tudor Girba <[hidden email]> wrote:

> I have two questions:
> - why are you using "view open" when in the playground?
> - and what fonts are those?
>
> :)
>
> Doru
>
>
> On Tue, Apr 22, 2014 at 6:43 PM, Alexandre Bergel <[hidden email]> wrote:
> It does work. Maybe you need to update Roassal.
> <Screen Shot 2014-04-22 at 1.42.31 PM.png>
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 22, 2014, at 12:38 PM, Johan Fabry <[hidden email]> wrote:
>
>> Cool, thanks!
>>
>> But just to be clear, this last mail of you is code that does NOT work?
>>
>> On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> | v e1 e2 l |
>>> v := RTView new.
>>>
>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>>
>>> e1 @ RTDraggable.
>>> e2 @ RTDraggable.
>>>
>>> l := RTEdge from: e1 to: e2.
>>> l + (RTLine new color: Color red).
>>> l + (RTArrow new color: Color red).
>>>
>>> e2 translateBy: 60 @ 80.
>>>
>>>
>>> e1 @ (RTLabelled new view: v).
>>> e2 @ (RTLabelled new view: v).
>>>
>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>>> l @ (RTLabelled new text: 'lining up!'; view: v).
>>>
>>> v addAll: { e1 . e2 . l }.
>>>
>>> v open.
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> It was not implemented.
>>>>
>>>> You need to update Roassal.
>>>> -=-=-=-=-=-=-=-=-=-=
>>>> | v e1 e2 l |
>>>> v := RTView new.
>>>>
>>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>>>
>>>> e1 @ RTDraggable.
>>>> e2 @ RTDraggable.
>>>>
>>>> l := RTEdge from: e1 to: e2.
>>>> l + (RTLine new color: Color red).
>>>> l + (RTArrow new color: Color red).
>>>>
>>>> e2 translateBy: 60 @ 80.
>>>> v addAll: { e1 . e2 . l }.
>>>>
>>>> e1 @ RTLabelled.
>>>> e2 @ RTLabelled.
>>>>
>>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>>>> l @ (RTLabelled new text: 'lining up!').
>>>>
>>>> v open.
>>>> -=-=-=-=-=-=-=-=-=-=
>>>> <Screen Shot 2014-04-21 at 5.32.52 PM.png>
>>>>
>>>> There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:
>>>>
>>>>> I have a related question: how do I add a label to an edge? If I do the following it does not have any effect
>>>>>
>>>>> ((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>
>>>>>> On any element.
>>>>>>
>>>>>> Try this:
>>>>>>
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>> | v es |
>>>>>> v := RTView new.
>>>>>> v @ RTDraggableView.
>>>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>>>>> v addAll: es.
>>>>>>
>>>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>>>>
>>>>>> v open
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>>
>>>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>>>>
>>>>>> Alexandre
>>>>>>
>>>>>>
>>>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>>>>
>>>>>>> Looks pretty cool !
>>>>>>> Can we use on any RTShape or only RTBox ?
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>>>>
>>>>>>> -=-=-=-=-=-=-=-=-=
>>>>>>> | diagram |
>>>>>>> diagram := GET2DiagramBuilder new.
>>>>>>> diagram horizontalBarDiagram
>>>>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>>>>> regularAxis.
>>>>>>> diagram build.
>>>>>>>
>>>>>>> "Pick the horizontal bars and add a label"
>>>>>>> diagram view elements do: [ :e |
>>>>>>> (e shape class == RTBox)
>>>>>>> ifTrue: [ e @ RTLabelled new right ]
>>>>>>> ].
>>>>>>> diagram view open
>>>>>>> -=-=-=-=-=-=-=-=-=
>>>>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>>>>
>>>>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Alexandre
>>>>>>>
>>>>>>> --
>>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Leo Perard
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>> --
>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>>
>>>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>>>
>>>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

Tudor Girba-2
Hi,

Hmm, that font does not seem to work well at least with the title of the window. The title is too small and the text looks squeezed in.

You do not like the Source Sans/Code fonts?

Doru


On Tue, Apr 22, 2014 at 9:03 PM, Alexandre Bergel <[hidden email]> wrote:
No particular reason for the "view open”. I usually never write it, but since some people told me “you forgot to open the view”. Well…

Helvetica Regular 12 :-)

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 22, 2014, at 3:28 PM, Tudor Girba <[hidden email]> wrote:

> I have two questions:
> - why are you using "view open" when in the playground?
> - and what fonts are those?
>
> :)
>
> Doru
>
>
> On Tue, Apr 22, 2014 at 6:43 PM, Alexandre Bergel <[hidden email]> wrote:
> It does work. Maybe you need to update Roassal.
> <Screen Shot 2014-04-22 at 1.42.31 PM.png>
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 22, 2014, at 12:38 PM, Johan Fabry <[hidden email]> wrote:
>
>> Cool, thanks!
>>
>> But just to be clear, this last mail of you is code that does NOT work?
>>
>> On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> | v e1 e2 l |
>>> v := RTView new.
>>>
>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>>
>>> e1 @ RTDraggable.
>>> e2 @ RTDraggable.
>>>
>>> l := RTEdge from: e1 to: e2.
>>> l + (RTLine new color: Color red).
>>> l + (RTArrow new color: Color red).
>>>
>>> e2 translateBy: 60 @ 80.
>>>
>>>
>>> e1 @ (RTLabelled new view: v).
>>> e2 @ (RTLabelled new view: v).
>>>
>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>>> l @ (RTLabelled new text: 'lining up!'; view: v).
>>>
>>> v addAll: { e1 . e2 . l }.
>>>
>>> v open.
>>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> It was not implemented.
>>>>
>>>> You need to update Roassal.
>>>> -=-=-=-=-=-=-=-=-=-=
>>>> | v e1 e2 l |
>>>> v := RTView new.
>>>>
>>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
>>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>>>>
>>>> e1 @ RTDraggable.
>>>> e2 @ RTDraggable.
>>>>
>>>> l := RTEdge from: e1 to: e2.
>>>> l + (RTLine new color: Color red).
>>>> l + (RTArrow new color: Color red).
>>>>
>>>> e2 translateBy: 60 @ 80.
>>>> v addAll: { e1 . e2 . l }.
>>>>
>>>> e1 @ RTLabelled.
>>>> e2 @ RTLabelled.
>>>>
>>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
>>>> l @ (RTLabelled new text: 'lining up!').
>>>>
>>>> v open.
>>>> -=-=-=-=-=-=-=-=-=-=
>>>> <Screen Shot 2014-04-21 at 5.32.52 PM.png>
>>>>
>>>> There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:
>>>>
>>>>> I have a related question: how do I add a label to an edge? If I do the following it does not have any effect
>>>>>
>>>>> ((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>
>>>>>> On any element.
>>>>>>
>>>>>> Try this:
>>>>>>
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>> | v es |
>>>>>> v := RTView new.
>>>>>> v @ RTDraggableView.
>>>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
>>>>>> v addAll: es.
>>>>>>
>>>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
>>>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
>>>>>>
>>>>>> v open
>>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>>>>>
>>>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
>>>>>>
>>>>>> Alexandre
>>>>>>
>>>>>>
>>>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
>>>>>>
>>>>>>> Looks pretty cool !
>>>>>>> Can we use on any RTShape or only RTBox ?
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>>> Roassal Tip #2: Labeling bar with GraphET.
>>>>>>> You can use @RTLabelled for each bar elements. Consider the following example:
>>>>>>>
>>>>>>> -=-=-=-=-=-=-=-=-=
>>>>>>> | diagram |
>>>>>>> diagram := GET2DiagramBuilder new.
>>>>>>> diagram horizontalBarDiagram
>>>>>>> models: #(10 12 13 200 150 -13 149 -151);
>>>>>>> regularAxis.
>>>>>>> diagram build.
>>>>>>>
>>>>>>> "Pick the horizontal bars and add a label"
>>>>>>> diagram view elements do: [ :e |
>>>>>>>         (e shape class == RTBox)
>>>>>>>                 ifTrue: [ e @ RTLabelled new right ]
>>>>>>> ].
>>>>>>> diagram view open
>>>>>>> -=-=-=-=-=-=-=-=-=
>>>>>>> <10168048_620580701361864_1868405001679336135_n.png>
>>>>>>>
>>>>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Alexandre
>>>>>>>
>>>>>>> --
>>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Leo Perard
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>> --
>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>>
>>>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>>>
>>>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal Tip #2: Labeling bar with GraphET.

abergel
> Hmm, that font does not seem to work well at least with the title of the window. The title is too small and the text looks squeezed in.
>
> You do not like the Source Sans/Code fonts?

I like them, and I am quite happy. I do not remember why I had to change the font actually. This is my throw-away image :-)

Alexandre

>
>
> On Tue, Apr 22, 2014 at 9:03 PM, Alexandre Bergel <[hidden email]> wrote:
> No particular reason for the "view open”. I usually never write it, but since some people told me “you forgot to open the view”. Well…
>
> Helvetica Regular 12 :-)
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Apr 22, 2014, at 3:28 PM, Tudor Girba <[hidden email]> wrote:
>
> > I have two questions:
> > - why are you using "view open" when in the playground?
> > - and what fonts are those?
> >
> > :)
> >
> > Doru
> >
> >
> > On Tue, Apr 22, 2014 at 6:43 PM, Alexandre Bergel <[hidden email]> wrote:
> > It does work. Maybe you need to update Roassal.
> > <Screen Shot 2014-04-22 at 1.42.31 PM.png>
> >
> > Alexandre
> > --
> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > Alexandre Bergel  http://www.bergel.eu
> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >
> >
> >
> > On Apr 22, 2014, at 12:38 PM, Johan Fabry <[hidden email]> wrote:
> >
> >> Cool, thanks!
> >>
> >> But just to be clear, this last mail of you is code that does NOT work?
> >>
> >> On Apr 21, 2014, at 5:37 PM, Alexandre Bergel <[hidden email]> wrote:
> >>
> >>> Here is a version of the same code in which the “v addAll: …” is done __after__ using RTLabelled.
> >>>
> >>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >>> | v e1 e2 l |
> >>> v := RTView new.
> >>>
> >>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
> >>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
> >>>
> >>> e1 @ RTDraggable.
> >>> e2 @ RTDraggable.
> >>>
> >>> l := RTEdge from: e1 to: e2.
> >>> l + (RTLine new color: Color red).
> >>> l + (RTArrow new color: Color red).
> >>>
> >>> e2 translateBy: 60 @ 80.
> >>>
> >>>
> >>> e1 @ (RTLabelled new view: v).
> >>> e2 @ (RTLabelled new view: v).
> >>>
> >>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
> >>> l @ (RTLabelled new text: 'lining up!'; view: v).
> >>>
> >>> v addAll: { e1 . e2 . l }.
> >>>
> >>> v open.
> >>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >>>
> >>> --
> >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> >>> Alexandre Bergel  http://www.bergel.eu
> >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >>>
> >>>
> >>>
> >>> On Apr 21, 2014, at 5:34 PM, Alexandre Bergel <[hidden email]> wrote:
> >>>
> >>>> It was not implemented.
> >>>>
> >>>> You need to update Roassal.
> >>>> -=-=-=-=-=-=-=-=-=-=
> >>>> | v e1 e2 l |
> >>>> v := RTView new.
> >>>>
> >>>> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
> >>>> e2 := (RTEllipse new size: 20) elementOn: 'world'.
> >>>>
> >>>> e1 @ RTDraggable.
> >>>> e2 @ RTDraggable.
> >>>>
> >>>> l := RTEdge from: e1 to: e2.
> >>>> l + (RTLine new color: Color red).
> >>>> l + (RTArrow new color: Color red).
> >>>>
> >>>> e2 translateBy: 60 @ 80.
> >>>> v addAll: { e1 . e2 . l }.
> >>>>
> >>>> e1 @ RTLabelled.
> >>>> e2 @ RTLabelled.
> >>>>
> >>>> "Note that the RTLabelled interaction has to be set after having added the element in the view"
> >>>> l @ (RTLabelled new text: 'lining up!').
> >>>>
> >>>> v open.
> >>>> -=-=-=-=-=-=-=-=-=-=
> >>>> <Screen Shot 2014-04-21 at 5.32.52 PM.png>
> >>>>
> >>>> There is a subtlety: you need to tell the RTLabelled what is the view to insert the label into. A bit cumbersome, but I have nothing better for now.
> >>>>
> >>>> Cheers,
> >>>> Alexandre
> >>>>
> >>>>
> >>>> --
> >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> >>>> Alexandre Bergel  http://www.bergel.eu
> >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >>>>
> >>>>
> >>>>
> >>>> On Apr 21, 2014, at 4:03 PM, Johan Fabry <[hidden email]> wrote:
> >>>>
> >>>>> I have a related question: how do I add a label to an edge? If I do the following it does not have any effect
> >>>>>
> >>>>> ((RTEdge from: efrom to: eto) + (RTLine new color: color) + (RTArrow new color: color)) @ RTLabelled.
> >>>>>
> >>>>> Thanks in advance,
> >>>>>
> >>>>> On Apr 20, 2014, at 10:25 PM, Alexandre Bergel <[hidden email]> wrote:
> >>>>>
> >>>>>> On any element.
> >>>>>>
> >>>>>> Try this:
> >>>>>>
> >>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
> >>>>>> | v es |
> >>>>>> v := RTView new.
> >>>>>> v @ RTDraggableView.
> >>>>>> es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
> >>>>>> v addAll: es.
> >>>>>>
> >>>>>> es @ RTPopup @ RTLabelled @ RTDraggable.
> >>>>>> RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
> >>>>>>
> >>>>>> v open
> >>>>>> -=-=-=-=-=-=-=-=-=-=-=-=
> >>>>>>
> >>>>>> <Screen Shot 2014-04-20 at 10.23.14 PM.png>
> >>>>>>
> >>>>>> Alexandre
> >>>>>>
> >>>>>>
> >>>>>> On Apr 20, 2014, at 9:06 PM, Leo Perard <[hidden email]> wrote:
> >>>>>>
> >>>>>>> Looks pretty cool !
> >>>>>>> Can we use on any RTShape or only RTBox ?
> >>>>>>>
> >>>>>>>
> >>>>>>> On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <[hidden email]> wrote:
> >>>>>>> Roassal Tip #2: Labeling bar with GraphET.
> >>>>>>> You can use @RTLabelled for each bar elements. Consider the following example:
> >>>>>>>
> >>>>>>> -=-=-=-=-=-=-=-=-=
> >>>>>>> | diagram |
> >>>>>>> diagram := GET2DiagramBuilder new.
> >>>>>>> diagram horizontalBarDiagram
> >>>>>>> models: #(10 12 13 200 150 -13 149 -151);
> >>>>>>> regularAxis.
> >>>>>>> diagram build.
> >>>>>>>
> >>>>>>> "Pick the horizontal bars and add a label"
> >>>>>>> diagram view elements do: [ :e |
> >>>>>>>         (e shape class == RTBox)
> >>>>>>>                 ifTrue: [ e @ RTLabelled new right ]
> >>>>>>> ].
> >>>>>>> diagram view open
> >>>>>>> -=-=-=-=-=-=-=-=-=
> >>>>>>> <10168048_620580701361864_1868405001679336135_n.png>
> >>>>>>>
> >>>>>>> https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/620580701361864/?type=1&theater
> >>>>>>>
> >>>>>>> Cheers,
> >>>>>>> Alexandre
> >>>>>>>
> >>>>>>> --
> >>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> >>>>>>> Alexandre Bergel  http://www.bergel.eu
> >>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> _______________________________________________
> >>>>>>> Moose-dev mailing list
> >>>>>>> [hidden email]
> >>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Leo Perard
> >>>>>>> _______________________________________________
> >>>>>>> Moose-dev mailing list
> >>>>>>> [hidden email]
> >>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>>>>>
> >>>>>> --
> >>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> >>>>>> Alexandre Bergel  http://www.bergel.eu
> >>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Moose-dev mailing list
> >>>>>> [hidden email]
> >>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>>>>
> >>>>>
> >>>>>
> >>>>> ---> Save our in-boxes! http://emailcharter.org <---
> >>>>>
> >>>>> Johan Fabry   -   http://pleiad.cl/~jfabry
> >>>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Moose-dev mailing list
> >>>>> [hidden email]
> >>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Moose-dev mailing list
> >>> [hidden email]
> >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>>
> >>
> >>
> >>
> >> ---> Save our in-boxes! http://emailcharter.org <---
> >>
> >> Johan Fabry   -   http://pleiad.cl/~jfabry
> >> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
> >>
> >>
> >> _______________________________________________
> >> Moose-dev mailing list
> >> [hidden email]
> >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
> >
> >
> >
> > --
> > www.tudorgirba.com
> >
> > "Every thing has its own flow"
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev