[squeak-dev] The Trunk: Morphic-kfr.1048.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Nov 19 20:00:52 UTC 2015


Karl Ramberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kfr.1048.mcz

==================== Summary ====================

Name: Morphic-kfr.1048
Author: kfr
Time: 19 November 2015, 9:00:00.723 pm
UUID: 63b86f93-377e-4fb1-a338-3968d13dce13
Ancestors: Morphic-mt.1047

ProgressMorph and ProgressBarMorph are not used as widgets. Moved to MorphicExtras-Obsolete

=============== Diff against Morphic-mt.1047 ===============

Item was removed:
- BorderedMorph subclass: #ProgressBarMorph
- 	instanceVariableNames: 'value progressColor lastValue'
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Morphic-Widgets'!

Item was removed:
- ----- Method: ProgressBarMorph>>addCustomMenuItems:hand: (in category 'menu') -----
- addCustomMenuItems: aCustomMenu hand: aHandMorph
- 	super addCustomMenuItems: aCustomMenu hand: aHandMorph.
- 	aCustomMenu addList: {
- 		{'progress color...' translated. #changeProgressColor:}.
- 		{'progress value...' translated. #changeProgressValue:}.
- 		}!

Item was removed:
- ----- Method: ProgressBarMorph>>changeProgressColor: (in category 'menu') -----
- changeProgressColor: evt
- 	| aHand |
- 	aHand := evt ifNotNil: [evt hand] ifNil: [self primaryHand].
- 	self changeColorTarget: self selector: #progressColor: originalColor: self progressColor hand: aHand.!

Item was removed:
- ----- Method: ProgressBarMorph>>changeProgressValue: (in category 'menu') -----
- changeProgressValue: evt
- 	| answer |
- 	answer := UIManager default
- 		request: 'Enter new value (0 - 1.0)'
- 		initialAnswer: self value contents asString.
- 	answer isEmptyOrNil ifTrue: [^ self].
- 	self value contents: answer asNumber!

Item was removed:
- ----- Method: ProgressBarMorph>>drawOn: (in category 'drawing') -----
- drawOn: aCanvas
- 	| width inner |
- 	super drawOn: aCanvas.
- 	inner := self innerBounds.
- 	width := (inner width * lastValue) truncated min: inner width.
- 	aCanvas fillRectangle: (inner origin extent: width @ inner height) color: progressColor.!

Item was removed:
- ----- Method: ProgressBarMorph>>initialize (in category 'initialization') -----
- initialize
- 	super initialize.
- 	progressColor := Color green.
- 	self value: (ValueHolder new contents: 0.0).
- 	lastValue := 0.0!

Item was removed:
- ----- Method: ProgressBarMorph>>progressColor (in category 'accessing') -----
- progressColor
- 	^progressColor!

Item was removed:
- ----- Method: ProgressBarMorph>>progressColor: (in category 'accessing') -----
- progressColor: aColor
- 	progressColor = aColor
- 		ifFalse:
- 			[progressColor := aColor.
- 			self changed]!

Item was removed:
- ----- Method: ProgressBarMorph>>update: (in category 'updating') -----
- update: aSymbol 
- 	aSymbol == #contents
- 		ifTrue: 
- 			[lastValue := value contents.
- 			self changed]!

Item was removed:
- ----- Method: ProgressBarMorph>>value (in category 'accessing') -----
- value
- 	^value!

Item was removed:
- ----- Method: ProgressBarMorph>>value: (in category 'accessing') -----
- value: aModel
- 	value ifNotNil: [value removeDependent: self].
- 	value := aModel.
- 	value ifNotNil: [value addDependent: self]!

Item was removed:
- RectangleMorph subclass: #ProgressMorph
- 	instanceVariableNames: 'labelMorph subLabelMorph progress'
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Morphic-Widgets'!

Item was removed:
- ----- Method: ProgressMorph class>>example (in category 'example') -----
- example
- 	"ProgressMorph example"
- 
- 	| progress |
- 	progress := ProgressMorph label: 'Test progress'.
- 	progress subLabel: 'this is the subheading'.
- 	progress openInWorld.
- 	[10 timesRepeat:
- 		[(Delay forMilliseconds: 200) wait.
- 		progress incrDone: 0.1].
- 	progress delete] fork!

Item was removed:
- ----- Method: ProgressMorph class>>label: (in category 'instance creation') -----
- label: aString
- 	^self new label: aString!

Item was removed:
- ----- Method: ProgressMorph>>done (in category 'accessing') -----
- done
- 	^self progress value contents!

Item was removed:
- ----- Method: ProgressMorph>>done: (in category 'accessing') -----
- done: amountDone
- 	self progress value contents: ((amountDone min: 1.0) max: 0.0).
- 	self currentWorld displayWorld!

Item was removed:
- ----- Method: ProgressMorph>>fontOfPointSize: (in category 'private') -----
- fontOfPointSize: size
- 	^ (TextConstants at: Preferences standardEToysFont familyName ifAbsent: [TextStyle default]) fontOfPointSize: size!

Item was removed:
- ----- Method: ProgressMorph>>incrDone: (in category 'accessing') -----
- incrDone: incrDone
- 	self done: self done + incrDone!

Item was removed:
- ----- Method: ProgressMorph>>initLabelMorph (in category 'initialization') -----
- initLabelMorph
- 	^ labelMorph := StringMorph contents: '' font: (self fontOfPointSize: 14)!

Item was removed:
- ----- Method: ProgressMorph>>initProgressMorph (in category 'initialization') -----
- initProgressMorph
- 	progress := ProgressBarMorph new.
- 	progress borderWidth: 1.
- 	progress color: Color white.
- 	progress progressColor: Color gray.
- 	progress extent: 200 @ 15.
- !

Item was removed:
- ----- Method: ProgressMorph>>initSubLabelMorph (in category 'initialization') -----
- initSubLabelMorph
- 	^ subLabelMorph := StringMorph contents: '' font: (self fontOfPointSize: 12)!

Item was removed:
- ----- Method: ProgressMorph>>initialize (in category 'initialization') -----
- initialize
- 	super initialize.
- 	self setupMorphs!

Item was removed:
- ----- Method: ProgressMorph>>label (in category 'accessing') -----
- label
- 	^self labelMorph contents!

Item was removed:
- ----- Method: ProgressMorph>>label: (in category 'accessing') -----
- label: aString
- 	self labelMorph contents: aString.
- 	self currentWorld displayWorld!

Item was removed:
- ----- Method: ProgressMorph>>labelMorph (in category 'private') -----
- labelMorph
- 	^labelMorph ifNil: [self initLabelMorph]!

Item was removed:
- ----- Method: ProgressMorph>>progress (in category 'accessing') -----
- progress
- 	^progress ifNil: [self initProgressMorph]!

Item was removed:
- ----- Method: ProgressMorph>>setupMorphs (in category 'initialization') -----
- setupMorphs
- 	|  |
- 	self initProgressMorph.
- 	self	
- 		layoutPolicy: TableLayout new;
- 		listDirection: #topToBottom;
- 		cellPositioning: #topCenter;
- 		listCentering: #center;
- 		hResizing: #shrinkWrap;
- 		vResizing: #shrinkWrap;
- 		color: Color transparent.
- 
- 	self addMorphBack: self labelMorph.
- 	self addMorphBack: self subLabelMorph.
- 	self addMorphBack: self progress.
- 
- 	self borderWidth: 2.
- 	self borderColor: Color black.
- 
- 	self color: Color veryLightGray.
- 	self align: self fullBounds center with: Display boundingBox center
- !

Item was removed:
- ----- Method: ProgressMorph>>subLabel (in category 'accessing') -----
- subLabel
- 	^self subLabelMorph contents!

Item was removed:
- ----- Method: ProgressMorph>>subLabel: (in category 'accessing') -----
- subLabel: aString
- 	self subLabelMorph contents: aString.
- 	self currentWorld displayWorld!

Item was removed:
- ----- Method: ProgressMorph>>subLabelMorph (in category 'private') -----
- subLabelMorph
- 	^subLabelMorph ifNil: [self initSubLabelMorph]!



More information about the Squeak-dev mailing list