Skip to content

Commit

Permalink
Rename ExampleRadioButtonModel to RadioButtonModelExample
Browse files Browse the repository at this point in the history
  • Loading branch information
NourJihene committed Apr 9, 2021
1 parent 0f369b8 commit a7a814b
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 75 deletions.
78 changes: 4 additions & 74 deletions src/Morphic-Examples/ExampleRadioButtonModel.class.st
@@ -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
]
80 changes: 80 additions & 0 deletions src/Morphic-Examples/RadioButtonModelExample.class.st
@@ -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
]
2 changes: 1 addition & 1 deletion src/Morphic-Examples/WidgetExamples.class.st
Expand Up @@ -70,7 +70,7 @@ WidgetExamples class >> exampleBasicControls [
|dialog builder radioModel treeModel|
builder := self builder.
dialog := (builder newPluggableDialogWindow: 'Example basic controls') useDefaultOKButton.
radioModel := ExampleRadioButtonModel new.
radioModel := RadioButtonModelExample new.
treeModel := Array with:(MorphWithSubmorphsWrapper with: self currentWorld).
dialog contentMorph: ((dialog newRow: {
dialog newLabelGroup: {
Expand Down

0 comments on commit a7a814b

Please sign in to comment.