Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaning class names, comments, method formatting of Spec2-PolyWidgets
- Loading branch information
Showing
29 changed files
with
778 additions
and
737 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -6,5 +6,5 @@ Class { | |
|
||
{ #category : #running } | ||
SpLabelledListTest >> classToTest [ | ||
^ SpLabelledList | ||
^ SpLabelledListPresenter | ||
] |
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
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 |
---|---|---|
|
@@ -6,5 +6,5 @@ Class { | |
|
||
{ #category : #running } | ||
SpSliderInputTest >> classToTest [ | ||
^ SpSliderInput | ||
^ SpSliderInputPresenter | ||
] |
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,131 +1,5 @@ | ||
" | ||
I am an elementary Spec widget that associates an TextInputField and a DropListPresenter. | ||
self example | ||
I provide accessors dropList and input and shortcuts for the most common methods of their api. | ||
" | ||
Class { | ||
#name : #SpInputTextDropList, | ||
#superclass : #SpPresenter, | ||
#instVars : [ | ||
'dropList', | ||
'input' | ||
], | ||
#category : #'Spec2-PolyWidgets-Elementary' | ||
#superclass : #SpInputTextDropListPresenter, | ||
#category : #'Spec2-PolyWidgets-ToRemoveBeforerelease' | ||
} | ||
|
||
{ #category : #specs } | ||
SpInputTextDropList class >> defaultSpec [ | ||
<spec: #default> | ||
^ SpLayout composed | ||
newRow: [ :row | | ||
row | ||
add: #input origin: 0 @ 0 corner: 0.3 @ 1; | ||
add: #dropList origin: 0.3 @ 0 corner: 1 @ 1 ]; | ||
yourself | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> acceptOnCR: aBoolean [ | ||
self input acceptOnCR: aBoolean | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> beEncrypted [ | ||
self input beEncrypted | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> displayBlock: aBlock [ | ||
self dropList displayBlock: aBlock | ||
] | ||
|
||
{ #category : #accessing } | ||
SpInputTextDropList >> dropList [ | ||
^ dropList | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> emptyList [ | ||
self dropList emptyList | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> encrypted: aBoolean [ | ||
self input encrypted: aBoolean | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> entryCompletion: anEntryCompletion [ | ||
self input entryCompletion: anEntryCompletion | ||
] | ||
|
||
{ #category : #initialization } | ||
SpInputTextDropList >> initializeWidgets [ | ||
input := self instantiate: SpTextInputFieldPresenter. | ||
dropList := self instantiate: SpDropListPresenter. | ||
self focusOrder | ||
add: input; | ||
add: dropList | ||
] | ||
|
||
{ #category : #accessing } | ||
SpInputTextDropList >> input [ | ||
^ input | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> items: aList [ | ||
self dropList items: aList | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> listSize [ | ||
self dropList listSize | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> placeholder: aText [ | ||
self input placeholder: aText | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> resetSelection [ | ||
self dropList resetSelection | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> selectedItem [ | ||
self dropList selectedItem | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> setIndex: anIndex [ | ||
self dropList setIndex: anIndex | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> text [ | ||
self input text | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropList >> text: aText [ | ||
self input text: aText | ||
] | ||
|
||
{ #category : #'events-shortcuts' } | ||
SpInputTextDropList >> whenSelectedItemChanged: aBlock [ | ||
self dropList whenSelectedItemChanged: aBlock | ||
] | ||
|
||
{ #category : #'events-shortcuts' } | ||
SpInputTextDropList >> whenSelectionChanged: aBlock [ | ||
self dropList whenSelectionChanged: aBlock | ||
] | ||
|
||
{ #category : #'events-shortcuts' } | ||
SpInputTextDropList >> whenSelectionIndexChanged: aBlock [ | ||
self dropList whenSelectionIndexChanged: aBlock | ||
] |
131 changes: 131 additions & 0 deletions
131
src/Spec2-PolyWidgets/SpInputTextDropListPresenter.class.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,131 @@ | ||
" | ||
I am an elementary Spec widget that associates an TextInputField and a DropListPresenter. | ||
self example | ||
I provide accessors dropList and input and shortcuts for the most common methods of their api. | ||
" | ||
Class { | ||
#name : #SpInputTextDropListPresenter, | ||
#superclass : #SpPresenter, | ||
#instVars : [ | ||
'dropList', | ||
'input' | ||
], | ||
#category : #'Spec2-PolyWidgets-Elementary' | ||
} | ||
|
||
{ #category : #specs } | ||
SpInputTextDropListPresenter class >> defaultSpec [ | ||
<spec: #default> | ||
^ SpLayout composed | ||
newRow: [ :row | | ||
row | ||
add: #input origin: 0 @ 0 corner: 0.3 @ 1; | ||
add: #dropList origin: 0.3 @ 0 corner: 1 @ 1 ]; | ||
yourself | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> acceptOnCR: aBoolean [ | ||
self input acceptOnCR: aBoolean | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> beEncrypted [ | ||
self input beEncrypted | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> displayBlock: aBlock [ | ||
self dropList displayBlock: aBlock | ||
] | ||
|
||
{ #category : #accessing } | ||
SpInputTextDropListPresenter >> dropList [ | ||
^ dropList | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> emptyList [ | ||
self dropList emptyList | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> encrypted: aBoolean [ | ||
self input encrypted: aBoolean | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> entryCompletion: anEntryCompletion [ | ||
self input entryCompletion: anEntryCompletion | ||
] | ||
|
||
{ #category : #initialization } | ||
SpInputTextDropListPresenter >> initializeWidgets [ | ||
input := self instantiate: SpTextInputFieldPresenter. | ||
dropList := self instantiate: SpDropListPresenter. | ||
self focusOrder | ||
add: input; | ||
add: dropList | ||
] | ||
|
||
{ #category : #accessing } | ||
SpInputTextDropListPresenter >> input [ | ||
^ input | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> items: aList [ | ||
self dropList items: aList | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> listSize [ | ||
self dropList listSize | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> placeholder: aText [ | ||
self input placeholder: aText | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> resetSelection [ | ||
self dropList resetSelection | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> selectedItem [ | ||
self dropList selectedItem | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> setIndex: anIndex [ | ||
self dropList setIndex: anIndex | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> text [ | ||
self input text | ||
] | ||
|
||
{ #category : #'api-shortcuts' } | ||
SpInputTextDropListPresenter >> text: aText [ | ||
self input text: aText | ||
] | ||
|
||
{ #category : #'events-shortcuts' } | ||
SpInputTextDropListPresenter >> whenSelectedItemChanged: aBlock [ | ||
self dropList whenSelectedItemChanged: aBlock | ||
] | ||
|
||
{ #category : #'events-shortcuts' } | ||
SpInputTextDropListPresenter >> whenSelectionChanged: aBlock [ | ||
self dropList whenSelectionChanged: aBlock | ||
] | ||
|
||
{ #category : #'events-shortcuts' } | ||
SpInputTextDropListPresenter >> whenSelectionIndexChanged: aBlock [ | ||
self dropList whenSelectionIndexChanged: aBlock | ||
] |
Oops, something went wrong.