-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from hpi-swa-teaching/feature/ButtonDelete
Feature/button delete
- Loading branch information
Showing
78 changed files
with
336 additions
and
112 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
...ges/AnimationsEditor-Core.package/AnimationsEditor.class/instance/addSelectedMorphFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
buildComponents | ||
addSelectedMorphFor: anEvent | ||
self addTargetMorph: (self getDeepestMorph: self currentHand selectedObject at: anEvent position). | ||
self selectedTreeNode: (self addTargetMorph: (self getDeepestMorph: self currentHand selectedObject at: anEvent position)). | ||
self currentHand removeMouseListener: self. | ||
|
||
self updateInformationText: 'Added new Morph'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...mationsEditor-Core.package/AnimationsEditor.class/instance/buildDeleteMorphButtonWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
buildComponents | ||
buildDeleteMorphButtonWith: aBuilder | ||
| rightFraction leftFraction | | ||
|
||
rightFraction := 7 * (1 / self numberButtons). | ||
leftFraction := 6 * (1 / self numberButtons). | ||
^ aBuilder pluggableButtonSpec new model: self; | ||
label: 'Delete Morph'; | ||
action: #deleteMorph; | ||
frame: (LayoutFrame new topFraction: 0; | ||
bottomFraction: 1; | ||
rightFraction: rightFraction; | ||
leftFraction: leftFraction; | ||
yourself); | ||
yourself. |
4 changes: 4 additions & 0 deletions
4
...AnimationsEditor-Core.package/AnimationsEditor.class/instance/clearPropertyEditorPanel.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
clearComponents | ||
clearPropertyEditorPanel | ||
|
||
self propertyEditorPanel submorphs do: [:each| each abandon]. |
23 changes: 23 additions & 0 deletions
23
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
eventHandling | ||
deleteMorph: aProcess | ||
|
||
|
||
self selectedTreeNode ifNil: [^ 'break']. | ||
|
||
self propertyList copy do: [:each | | ||
Transcript show: self propertyList first ; cr. | ||
(self selectedTreeNode targetMorph = each targetMorph or: (self selectedTreeNode targetMorph hasSubmorphs ifTrue: [self selectedTreeNode targetMorph submorphs first = each targetMorph] ifFalse: [false])) | ||
|
||
ifTrue: [self selectedTreeNode targetMorph removeFlexShell. self propertyList remove: each. each targetMorph abandon. ].]. | ||
|
||
|
||
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector. | ||
|
||
self propertyEditorPanel submorphs do: [:each| each abandon]. | ||
self timeline submorphs do: [:each| each abandon]. | ||
|
||
aProcess terminate. | ||
|
||
|
||
|
||
|
21 changes: 21 additions & 0 deletions
21
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
eventHandling | ||
deleteMorph | ||
"NEEDS REFACTORING" | ||
"selected tree node needs to be set to some property when the morph is added" | ||
"not tested on other morphs apart from normal morph" | ||
self selectedTreeNode ifNil: [^ 'break']. | ||
self removeMorphProperties. | ||
|
||
"to do: delete the JSON! for that look in animations editor property animated >> deleteAllKeyframes" | ||
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector. | ||
|
||
"need to terminate process for each property" | ||
|
||
"self selectedTreeNode process terminate." "doesnot work" | ||
|
||
self clearPropertyEditorPanel. | ||
self timeline clearTimeline. | ||
|
||
|
||
|
||
|
9 changes: 9 additions & 0 deletions
9
...ages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/isPropertyToDelete..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
notclassified | ||
isPropertyToDelete: aProperty | ||
|
||
^ self selectedTreeNode targetMorph = aProperty targetMorph or: | ||
(self selectedTreeNode targetMorph hasSubmorphs | ||
ifTrue: | ||
[self selectedTreeNode targetMorph submorphs first = aProperty targetMorph] | ||
ifFalse: | ||
[false]). |
2 changes: 1 addition & 1 deletion
2
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/numberButtons.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
buildComponents | ||
numberButtons | ||
^ 6. | ||
^ 7. |
6 changes: 6 additions & 0 deletions
6
...es/AnimationsEditor-Core.package/AnimationsEditor.class/instance/removeMorphProperties.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
clearComponents | ||
removeMorphProperties | ||
|
||
self propertyList copy do: [:each | | ||
(self isPropertyToDelete: each) | ||
ifTrue: [self propertyList remove: each.].]. |
1 change: 1 addition & 0 deletions
1
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/selectedTreeNode..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
accessing | ||
selectedTreeNode: aNode | ||
selectedTreeNode := aNode. | ||
|
||
aNode canRenderUI | ||
ifTrue: [ | ||
(aNode isActivated) | ||
|
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/treeSpec..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/treeSpec.st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ges/AnimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/defaultColor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
defaultColor | ||
|
||
^ Color orange. |
4 changes: 4 additions & 0 deletions
4
...nimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/handleMouseEnter..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
events | ||
handleMouseEnter: anEvent | ||
|
||
self color: self mouseOverColor. |
4 changes: 4 additions & 0 deletions
4
...nimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/handleMouseLeave..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
events | ||
handleMouseLeave: anEvent | ||
|
||
self color: self defaultColor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...s/AnimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/mouseOverColor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
mouseOverColor | ||
|
||
^ Color red. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...es/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/class/on.withExtent..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
initialization | ||
as yet unclassified | ||
on: anAnimationsEditorTimeline withExtent: anotherPoint | ||
^ self basicNew timeline: anAnimationsEditorTimeline; | ||
initialize; | ||
extent: anotherPoint ; | ||
yourself. | ||
|
||
^ self basicNew timeline: anAnimationsEditorTimeline; | ||
initialize; | ||
extent: anotherPoint ; | ||
yourself. |
8 changes: 4 additions & 4 deletions
8
...ges/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
self | ||
color: Color black; | ||
position: self startMargin @ self trackHeight; | ||
playMovingAnimation. | ||
self | ||
color: Color black; | ||
position: self startMargin@self trackHeight; | ||
playMovingAnimation. |
3 changes: 3 additions & 0 deletions
3
...ages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/lineWidth.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
constants | ||
lineWidth | ||
^ 3. |
17 changes: 9 additions & 8 deletions
17
...tionsEditor-Core.package/AnimationsEditorMovingLine.class/instance/playMovingAnimation.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
accessing | ||
playMovingAnimation | ||
| animation | | ||
|
||
animation:= (AnimPropertyAnimation | ||
on: self | ||
property: #position | ||
start: self position | ||
end: self position + (self animationDuration@0) | ||
duration: self animationDuration) | ||
start; | ||
register; | ||
finishBlock: [self abandon]. | ||
on: self | ||
property: #position | ||
start: self position | ||
end: self position + (self animationDuration@0) | ||
duration: self animationDuration) | ||
start; | ||
register; | ||
finishBlock: [self abandon]. |
7 changes: 4 additions & 3 deletions
7
...ages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"class" : { | ||
"on:withExtent:" : "Noel Bastubbe 7/4/2022 15:27" }, | ||
"on:withExtent:" : "NR 7/18/2022 11:25" }, | ||
"instance" : { | ||
"animationDuration" : "ob 6/9/2022 21:31", | ||
"initialize" : "Noel Bastubbe 7/12/2022 11:42", | ||
"playMovingAnimation" : "Noel Bastubbe 7/12/2022 11:57" } } | ||
"initialize" : "NR 7/18/2022 11:26", | ||
"lineWidth" : "ob 6/9/2022 20:18", | ||
"playMovingAnimation" : "NR 7/18/2022 11:34" } } |
9 changes: 8 additions & 1 deletion
9
...imationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
initialization | ||
initialize | ||
|
||
|
||
super initialize. | ||
self isActivated: false. | ||
self addStartFrame. | ||
self addStartFrame. | ||
self process: [ | ||
[ 1 seconds asDelay wait. | ||
self targetMorph isInWorld ifFalse: [self animationsEditor deleteMorph: self process.]. | ||
] repeat. | ||
] fork. |
3 changes: 3 additions & 0 deletions
3
...AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
process: anObject | ||
process := anObject |
3 changes: 3 additions & 0 deletions
3
.../AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
process | ||
^ process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.