Skip to content

Commit

Permalink
Merge origin/dev into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nu444 committed Jul 8, 2024
2 parents 7349459 + 2ffc402 commit 80c7814
Show file tree
Hide file tree
Showing 29 changed files with 148 additions and 142 deletions.
Original file line number Diff line number Diff line change
@@ -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:
addYAxisValues: aString

| yCollection |

yCollection := self getYAxis asOrderedCollection.
yCollection add: aString.
self setYAxis: yCollection;
yAxisSelection: self defaultYAxisSelection;
changed: #getYAxis;
changed: #isYAxisSelected:;
changed: #yAxis:setSelected:
Original file line number Diff line number Diff line change
@@ -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
frame: (0.7 @ 0.37 corner: 1 @ 0.45);
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -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.}

Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.}

Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.}


Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ event-handling
checkYValidity

| sizes firstSize |

sizes := self parsedYData collect: [:each | each size].
firstSize := sizes first.
^ sizes allSatisfy: [:size | size = firstSize]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
building
cornerStyle

(MenuMorph roundedMenuCorners = false)
MenuMorph roundedMenuCorners = false
ifTrue: [^ #menuButton]
ifFalse: [^ #nil]
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ event-handling
createDiagramFor: aChartString

| diagram |

diagram := SWDiagram new.
aChartString caseOf: {
['BarChart'] -> [diagram stacked: true].
['AreaChart'] -> [diagram stacked: true].
['Normalized BarChart'] -> [diagram stacked: true; normalized: true].
['Normalized AreaChart'] -> [diagram stacked: true; normalized: true].
} otherwise: [].

^ diagram


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default-values
defaultWindowExtent

^ 510 @ 330
^ 510@330
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default-values
defaultYValue

^ '22, 110, 64, 211, 35'
^ {'11, 12, 13, 14, 15'. '21, 22, 23, 24, 25'. '31, 32, 33, 34, 35'}
Original file line number Diff line number Diff line change
@@ -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:]
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:]
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ 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;
parsedFile: ''
parsedFile: ''
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
theme-selection
isDarkSelected

^ selectedTheme = SWDarkTheme
^ selectedTheme = SWDarkTheme
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
theme-selection
isHPISelected

^ selectedTheme = SWHPITheme
^ selectedTheme = SWHPITheme
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
theme-selection
isLightSelected

^ selectedTheme = SWDefaultTheme
^ selectedTheme = SWDefaultTheme
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yAxis-selection
isYAxisSelected: t1
isYAxisSelected: anIndex

^ self yAxisSelection at: t1
^ self yAxisSelection at: anIndex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ csv-file
openFileChooser

| fc fileStream |

fc := FileChooser new.
fc initializeAsDialogBox.
fileStream := fc open.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ event-handling
parseYData

| yDataCollection |

yDataCollection := OrderedCollection new.
self yAxis do: [:each | yDataCollection add: (self splitStringAndConvertToNumbers: each)].
self parsedYData: yDataCollection.
Expand Down
Original file line number Diff line number Diff line change
@@ -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:]
self setYAxis: tempCollection;
yAxisSelection: self defaultYAxisSelection;
changed: #getYAxis;
changed: #isYAxisSelected:;
changed: #yAxis:setSelected:]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yAxis-selection
setYAxis: t1
setYAxis: aCollection

yAxis := t1
yAxis := aCollection
Original file line number Diff line number Diff line change
@@ -1,5 +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

| yValues |

yValues := UIManager default request: 'Enter your y-Axis values (separated by ",")' initialAnswer: '32, 44, 65, 45, 3'.
self addYAxisValues: yValues
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ event-handling
splitStringAndConvertToNumbers: aString

| numberStrings numbers |

numberStrings := aString findTokens: ','.
numbers := numberStrings collect: [ :each | each withBlanksTrimmed asNumber ].

^ numbers
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ event-handling
splitStringAndConvertToStrings: aString

| stringCollection |

stringCollection := aString findTokens: ','.
stringCollection := stringCollection collect: [ :each | each withBlanksTrimmed ].

^ stringCollection
Loading

0 comments on commit 80c7814

Please sign in to comment.