-
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 #83 from hpi-swa-teaching/feature/ButtonDelete
Feature/button delete
- Loading branch information
Showing
92 changed files
with
350 additions
and
186 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]. |
24 changes: 24 additions & 0 deletions
24
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,24 @@ | ||
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]. | ||
Transcript show: 'process'; cr. | ||
Transcript show: aProcess isBlocked; cr. | ||
aProcess terminate. | ||
Transcript show: 'process2'; cr. | ||
" | ||
|
||
|
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
5 changes: 0 additions & 5 deletions
5
packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/class/on..st
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
as yet unclassified | ||
on: anAnimationsEditorTimeline withExtent: anotherPoint | ||
|
||
^ self basicNew timeline: anAnimationsEditorTimeline; | ||
initialize; | ||
extent: anotherPoint ; | ||
yourself. |
7 changes: 0 additions & 7 deletions
7
...Editor-Core.package/AnimationsEditorMovingLine.class/class/on.withPosition.withExtent..st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...ditor-Core.package/AnimationsEditorMovingLine.class/class/on.withPositionY.withExtent..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
3 changes: 0 additions & 3 deletions
3
...es/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/movingLine..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ges/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/movingLine.st
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...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 |
---|---|---|
@@ -0,0 +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]. |
3 changes: 0 additions & 3 deletions
3
...ges/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/positionY..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/positionY.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...package/AnimationsEditorMovingLine.class/instance/setMovingSpeedPerHundredMilliseconds.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/speed..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/speed.st
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/step.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/stepTime.st
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.