From 2ffc402946c1e4e6174bd864f6c367a11db3bd39 Mon Sep 17 00:00:00 2001 From: Dennis Sima Date: Sun, 30 Jun 2024 18:54:20 +0200 Subject: [PATCH] refactoring --- .../instance/addYAxisValues..st | 20 +++--- .../buildChangeYAxisSelectionWith..st | 33 ++++----- .../instance/buildColumnsLabel.st | 8 +-- .../instance/buildTextWith.withAxis..st | 39 ++++++----- .../instance/buildThemeLabel.st | 8 +-- .../instance/buildXAxisLabel.st | 2 +- .../instance/buildYAxisLabel.st | 8 +-- .../instance/checkYValidity.st | 1 + .../instance/cornerStyle.st | 2 +- .../instance/createDiagramFor..st | 2 +- .../instance/defaultWindowExtent.st | 2 +- .../instance/defaultYValue.st | 2 +- .../instance/editYAxisValues.st | 32 +++++---- .../instance/exportIMG..st | 1 + .../instance/initialize.st | 1 - .../instance/isDarkSelected.st | 2 +- .../instance/isHPISelected.st | 2 +- .../instance/isLightSelected.st | 2 +- .../instance/isYAxisSelected..st | 4 +- .../instance/openFileChooser.st | 1 + .../instance/parseYData.st | 1 + .../instance/removeYAxisValues.st | 24 +++---- .../instance/setYAxis..st | 4 +- .../instance/showYAxisPopup.st | 7 +- .../splitStringAndConvertToNumbers..st | 2 +- .../splitStringAndConvertToStrings..st | 2 +- .../instance/visualizeCharts.st | 1 - .../instance/yAxis.setSelected..st | 6 +- .../methodProperties.json | 68 +++++++++---------- 29 files changed, 146 insertions(+), 141 deletions(-) diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/addYAxisValues..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/addYAxisValues..st index 3638dcd7..cacb1fa4 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/addYAxisValues..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/addYAxisValues..st @@ -1,10 +1,12 @@ yAxis-selection -addYAxisValues: t1 - | t2 | - t2 := self getYAxis asOrderedCollection. - t2 add: t1. - self setYAxis: t2. - self yAxisSelection: self defaultYAxisSelection. - self changed: #getYAxis. - self changed: #isYAxisSelected:. - self changed: #yAxis:setSelected: \ No newline at end of file +addYAxisValues: aString + + | yCollection | + + yCollection := self getYAxis asOrderedCollection. + yCollection add: aString. + self setYAxis: yCollection; + yAxisSelection: self defaultYAxisSelection; + changed: #getYAxis; + changed: #isYAxisSelected:; + changed: #yAxis:setSelected: \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildChangeYAxisSelectionWith..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildChangeYAxisSelectionWith..st index cf828f35..021d2b4d 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildChangeYAxisSelectionWith..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildChangeYAxisSelectionWith..st @@ -1,21 +1,22 @@ building -buildChangeYAxisSelectionWith: t1 - ^ t1 pluggablePanelSpec new children: {t1 pluggableButtonSpec new model: self; - label: 'Add'; - style: self cornerStyle; +buildChangeYAxisSelectionWith: aBuilder + + ^ aBuilder pluggablePanelSpec new children: {aBuilder pluggableButtonSpec new model: self; + label: 'Add'; + style: self cornerStyle; - frame: (0 @ 0 corner: 0.33 @ 1.0); - action: #showYAxisPopup. t1 pluggableButtonSpec new model: self; - label: 'Edit'; - style: self cornerStyle; + frame: (0 @ 0 corner: 0.33 @ 1.0); + action: #showYAxisPopup. aBuilder pluggableButtonSpec new model: self; + label: 'Edit'; + style: self cornerStyle; - frame: (0.33 @ 0 corner: 0.66 @ 1.0); - action: #editYAxisValues. t1 pluggableButtonSpec new model: self; - label: 'Remove'; - style: self cornerStyle; + frame: (0.33 @ 0 corner: 0.66 @ 1.0); + action: #editYAxisValues. aBuilder pluggableButtonSpec new model: self; + label: 'Remove'; + style: self cornerStyle; - frame: (0.66 @ 0 corner: 1.0 @ 1.0); - action: #removeYAxisValues}; + frame: (0.66 @ 0 corner: 1.0 @ 1.0); + action: #removeYAxisValues}; - frame: (0.7 @ 0.37 corner: 1 @ 0.45); - yourself \ No newline at end of file + frame: (0.7 @ 0.37 corner: 1 @ 0.45); + yourself \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildColumnsLabel.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildColumnsLabel.st index b3fe1ba6..70057e38 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildColumnsLabel.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildColumnsLabel.st @@ -2,8 +2,8 @@ building buildColumnsLabel ^ {TextMorph new - contents: (Text string: 'Enter your named columns' attribute: TextEmphasis bold); - beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); - color: Color black; - lock.} + contents: (Text string: 'Enter your named columns' attribute: TextEmphasis bold); + beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); + color: Color black; + lock.} \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildTextWith.withAxis..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildTextWith.withAxis..st index b5fb96cf..49c9c981 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildTextWith.withAxis..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildTextWith.withAxis..st @@ -1,25 +1,24 @@ building buildTextWith: aBuilder withAxis: aNumber - | windowContent layoutPosition | - windowContent := layoutPosition := nil. + | windowContent layoutPosition | - aNumber caseOf: { - [1] -> [windowContent := #buildXAxisLabel. - layoutPosition := 0.3 @ 0.17 corner: 1 @ 0.25]. - [2] -> [windowContent := #buildYAxisLabel. - layoutPosition := 0.3 @ 0.37 corner: 0.75 @ 0.25]. - [3] -> [windowContent := #buildColumnsLabel. - layoutPosition := 0.3 @ 0.68 corner: 1 @ 0.25]. - [4] -> [windowContent := #buildThemeLabel. + windowContent := layoutPosition := nil. + aNumber caseOf: { + [1] -> [windowContent := #buildXAxisLabel. + layoutPosition := 0.3 @ 0.17 corner: 1 @ 0.25]. + [2] -> [windowContent := #buildYAxisLabel. + layoutPosition := 0.3 @ 0.37 corner: 0.75 @ 0.25]. + [3] -> [windowContent := #buildColumnsLabel. + layoutPosition := 0.3 @ 0.68 corner: 1 @ 0.25]. + [4] -> [windowContent := #buildThemeLabel. layoutPosition := 0 @ 0.82 corner: 1 @ 0.9]. - } otherwise: [ - windowContent := #buildXAxisLabel. - layoutPosition := 0.3 @ 0.53 corner: 1 @ 0.15 - ]. - - ^ aBuilder pluggablePanelSpec new - model: self; - children: windowContent; - frame: layoutPosition; - yourself + } otherwise: [ + windowContent := #buildXAxisLabel. + layoutPosition := 0.3 @ 0.53 corner: 1 @ 0.15 + ]. + ^ aBuilder pluggablePanelSpec new + model: self; + children: windowContent; + frame: layoutPosition; + yourself diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildThemeLabel.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildThemeLabel.st index 065b1d64..0a20df0b 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildThemeLabel.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildThemeLabel.st @@ -2,8 +2,8 @@ building buildThemeLabel ^ {TextMorph new - contents: (Text string: 'Select your Theme' attribute: TextEmphasis bold); - beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); - color: Color black; - lock.} + contents: (Text string: 'Select your Theme' attribute: TextEmphasis bold); + beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); + color: Color black; + lock.} \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildXAxisLabel.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildXAxisLabel.st index 8ea6a2d8..74e7e024 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildXAxisLabel.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildXAxisLabel.st @@ -2,7 +2,7 @@ building buildXAxisLabel ^ {TextMorph new - contents: (Text string: 'Enter your x axis values' attribute: TextEmphasis bold); + contents: (Text string: 'Enter your x axis values' attribute: TextEmphasis bold); beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); color: Color black; lock.} diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildYAxisLabel.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildYAxisLabel.st index 188fdc5d..c9511e10 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildYAxisLabel.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/buildYAxisLabel.st @@ -2,9 +2,9 @@ building buildYAxisLabel ^ {TextMorph new - contents: (Text string: 'Enter your y axis values' attribute: TextEmphasis bold); - beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); - color: Color black; - lock.} + contents: (Text string: 'Enter your y axis values' attribute: TextEmphasis bold); + beAllFont: (StrikeFont familyName: #BitstreamVeraSans pointSize: 11); + color: Color black; + lock.} \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/checkYValidity.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/checkYValidity.st index f7e9a400..8e2de962 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/checkYValidity.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/checkYValidity.st @@ -2,6 +2,7 @@ event-handling checkYValidity | sizes firstSize | + sizes := self parsedYData collect: [:each | each size]. firstSize := sizes first. ^ sizes allSatisfy: [:size | size = firstSize] \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/cornerStyle.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/cornerStyle.st index 3fdb57de..29ff4c91 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/cornerStyle.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/cornerStyle.st @@ -1,6 +1,6 @@ building cornerStyle - (MenuMorph roundedMenuCorners = false) + MenuMorph roundedMenuCorners = false ifTrue: [^ #menuButton] ifFalse: [^ #nil] \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/createDiagramFor..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/createDiagramFor..st index 84c37ca5..2abca78e 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/createDiagramFor..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/createDiagramFor..st @@ -2,6 +2,7 @@ event-handling createDiagramFor: aChartString | diagram | + diagram := SWDiagram new. aChartString caseOf: { ['BarChart'] -> [diagram stacked: true]. @@ -9,7 +10,6 @@ createDiagramFor: aChartString ['Normalized BarChart'] -> [diagram stacked: true; normalized: true]. ['Normalized AreaChart'] -> [diagram stacked: true; normalized: true]. } otherwise: []. - ^ diagram diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultWindowExtent.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultWindowExtent.st index 91b96894..f2743979 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultWindowExtent.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultWindowExtent.st @@ -1,4 +1,4 @@ default-values defaultWindowExtent - ^ 510 @ 330 \ No newline at end of file + ^ 510@330 \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultYValue.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultYValue.st index 4afe809b..d48db431 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultYValue.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/defaultYValue.st @@ -1,4 +1,4 @@ default-values defaultYValue - ^ '22, 110, 64, 211, 35' \ No newline at end of file + ^ {'11, 12, 13, 14, 15'. '21, 22, 23, 24, 25'. '31, 32, 33, 34, 35'} \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/editYAxisValues.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/editYAxisValues.st index 5022cd60..9717ae76 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/editYAxisValues.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/editYAxisValues.st @@ -1,22 +1,24 @@ yAxis-selection editYAxisValues - | t1 t3 | - t3 := self yAxisSelection - indexOf: true - ifAbsent: [0]. - t3 = 0 + + | value index | + + index := self yAxisSelection indexOf: true ifAbsent: [0]. + index = 0 ifTrue: [self inform: 'Error: Please select one yAxis before!'] - ifFalse: [t3 := 1. + ifFalse: [ + value := 1. yAxisSelection do: [:t4 | t4 - ifTrue: [t1 := UIManager default + ifTrue: [value := UIManager default request: 'Enter your y-Axis values (separated by ",")' - initialAnswer: (self yAxis at: t3). - t1 isEmpty - ifFalse: [self yAxis at: t3 put: t1]]. - t3 := t3 + 1]. - self yAxisSelection: self defaultYAxisSelection. - self changed: #getYAxis. - self changed: #isYAxisSelected:. - self changed: #yAxis:setSelected:] \ No newline at end of file + initialAnswer: (self yAxis at: index). + value isEmpty + ifFalse: [self yAxis at: index put: value]]. + index := index + 1]. + + self yAxisSelection: self defaultYAxisSelection; + changed: #getYAxis; + changed: #isYAxisSelected:; + changed: #yAxis:setSelected:] \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/exportIMG..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/exportIMG..st index 83baf1d6..20420abb 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/exportIMG..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/exportIMG..st @@ -2,6 +2,7 @@ event-handling exportIMG: aDiagram | folderPath fileName filePath | + folderPath := (FileList2 modalFolderSelector). folderPath ifNotNil: [ fileName := UIManager default request: 'Enter file name' initialAnswer: 'diagram'. diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/initialize.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/initialize.st index 5296ab39..37561ec2 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/initialize.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/initialize.st @@ -5,7 +5,6 @@ initialize self xAxis: self defaultXValue; yAxis: self defaultYValue; namedColumns: self defaultColumns; - setYAxis: {'11, 12, 13, 14, 15'. '21, 22, 23, 24, 25'. '31, 32, 33, 34, 35'}; chartSelection: self defaultDiagramsSelection; yAxisSelection: self defaultYAxisSelection; selectedTheme: self defaultTheme diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isDarkSelected.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isDarkSelected.st index 29eb7624..24d0d810 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isDarkSelected.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isDarkSelected.st @@ -1,4 +1,4 @@ theme-selection isDarkSelected - ^ selectedTheme = SWDarkTheme \ No newline at end of file + ^ selectedTheme = SWDarkTheme \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isHPISelected.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isHPISelected.st index 2e23f9d4..aa0d3ef7 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isHPISelected.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isHPISelected.st @@ -1,4 +1,4 @@ theme-selection isHPISelected - ^ selectedTheme = SWHPITheme \ No newline at end of file + ^ selectedTheme = SWHPITheme \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isLightSelected.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isLightSelected.st index d204bab4..511aa6c0 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isLightSelected.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isLightSelected.st @@ -1,4 +1,4 @@ theme-selection isLightSelected - ^ selectedTheme = SWDefaultTheme \ No newline at end of file + ^ selectedTheme = SWDefaultTheme \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isYAxisSelected..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isYAxisSelected..st index 580fca1b..3f75cad9 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isYAxisSelected..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/isYAxisSelected..st @@ -1,4 +1,4 @@ yAxis-selection -isYAxisSelected: t1 +isYAxisSelected: anIndex - ^ self yAxisSelection at: t1 \ No newline at end of file + ^ self yAxisSelection at: anIndex \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/openFileChooser.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/openFileChooser.st index ba79e572..5eee28d9 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/openFileChooser.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/openFileChooser.st @@ -2,6 +2,7 @@ csv-file openFileChooser | fc fileStream | + fc := FileChooser new. fc initializeAsDialogBox. fileStream := fc open. diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/parseYData.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/parseYData.st index 2129c983..f567a3cd 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/parseYData.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/parseYData.st @@ -2,6 +2,7 @@ event-handling parseYData | yDataCollection | + yDataCollection := OrderedCollection new. self yAxis do: [:each | yDataCollection add: (self splitStringAndConvertToNumbers: each)]. self parsedYData: yDataCollection. diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/removeYAxisValues.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/removeYAxisValues.st index 24fd52e2..fe51243d 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/removeYAxisValues.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/removeYAxisValues.st @@ -1,20 +1,18 @@ yAxis-selection removeYAxisValues - | temp index | + | tempCollection index | + yAxisSelection isEmpty ifTrue: [self inform: 'Error: Please add some yAxis values before!']; ifFalse: [ - index := 1. - temp := OrderedCollection new. - yAxisSelection do: [ :element | - element - ifFalse: [temp add: (self yAxis at: index)]. - index := index +1. + index := 1. + tempCollection := OrderedCollection new. + yAxisSelection do: [ :element | element ifFalse: [tempCollection add: (self yAxis at: index)]. + index := index +1]. -]. - self setYAxis: temp. - self yAxisSelection: self defaultYAxisSelection. - self changed: #getYAxis. - self changed: #isYAxisSelected:. - self changed: #yAxis:setSelected:] \ No newline at end of file + self setYAxis: tempCollection; + yAxisSelection: self defaultYAxisSelection; + changed: #getYAxis; + changed: #isYAxisSelected:; + changed: #yAxis:setSelected:] \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/setYAxis..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/setYAxis..st index d5be78f5..3557ec51 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/setYAxis..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/setYAxis..st @@ -1,4 +1,4 @@ yAxis-selection -setYAxis: t1 +setYAxis: aCollection - yAxis := t1 \ No newline at end of file + yAxis := aCollection \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/showYAxisPopup.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/showYAxisPopup.st index 9bab2680..8c30d47e 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/showYAxisPopup.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/showYAxisPopup.st @@ -1,6 +1,7 @@ event-handling showYAxisPopup - | t1 | - t1 := UIManager default request: 'Enter your y-Axis values (separated by ",")' initialAnswer: '32, 44, 65, 45, 3'. - self addYAxisValues: t1 \ No newline at end of file + | yValues | + + yValues := UIManager default request: 'Enter your y-Axis values (separated by ",")' initialAnswer: '32, 44, 65, 45, 3'. + self addYAxisValues: yValues \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToNumbers..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToNumbers..st index 1bf595fc..97062b4e 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToNumbers..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToNumbers..st @@ -2,7 +2,7 @@ event-handling splitStringAndConvertToNumbers: aString | numberStrings numbers | + numberStrings := aString findTokens: ','. numbers := numberStrings collect: [ :each | each withBlanksTrimmed asNumber ]. - ^ numbers diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToStrings..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToStrings..st index 6fb3dbbf..a1d72bfd 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToStrings..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/splitStringAndConvertToStrings..st @@ -2,7 +2,7 @@ event-handling splitStringAndConvertToStrings: aString | stringCollection | + stringCollection := aString findTokens: ','. stringCollection := stringCollection collect: [ :each | each withBlanksTrimmed ]. - ^ stringCollection diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/visualizeCharts.st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/visualizeCharts.st index d9c8ee5d..0094d1af 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/visualizeCharts.st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/visualizeCharts.st @@ -12,5 +12,4 @@ visualizeCharts visualizeAll: (self processInputDataFor: chartType) with: chartType; applyColorTheme: (self selectedTheme) new. diagramCollection add: diagram]. - ^ diagramCollection \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/yAxis.setSelected..st b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/yAxis.setSelected..st index 0cf7759b..541de0e1 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/yAxis.setSelected..st +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/instance/yAxis.setSelected..st @@ -1,5 +1,5 @@ yAxis-selection -yAxis: t1 setSelected: t2 +yAxis: anIndex setSelected: aValue - self yAxisSelection at: t1 put: t2. - self changed: #yAxisSelection \ No newline at end of file + self yAxisSelection at: anIndex put: aValue; + changed: #yAxisSelection \ No newline at end of file diff --git a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/methodProperties.json b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/methodProperties.json index 5c566bae..ed3db4b9 100644 --- a/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/methodProperties.json +++ b/packages/StatisticsWorkbench-UI.package/SWMainformModel.class/methodProperties.json @@ -2,75 +2,75 @@ "class" : { "open" : "s 6/18/2024 20:05" }, "instance" : { - "addYAxisValues:" : "s 6/14/2024 22:11", - "buildChangeYAxisSelectionWith:" : "s 6/14/2024 22:12", + "addYAxisValues:" : "s 6/30/2024 18:21", + "buildChangeYAxisSelectionWith:" : "s 6/30/2024 18:36", "buildChartSelectionWith:" : "JB 6/12/2024 16:43", "buildColumnsInputFieldWith:" : "JB 6/12/2024 16:43", - "buildColumnsLabel" : "s 6/6/2024 19:32", + "buildColumnsLabel" : "s 6/30/2024 18:33", "buildCsvFileSelectionWith:" : "JB 6/12/2024 16:44", "buildExportPNGButtonWith:" : "JB 6/12/2024 16:44", - "buildTextWith:withAxis:" : "JB 6/12/2024 16:45", - "buildThemeLabel" : "s 6/6/2024 19:32", + "buildTextWith:withAxis:" : "s 6/30/2024 18:33", + "buildThemeLabel" : "s 6/30/2024 18:32", "buildThemeSelectionWith:" : "JB 6/12/2024 16:45", "buildVisualizeButtonWith:" : "JB 6/12/2024 16:45", - "buildWith:" : "s 6/11/2024 10:21", + "buildWith:" : "s 6/30/2024 18:31", "buildXAxisInputFieldWith:" : "JB 6/12/2024 16:45", - "buildXAxisLabel" : "s 6/6/2024 19:23", - "buildYAxisLabel" : "s 6/6/2024 19:24", + "buildXAxisLabel" : "s 6/30/2024 18:31", + "buildYAxisLabel" : "s 6/30/2024 18:32", "buildYAxisSelectionWith:" : "JB 6/12/2024 16:46", - "chart:setSelected:" : "PAR 5/13/2021 08:54", - "chartSelection" : "PAR 8/5/2021 14:37", + "chart:setSelected:" : "s 6/30/2024 18:47", + "chartSelection" : "s 6/30/2024 18:10", "chartSelection:" : "PAR 8/5/2021 14:37", "chartsToVisualize" : "s 6/11/2024 18:21", - "checkYValidity" : "JB 6/12/2024 16:39", - "cornerStyle" : "JB 6/12/2024 14:51", - "createDiagramFor:" : "JB 6/12/2024 17:49", + "checkYValidity" : "s 6/30/2024 18:25", + "cornerStyle" : "s 6/30/2024 18:29", + "createDiagramFor:" : "s 6/30/2024 18:25", "defaultColumns" : "JB 6/9/2024 20:31", "defaultDiagramsSelection" : "s 6/11/2024 18:21", "defaultTheme" : "JB 6/9/2024 19:43", - "defaultWindowExtent" : "JB 6/12/2024 16:47", + "defaultWindowExtent" : "s 6/30/2024 18:26", "defaultXValue" : "JB 6/9/2024 20:32", "defaultYAxisSelection" : "s 6/11/2024 17:36", - "defaultYValue" : "JB 6/9/2024 20:30", - "editYAxisValues" : "s 6/14/2024 22:11", - "exportIMG:" : "JB 6/12/2024 15:15", + "defaultYValue" : "s 6/30/2024 18:24", + "editYAxisValues" : "s 6/30/2024 18:20", + "exportIMG:" : "s 6/30/2024 18:25", "getAllCharts" : "JB 6/12/2024 15:02", "getClassForChart:" : "JB 6/12/2024 17:24", "getYAxis" : "JB 6/12/2024 15:08", - "initialize" : "JB 6/21/2024 15:06", - "isDarkSelected" : "JB 6/8/2024 21:57", - "isHPISelected" : "JB 6/8/2024 21:57", - "isLightSelected" : "JB 6/8/2024 21:57", + "initialize" : "s 6/30/2024 18:23", + "isDarkSelected" : "s 6/30/2024 18:21", + "isHPISelected" : "s 6/30/2024 18:21", + "isLightSelected" : "s 6/30/2024 18:21", "isSelected:" : "PAR 8/5/2021 18:19", - "isYAxisSelected:" : "JB 6/12/2024 15:08", - "namedColumns" : "PAR 8/5/2021 18:23", + "isYAxisSelected:" : "s 6/30/2024 18:14", + "namedColumns" : "s 6/30/2024 18:10", "namedColumns:" : "PAR 8/5/2021 18:23", "onExportImageButtonClicked" : "JB 6/13/2024 00:44", "onVisualizeButtonClicked" : "JB 6/13/2024 00:42", - "openFileChooser" : "JB 6/20/2024 14:32", + "openFileChooser" : "s 6/30/2024 18:27", "parseCSVData" : "JB 6/21/2024 15:06", - "parseYData" : "JB 6/12/2024 16:31", - "parsedYData" : "JB 6/12/2024 16:23", + "parseYData" : "s 6/30/2024 18:46", + "parsedYData" : "s 6/30/2024 18:49", "parsedYData:" : "JB 6/12/2024 16:23", "processInputDataFor:" : "JB 6/12/2024 20:06", - "removeYAxisValues" : "JB 6/12/2024 15:08", + "removeYAxisValues" : "s 6/30/2024 18:17", "selectedTheme" : "JB 6/8/2024 22:28", "selectedTheme:" : "s 6/6/2024 17:04", "setNamedColumns:" : "s 5/27/2024 22:01", "setXAxisValues:" : "s 5/27/2024 22:01", - "setYAxis:" : "JB 6/12/2024 15:08", + "setYAxis:" : "s 6/30/2024 18:14", "setYAxisValues:" : "s 5/27/2024 22:01", - "showYAxisPopup" : "JB 6/21/2024 15:06", - "splitStringAndConvertToNumbers:" : "JB 6/12/2024 16:07", - "splitStringAndConvertToStrings:" : "JB 6/12/2024 16:41", + "showYAxisPopup" : "s 6/30/2024 18:26", + "splitStringAndConvertToNumbers:" : "s 6/30/2024 18:26", + "splitStringAndConvertToStrings:" : "s 6/30/2024 18:26", "stream" : "PAR 8/5/2021 14:36", "stream:" : "PAR 8/5/2021 14:36", - "updateTheme:" : "s 6/6/2024 22:00", - "visualizeCharts" : "JB 6/12/2024 20:24", + "updateTheme:" : "s 6/30/2024 18:22", + "visualizeCharts" : "s 6/30/2024 18:26", "xAxis" : "PAR 8/5/2021 14:36", "xAxis:" : "PAR 8/5/2021 14:36", "yAxis" : "s 5/29/2024 16:47", "yAxis:" : "s 5/29/2024 16:47", - "yAxis:setSelected:" : "JB 6/12/2024 15:08", + "yAxis:setSelected:" : "s 6/30/2024 18:17", "yAxisSelection" : "JB 6/12/2024 20:30", "yAxisSelection:" : "JB 6/12/2024 20:30" } }