Skip to content

Commit 627d592

Browse files
multiple multi-diagram project fixes, shapes naming unification
1 parent 11be887 commit 627d592

9 files changed

Lines changed: 46 additions & 46 deletions

Pharo/OpenPonk-MarkovChains/OPMcAbstractStateFigure.class.st renamed to Pharo/OpenPonk-MarkovChains/OPMcAbstractStateShape.class.st

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
Class {
2-
#name : 'OPMcAbstractStateFigure',
2+
#name : 'OPMcAbstractStateShape',
33
#superclass : 'OPBoundNode',
44
#instVars : [
55
'adornmentCreationBlock'
66
],
7-
#category : 'OpenPonk-MarkovChains-Shapes',
7+
#category : 'OpenPonk-MarkovChains-DiagramElements',
88
#package : 'OpenPonk-MarkovChains',
9-
#tag : 'Shapes'
9+
#tag : 'DiagramElements'
1010
}
1111

1212
{ #category : 'accessing' }
13-
OPMcAbstractStateFigure >> adornmentCreationBlock: aBlock [
13+
OPMcAbstractStateShape >> adornmentCreationBlock: aBlock [
1414

1515
adornmentCreationBlock := aBlock
1616
]
1717

1818
{ #category : 'hooks' }
19-
OPMcAbstractStateFigure >> selectableInteraction [
19+
OPMcAbstractStateShape >> selectableInteraction [
2020

2121
^ OPRSSelectable highlightAdornments: [ :builder |
2222
builder horizontalLocation
@@ -30,7 +30,7 @@ OPMcAbstractStateFigure >> selectableInteraction [
3030
]
3131

3232
{ #category : 'rendering' }
33-
OPMcAbstractStateFigure >> shouldBePositionableByUser [
33+
OPMcAbstractStateShape >> shouldBePositionableByUser [
3434

3535
^ true
3636
]

Pharo/OpenPonk-MarkovChains/OPMcController.class.st

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Class {
99
{ #category : 'userinterface' }
1010
OPMcController >> applyLayout: anAlgorithm [
1111

12-
| figures edges |
13-
figures := self controllers
12+
| roassalShapes edges |
13+
roassalShapes := self controllers
1414
select: [ :each | each isKindOf: OPMcVertexController ]
15-
thenCollect: #figure.
16-
edges := (figures flatCollect: #connectedLines) reject: [ :each |
15+
thenCollect: [ :each | each roassalShape ].
16+
edges := (roassalShapes flatCollect: #connectedLines) reject: [ :each |
1717
each from = each to ].
18-
anAlgorithm on: figures asGroup edges: edges asGroup
18+
anAlgorithm on: roassalShapes asGroup edges: edges asGroup
1919
]
2020

2121
{ #category : 'connecting' }

Pharo/OpenPonk-MarkovChains/OPMcPredictedSimulation.class.st

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ OPMcPredictedSimulation >> stopAction [
269269
pauseButton disable.
270270
recognizer stopPredicted.
271271
diagramController model elements
272-
do: [ :each | OPMcFigureHighlighter unhighlight: (diagramController roassalShapeForModel: each) ]
272+
do: [ :each | OPMcShapeHighlighter unhighlight: (diagramController roassalShapeForModel: each) ]
273273
]
274274

275275
{ #category : 'actions' }
@@ -291,7 +291,7 @@ OPMcPredictedSimulation >> watchRecognizer: aRecognizer [
291291
aRecognizer
292292
when: OPMcRecognizerSuccess
293293
do: [ :ann |
294-
OPMcFigureHighlighter
294+
OPMcShapeHighlighter
295295
highlightNode: (diagramController roassalShapeForModel: ann place)
296296
with: Color green.
297297
nextButton disable.
@@ -303,7 +303,7 @@ OPMcPredictedSimulation >> watchRecognizer: aRecognizer [
303303
aRecognizer
304304
when: OPMcRecognizerFailure
305305
do: [ :ann |
306-
OPMcFigureHighlighter
306+
OPMcShapeHighlighter
307307
highlightNode: (diagramController roassalShapeForModel: ann place)
308308
with: Color red.
309309
nextButton disable.
@@ -318,13 +318,13 @@ OPMcPredictedSimulation >> watchRecognizer: aRecognizer [
318318
aRecognizer
319319
when: OPMcRecognizerLeave
320320
do: [ :ann |
321-
OPMcFigureHighlighter unhighlight:
321+
OPMcShapeHighlighter unhighlight:
322322
(diagramController roassalShapeForModel: ann place) ]
323323
for: self.
324324
aRecognizer
325325
when: OPMcRecognizerEnter
326326
do: [ :ann |
327-
OPMcFigureHighlighter
327+
OPMcShapeHighlighter
328328
highlight: (diagramController roassalShapeForModel: ann place)
329329
with: Color orange ]
330330
for: self

Pharo/OpenPonk-MarkovChains/OPMcFigureHighlighter.class.st renamed to Pharo/OpenPonk-MarkovChains/OPMcShapeHighlighter.class.st

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
Class {
2-
#name : 'OPMcFigureHighlighter',
2+
#name : 'OPMcShapeHighlighter',
33
#superclass : 'Object',
4-
#category : 'OpenPonk-MarkovChains-Shapes',
4+
#category : 'OpenPonk-MarkovChains-DiagramElements',
55
#package : 'OpenPonk-MarkovChains',
6-
#tag : 'Shapes'
6+
#tag : 'DiagramElements'
77
}
88

99
{ #category : 'api - highlight' }
10-
OPMcFigureHighlighter class >> highlight: aShapedObject with: aColor [
10+
OPMcShapeHighlighter class >> highlight: aShapedObject with: aColor [
1111
aShapedObject isNode
1212
ifTrue: [ self highlightNode: aShapedObject with: aColor ].
1313
aShapedObject isLine
1414
ifTrue: [ self highlightLine: aShapedObject with: aColor ]
1515
]
1616

1717
{ #category : 'api - highlight' }
18-
OPMcFigureHighlighter class >> highlightLine: aLine with: aColor [
18+
OPMcShapeHighlighter class >> highlightLine: aLine with: aColor [
1919

2020
self unhighlightNode: aLine.
2121
aLine propertyAt: self name put: aLine color.
@@ -24,7 +24,7 @@ OPMcFigureHighlighter class >> highlightLine: aLine with: aColor [
2424
]
2525

2626
{ #category : 'api - highlight' }
27-
OPMcFigureHighlighter class >> highlightNode: aNode with: aColor [
27+
OPMcShapeHighlighter class >> highlightNode: aNode with: aColor [
2828

2929
self unhighlightNode: aNode.
3030
aNode propertyAt: self name put: aNode borderColor.
@@ -33,23 +33,23 @@ OPMcFigureHighlighter class >> highlightNode: aNode with: aColor [
3333
]
3434

3535
{ #category : 'api - highlight' }
36-
OPMcFigureHighlighter class >> unhighlight: aShapedObject [
36+
OPMcShapeHighlighter class >> unhighlight: aShapedObject [
3737
aShapedObject isNode
3838
ifTrue: [ self unhighlightNode: aShapedObject ].
3939
aShapedObject isLine
4040
ifTrue: [ self unhighlightLine: aShapedObject ]
4141
]
4242

4343
{ #category : 'api - highlight' }
44-
OPMcFigureHighlighter class >> unhighlightLine: aLine [
44+
OPMcShapeHighlighter class >> unhighlightLine: aLine [
4545

4646
aLine shape color: (aLine propertyAt: self name ifAbsent: [ ^ self ]).
4747
aLine removePropertyAt: self name.
4848
aLine signalUpdate
4949
]
5050

5151
{ #category : 'api - highlight' }
52-
OPMcFigureHighlighter class >> unhighlightNode: aNode [
52+
OPMcShapeHighlighter class >> unhighlightNode: aNode [
5353

5454
aNode shape borderColor:
5555
(aNode propertyAt: self name ifAbsent: [ ^ self ]).

Pharo/OpenPonk-MarkovChains/OPMcSimulator.class.st

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ OPMcSimulator >> recognizer [
266266
{ #category : 'actions' }
267267
OPMcSimulator >> resetAction [
268268
diagramController model elements
269-
do: [ :each | OPMcFigureHighlighter unhighlight: (diagramController roassalShapeForModel: each) ].
269+
do: [ :each | OPMcShapeHighlighter unhighlight: (diagramController roassalShapeForModel: each) ].
270270
self resetStateEntries.
271271
stateTable
272272
items: #().
@@ -351,7 +351,7 @@ OPMcSimulator >> stopAction [
351351
pauseButton disable.
352352
recognizer stop.
353353
diagramController model elements
354-
do: [ :each | OPMcFigureHighlighter unhighlight: (diagramController roassalShapeForModel: each) ]
354+
do: [ :each | OPMcShapeHighlighter unhighlight: (diagramController roassalShapeForModel: each) ]
355355
]
356356

357357
{ #category : 'actions' }
@@ -365,7 +365,7 @@ OPMcSimulator >> watchRecognizer: aRecognizer [
365365
aRecognizer
366366
when: OPMcRecognizerSuccess
367367
do: [ :ann |
368-
OPMcFigureHighlighter
368+
OPMcShapeHighlighter
369369
highlightNode: (diagramController roassalShapeForModel: ann place)
370370
with: Color green.
371371
nextButton disable.
@@ -377,7 +377,7 @@ OPMcSimulator >> watchRecognizer: aRecognizer [
377377
aRecognizer
378378
when: OPMcRecognizerFailure
379379
do: [ :ann |
380-
OPMcFigureHighlighter
380+
OPMcShapeHighlighter
381381
highlightNode: (diagramController roassalShapeForModel: ann place)
382382
with: Color red.
383383
nextButton disable.
@@ -389,13 +389,13 @@ OPMcSimulator >> watchRecognizer: aRecognizer [
389389
aRecognizer
390390
when: OPMcRecognizerLeave
391391
do: [ :ann |
392-
OPMcFigureHighlighter unhighlight:
392+
OPMcShapeHighlighter unhighlight:
393393
(diagramController roassalShapeForModel: ann place) ]
394394
for: self.
395395
aRecognizer
396396
when: OPMcRecognizerEnter
397397
do: [ :ann |
398-
OPMcFigureHighlighter
398+
OPMcShapeHighlighter
399399
highlight: (diagramController roassalShapeForModel: ann place)
400400
with: Color orange ]
401401
for: self

Pharo/OpenPonk-MarkovChains/OPMcStateController.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ OPMcStateController >> buildEditorForm: aForm [
1414
{ #category : 'construction' }
1515
OPMcStateController >> diagramElementClass [
1616

17-
^ OPMcStateFigure
17+
^ OPMcStateShape
1818
]
1919

2020
{ #category : 'accessing' }

Pharo/OpenPonk-MarkovChains/OPMcStateFigure.class.st renamed to Pharo/OpenPonk-MarkovChains/OPMcStateShape.class.st

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
Class {
2-
#name : 'OPMcStateFigure',
3-
#superclass : 'OPMcAbstractStateFigure',
2+
#name : 'OPMcStateShape',
3+
#superclass : 'OPMcAbstractStateShape',
44
#instVars : [
55
'label'
66
],
7-
#category : 'OpenPonk-MarkovChains-Shapes',
7+
#category : 'OpenPonk-MarkovChains-DiagramElements',
88
#package : 'OpenPonk-MarkovChains',
9-
#tag : 'Shapes'
9+
#tag : 'DiagramElements'
1010
}
1111

1212
{ #category : 'removing' }
13-
OPMcStateFigure >> attachedShapes [
13+
OPMcStateShape >> attachedShapes [
1414

1515
^ super attachedShapes , { label }
1616
]
1717

1818
{ #category : 'removing' }
19-
OPMcStateFigure >> removeRender [
19+
OPMcStateShape >> removeRender [
2020

2121
super removeRender.
2222
label := nil
2323
]
2424

2525
{ #category : 'rendering' }
26-
OPMcStateFigure >> renderBasicShape [
26+
OPMcStateShape >> renderBasicShape [
2727

2828
^ RSCircle new
2929
size: 50;
@@ -36,7 +36,7 @@ OPMcStateFigure >> renderBasicShape [
3636
]
3737

3838
{ #category : 'rendering' }
39-
OPMcStateFigure >> renderShapeDetails [
39+
OPMcStateShape >> renderShapeDetails [
4040

4141
super renderShapeDetails.
4242

@@ -50,15 +50,15 @@ OPMcStateFigure >> renderShapeDetails [
5050
]
5151

5252
{ #category : 'rendering' }
53-
OPMcStateFigure >> selectableInteraction [
53+
OPMcStateShape >> selectableInteraction [
5454

5555
^ super selectableInteraction
5656
highlightBorderColor: Color blue;
5757
yourself
5858
]
5959

6060
{ #category : 'rendering' }
61-
OPMcStateFigure >> updateRenderFromModel [
61+
OPMcStateShape >> updateRenderFromModel [
6262

6363
label text: self modelElement name.
6464
super updateRenderFromModel.

Pharo/OpenPonk-MarkovChains/OPMcTransitionLabel.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Class {
22
#name : 'OPMcTransitionLabel',
33
#superclass : 'OPEdgeLabel',
4-
#category : 'OpenPonk-MarkovChains-Shapes',
4+
#category : 'OpenPonk-MarkovChains-DiagramElements',
55
#package : 'OpenPonk-MarkovChains',
6-
#tag : 'Shapes'
6+
#tag : 'DiagramElements'
77
}
88

99
{ #category : 'adding' }

Pharo/OpenPonk-MarkovChains/OPMcTransitionShape.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Class {
22
#name : 'OPMcTransitionShape',
33
#superclass : 'OPEdge',
4-
#category : 'OpenPonk-MarkovChains-Shapes',
4+
#category : 'OpenPonk-MarkovChains-DiagramElements',
55
#package : 'OpenPonk-MarkovChains',
6-
#tag : 'Shapes'
6+
#tag : 'DiagramElements'
77
}
88

99
{ #category : 'initialization' }

0 commit comments

Comments
 (0)