hummmm
I don't know.
Could not figure out what it means.
nicolas
----- Mail original -----
De: "Alexandre Bergel"
<abergel(a)dcc.uchile.cl>
À: "Moose-related development" <moose-dev(a)iam.unibe.ch>
Envoyé: Lundi 27 Juin 2011 23:37:58
Objet: [Moose-dev] Visual indicator
I found this indicator in a magazine and I kind of like it, even if I
am not sure how useful it is in practice :-)
[image/png:VisualIndicator.png]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Visual indicator"
| element allElements metrics shape normalizer |
"Data"
metrics := {#numberOfAttributes . #numberOfMethods .
#numberOfAttributesInherited . #numberOfMethodsInherited}.
element := MORectangleShape.
allElements := MOShape withAllSubclasses sortedAs: #name.
"Visualization"
view shape rectangle withoutBorder.
view nodes: metrics forEach: [ :selector |
| t index |
t := (allElements sortedAs: selector) reverse.
view shape label fontColor: Color red.
view interaction forwarder.
view node: selector.
index := (t indexOf: element).
"The first three elements"
view shape rectangle withoutBorder.
view interaction forwarder.
"Color of the circle"
normalizer := MONColorLinearNormalizer
inContext: t
withCommand: [:v | v perform: selector]
lowColor: Color veryLightGray
highColor: Color black.
view node: selector forIt: [
(t copyFrom: 1 to: (4 min: index) - 1) do: [:c |
view shape rectangle withoutBorder.
view node: (c perform: selector) forIt: [
view shape ellipse size: 10; withoutBorder;
fillColor: normalizer.
view interaction forwarder.
view node: c.
view shape label.
view node: (t indexOf: c) printString, '.', c name.
].
view verticalLineLayout gapSize: 0.
] ].
"The remaining"
view shape rectangle withoutBorder.
view node: selector forIt: [
(t copyFrom: 4 to: index - 1) do: [:c |
view shape ellipse size: 10; withoutBorder;
fillColor: normalizer.
view node: c.
].
view shape ellipse size: 10; fillColor: Color red; withoutBorder.
view node: element.
view shape label.
view node: index printString, '.', element printString.
view gridLayout
].
view verticalLineLayout gapSize: 0
].
view horizontalLineLayout gapSize: 20.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev