<commit_before>"
A ROEdgeDrivenLayout is xxxxxxxxx.

Instance Variables
	edges:		<Object>
	fromPositions:		<Object>
	toPositions:		<Object>
	userDefinedEdges:		<Object>

edges
	- xxxxx

fromPositions
	- xxxxx

toPositions
	- xxxxx

userDefinedEdges
	- xxxxx

"
Class {
	#name : #RTEdgeDrivenLayout,
	#superclass : #RTLayout,
	#instVars : [
		'edges',
		'userDefinedEdges',
		'fromPositions',
		'toPositions',
		'shouldSetDefaultAttachPoint'
	],
	#category : #'Roassal2-Layouts'
}

{ #category : #'as yet unclassified' }
RTEdgeDrivenLayout class >> isAbstract [
	^ self = RTEdgeDrivenLayout
]

{ #category : #public }
RTEdgeDrivenLayout class >> on: elements edges: edges [
	^ self new on: elements edges: edges
]

{ #category : #'instance creation' }
RTEdgeDrivenLayout class >> withEdges: aCollection [
	
	^self new initialize userDefinedEdges: aCollection
]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> addDefaultAttachPointToEdges [
	| a |
	a := self defaultAttachPoint.
	edges do: [ :e | e shape attachPoint: a ]
]

{ #category : #accessing }
RTEdgeDrivenLayout >> affectedNodes [
	
	^affectedNodes
]

{ #category : #accessing }
RTEdgeDrivenLayout >> affectedNodes: anObject [
	
	affectedNodes := anObject
]

{ #category : #accessing }
RTEdgeDrivenLayout >> affectedNodesOf:  aNode [ 
	^ affectedNodes ifNil: [ aNode nodes ]
]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> defaultAttachPoint [
	^ RTCenteredAttachPoint new
]

{ #category : #'default values' }
RTEdgeDrivenLayout >> defaultFromPositions [
	^ #()
	
]

{ #category : #'default values' }
RTEdgeDrivenLayout >> defaultToPositions [
	^ #()

]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> doAttachPoint [
	"Change the attach point of edges when added"
	shouldSetDefaultAttachPoint := true
]

{ #category : #hook }
RTEdgeDrivenLayout >> doExecute: elements [
	
	self subclassResponsibility
]

{ #category : #hook }
RTEdgeDrivenLayout >> doIncrementallyExecute: anElementNode [
	"called by refreshLayoutEvery: ms. It is used to convey a feeling of incremental execution."
	
	self doExecute: anElementNode
]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> doNotAttachPoint [
	"Do not add an attach point to edges"
	shouldSetDefaultAttachPoint := false
]

{ #category : #private }
RTEdgeDrivenLayout >> edges [
	
	^ edges
]

{ #category : #accessing }
RTEdgeDrivenLayout >> edges: aCollection [
	"Set the list of edges that should be considered for the layout.
	If none is specified (i.e., if this method is not called), then the 
	edges are infered."<commit_msg>Minor: improved a comment Former-commit-id: 5798cab35376b48719fd20379099d40166df76d8<commit_after>"
A ROEdgeDrivenLayout is xxxxxxxxx.

Instance Variables
	edges:		<Object>
	fromPositions:		<Object>
	toPositions:		<Object>
	userDefinedEdges:		<Object>

edges
	- xxxxx

fromPositions
	- xxxxx

toPositions
	- xxxxx

userDefinedEdges
	- xxxxx

"
Class {
	#name : #RTEdgeDrivenLayout,
	#superclass : #RTLayout,
	#instVars : [
		'edges',
		'userDefinedEdges',
		'fromPositions',
		'toPositions',
		'shouldSetDefaultAttachPoint'
	],
	#category : #'Roassal2-Layouts'
}

{ #category : #'as yet unclassified' }
RTEdgeDrivenLayout class >> isAbstract [
	^ self = RTEdgeDrivenLayout
]

{ #category : #public }
RTEdgeDrivenLayout class >> on: elements edges: edges [
	^ self new on: elements edges: edges
]

{ #category : #'instance creation' }
RTEdgeDrivenLayout class >> withEdges: aCollection [
	
	^self new initialize userDefinedEdges: aCollection
]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> addDefaultAttachPointToEdges [
	| a |
	a := self defaultAttachPoint.
	edges do: [ :e | e shape attachPoint: a ]
]

{ #category : #accessing }
RTEdgeDrivenLayout >> affectedNodes [
	
	^affectedNodes
]

{ #category : #accessing }
RTEdgeDrivenLayout >> affectedNodes: anObject [
	
	affectedNodes := anObject
]

{ #category : #accessing }
RTEdgeDrivenLayout >> affectedNodesOf:  aNode [ 
	^ affectedNodes ifNil: [ aNode nodes ]
]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> defaultAttachPoint [
	^ RTCenteredAttachPoint new
]

{ #category : #'default values' }
RTEdgeDrivenLayout >> defaultFromPositions [
	^ #()
	
]

{ #category : #'default values' }
RTEdgeDrivenLayout >> defaultToPositions [
	^ #()

]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> doAttachPoint [
	"Change the attach point of edges when added"
	shouldSetDefaultAttachPoint := true
]

{ #category : #hook }
RTEdgeDrivenLayout >> doExecute: elements [
	
	self subclassResponsibility
]

{ #category : #hook }
RTEdgeDrivenLayout >> doIncrementallyExecute: anElementNode [
	"called by refreshLayoutEvery: ms. It is used to convey a feeling of incremental execution."
	
	self doExecute: anElementNode
]

{ #category : #'default attach points' }
RTEdgeDrivenLayout >> doNotAttachPoint [
	"Do not add an attach point to edges when doing the layout"
	shouldSetDefaultAttachPoint := false
]

{ #category : #private }
RTEdgeDrivenLayout >> edges [
	
	^ edges
]

{ #category : #accessing }
RTEdgeDrivenLayout >> edges: aCollection [
	"Set the list of edges that should be considered for the layout.
	If none is specified (i.e., if this method is not called), then the 
	edges are infered."
{'fraction_non_alphanumeric': 0.10789324247586599, 'fraction_numerical': 0.006057164489873178, 'mean_word_length': 4.706263498920086, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3299915', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1788, 'n_words': 460}