JurajKubelka / RoassalProposals
Monticello registration
About RoassalProposals
Here are my proposals for ObjectProfile/Roassal project.
Roassal graph builders
It contains RODependencyMatrixBuilder for building graphs like Les Miserables Co-occurrence. See examples in RODependencyMatrixBuilderTest.
Gofer new
smalltalkhubUser: 'JurajKubelka' project: 'RoassalProposals';
package: 'RoassalGraphBuilders';
load.
(Smalltalk globals at: #RODependencyMatrixBuilderTest) browse.
Mondrian's ComplexShape implementation in Roassal
Introduction
Right now, there is no complement implementation in Roassal for several reasons. It seams, ComplexShape is too complex framework and no one use it. It does not allow to have for example for URL class, class name centred and the rest aligned to the left. Complex shape as a layout can be replaced by proper layout. There is already ROCellLayout in Roassal which do the job.
The idea is not to compose ROElements if someone wants to present several information of one model. For example if someone wants to use UML class as a presentation of a class, it is unsuitable to compose main ROElement by three children which the first one presents class's name, the second instance variables, the last one methods. We want to be able easily construct UML shape which has two placing parts, were we can put information about instance variables and methods.
There are two examples of the result, which source codes are available from ROExample class:

And another example which is available from ROMondrianExample class. Blue bar width displays number of variables. Green bar width displays number of methods.

Roassal script for the image above:
view setShape: (ROLabel new text: [ :el | el model ]; group: #label)
+ (ROBorder new group: #label; maxWidth)
+ (ROBox blue group: #variables; below: #label; height: 7; width: [ :el | el model instVarNames size ])
+ (ROBox green below: #variables; height: 7; width: [ :el | el model methodDict size ])
+ ROBorder.
view nodes: ROShape withAllSubclasses.
view edgesFrom: #superclass.
view treeLayout.
How to load source code
In workspace of Roassal or Moose image execute following code:
Gofer new
smalltalkhubUser: 'JurajKubelka' project: 'RoassalProposals';
package: 'Roassal';
load.
Smalltalk tools browser fullOnClass: (Smalltalk globals at: #ROExample) selector: #umlClassWithTwoBars.
Smalltalk tools browser fullOnClass: (Smalltalk globals at: #ROExample) selector: #happySmile.
Status of implementation
Roassal-JurajKubelka.601 contains initial work. It introduces ROShape>>offset:, #xOffset:, #yOffset:, #group:, #below:. It allows to construct elements of various shapes. One element is able to, for example, contain a bar graph which every peace of it presents different statistic about element's model. See example: ROExample>>umlClassWithTwoBars or images above.
TODO:
- remove ROShape>>hasNext method because it breaks polymorphism
- introduce new system of placing element's children into different shapes. So we can have two (or more) places where we can place children. These places schould have its resize strategy.
- think of different interactions for each place
- fix roassal for negative offsets of shapes
- think of meaning of
ROElement>>positionwhile shapes can have negative or positive offset. - comment new classes
Shape placing and size rules
Every shape has its bounds (x @ y) extent: (width @ height), also known as offset extent: extent. Placed relatively to ROElement>>position. In the following list of placing rules ? means value is not defined by user:
- (x @ y) extent: (width @ height) - shape is placed as defined by user,
- (? @ ?) extent: (width @ height) - shape inherits offset as a top-left corner over all element's shapes. If there is no any shape with defined offset, 0 @ 0 is applied.
- (x @ y) extent: (? @ ?) - shape inherits extent as a bottom-right corner over all element's shapes. If there is no any shape with defined extent, extent which covers all offsets is applied.
- (? @ ?) extent: (? @ ?) - shape inherits offset as defined in rule 2 and extent as defined in rule 3.
- Minimum extent of ROElement is 5 @ 5. User can change it by calling ROElement>>size:
Package descriptions
Package Roassal
Commit Roassal-JurajKubelka.601 introduces ROShape>>offset:, #x:, #y:. It allows to construct elements of varios shapes. One element is able to, for example, contain a bar graph which every peace of it presents different statistic about element's model. See more information above.
Commits Roassal-JurajKubelka.535 and older introduces some improvements of Roassal. The useful ones are already part official Roassal repository. One of the examples is implementation of ROCellLayout and shape composition (ROBox + ROLabel). There are also the first implementations of RoassalComplexShape. It was later split and the new code is in package RoassalComplexShape.
Package RoassalComplexShape
It contains ideas of Mondrian's ComplexShape implementation in Roassal. This code is no more maintained.
Gofer new
smalltalkhubUser: 'JurajKubelka' project: 'RoassalProposals';
package: 'RoassalComplexShape';
load.
(Smalltalk globals at: #ROGridBuilderTest) browse.
Package RoassalGraphBuilders
It contains RODependencyMatrixBuilder. See more information above.
