Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename ExampleRadioButtonModel to RadioButtonModelExample
- Loading branch information
1 parent
0f369b8
commit a7a814b
Showing
3 changed files
with
85 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,10 @@ | ||
" | ||
Model used for radio buttons in example of basic controls (see ""UITheme exampleBasicControls""). | ||
" | ||
Class { | ||
#name : #ExampleRadioButtonModel, | ||
#superclass : #Model, | ||
#instVars : [ | ||
'option' | ||
], | ||
#superclass : #RadioButtonModelExample, | ||
#category : #'Morphic-Examples-Widgets' | ||
} | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> beCenter [ | ||
"Set the option to #center." | ||
|
||
self option: #center | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> beLeft [ | ||
"Set the option to #left." | ||
|
||
self option: #left | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> beRight [ | ||
"Set the option to #right." | ||
|
||
self option: #right | ||
] | ||
|
||
{ #category : #initialization } | ||
ExampleRadioButtonModel >> initialize [ | ||
"Initialize the receiver." | ||
|
||
super initialize. | ||
self | ||
option: #left | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> isCenter [ | ||
"Answer whether the option if #center." | ||
|
||
^self option == #center | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> isLeft [ | ||
"Answer whether the option if #left." | ||
|
||
^self option == #left | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> isRight [ | ||
"Answer whether the option if #right." | ||
|
||
^self option == #right | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> option [ | ||
"Answer the value of option" | ||
|
||
^ option | ||
] | ||
|
||
{ #category : #accessing } | ||
ExampleRadioButtonModel >> option: aSymbol [ | ||
"Set the value of option" | ||
|
||
option := aSymbol. | ||
self | ||
changed: #isLeft; | ||
changed: #isCenter; | ||
changed: #isRight | ||
{ #category : #testing } | ||
ExampleRadioButtonModel class >> isDeprecated [ | ||
^ true | ||
] |
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,80 @@ | ||
" | ||
Model used for radio buttons in example of basic controls (see ""UITheme exampleBasicControls""). | ||
" | ||
Class { | ||
#name : #RadioButtonModelExample, | ||
#superclass : #Model, | ||
#instVars : [ | ||
'option' | ||
], | ||
#category : #'Morphic-Examples-Widgets' | ||
} | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> beCenter [ | ||
"Set the option to #center." | ||
|
||
self option: #center | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> beLeft [ | ||
"Set the option to #left." | ||
|
||
self option: #left | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> beRight [ | ||
"Set the option to #right." | ||
|
||
self option: #right | ||
] | ||
|
||
{ #category : #initialization } | ||
RadioButtonModelExample >> initialize [ | ||
"Initialize the receiver." | ||
|
||
super initialize. | ||
self | ||
option: #left | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> isCenter [ | ||
"Answer whether the option if #center." | ||
|
||
^self option == #center | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> isLeft [ | ||
"Answer whether the option if #left." | ||
|
||
^self option == #left | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> isRight [ | ||
"Answer whether the option if #right." | ||
|
||
^self option == #right | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> option [ | ||
"Answer the value of option" | ||
|
||
^ option | ||
] | ||
|
||
{ #category : #accessing } | ||
RadioButtonModelExample >> option: aSymbol [ | ||
"Set the value of option" | ||
|
||
option := aSymbol. | ||
self | ||
changed: #isLeft; | ||
changed: #isCenter; | ||
changed: #isRight | ||
] |
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