<commit_before>Class {
	#name : #RTElement,
	#superclass : #RTShapedObject,
	#instVars : [
		'connectedEdges'
	],
	#category : #'Roassal2-Core'
}

{ #category : #public }
RTElement class >> forCollection: aCollection [ 
	^ (aCollection collect: [ :v | self on: v ]) asArray
]

{ #category : #public }
RTElement class >> on: anObject [

	^ self new model: anObject; yourself
]

{ #category : #visitor }
RTElement >> accept: aVisitor [
	aVisitor visitElement: self
]

{ #category : #initialization }
RTElement >> addConnectedEdge: anEdge [
	[  anEdge class == RTEdge ] assert.
	self connectedEdges add: anEdge
]

{ #category : #adding }
RTElement >> addedIn: aView [
	view := aView.
	view addElement: self
]

{ #category : #accessing }
RTElement >> center [
	^ self position
]

{ #category : #initialization }
RTElement >> connectedEdges [
	connectedEdges ifNil: [ connectedEdges := OrderedCollection new ].
	^ connectedEdges
]

{ #category : #accessing }
RTElement >> encompassingRectangle [
	"Return the encompassing rectangle of the element"
	^ trachelShape encompassingRectangle

]

{ #category : #accessing }
RTElement >> extent [
	"Returns a point, describing the extent of the encompassing rectangle of myself"
	^ self encompassingRectangle extent
]

{ #category : #accessing }
RTElement >> extent: aPoint [
	trachelShape extent: aPoint.
	self updateConnectedEdges
]

{ #category : #accessing }
RTElement >> height [<commit_msg>0.384 : Cleaning in Roassal2<commit_after>Class {
	#name : #RTElement,
	#superclass : #RTShapedObject,
	#instVars : [
		'connectedEdges'
	],
	#category : #'Roassal2-Core'
}

{ #category : #public }
RTElement class >> forCollection: aCollection [ 
	^ (aCollection collect: [ :v | self on: v ]) asArray
]

{ #category : #public }
RTElement class >> on: anObject [

	^ self new model: anObject; yourself
]

{ #category : #visitor }
RTElement >> accept: aVisitor [
	aVisitor visitElement: self
]

{ #category : #initialization }
RTElement >> addConnectedEdge: anEdge [
	[  anEdge class == RTEdge ] assert.
	self connectedEdges add: anEdge
]

{ #category : #adding }
RTElement >> addedIn: aView [
	view := aView.
	view addElement: self
]

{ #category : #accessing }
RTElement >> center [
	^ self position
]

{ #category : #accessing }
RTElement >> connectedEdges [
	"Return the list of connected egdes (i.e., incoming and outgoing edges)"
	connectedEdges ifNil: [ connectedEdges := OrderedCollection new ].
	^ connectedEdges
]

{ #category : #accessing }
RTElement >> encompassingRectangle [
	"Return the encompassing rectangle of the element"
	^ trachelShape encompassingRectangle

]

{ #category : #accessing }
RTElement >> extent [
	"Returns a point, describing the extent of the encompassing rectangle of myself"
	^ self encompassingRectangle extent
]

{ #category : #accessing }
RTElement >> extent: aPoint [
	trachelShape extent: aPoint.
	self updateConnectedEdges
]

{ #category : #accessing }
RTElement >> height [
{'fraction_non_alphanumeric': 0.1183050847457627, 'fraction_numerical': 0.0023728813559322033, 'mean_word_length': 4.52621722846442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '340379', 'n_tokens_mistral': 976, 'n_tokens_neox': 943, 'n_words': 266}