Skip to content
Permalink
Browse files

Merge pull request #760 from jecisc/Improve-demos

Improve-demos
  • Loading branch information...
jecisc committed Sep 9, 2019
2 parents de681a0 + f9c034b commit d2e1bf1bf63cdfa67edb4084b250ee58b3e71701
@@ -5,14 +5,10 @@ Class {
#name : #SpDemoTextInputPresenter,
#superclass : #SpPresenter,
#instVars : [
'labelNormal',
'fieldNormal',
'labelDisabled',
'fieldDisabled',
'labelEncrypted',
'fieldEncrypted',
'fieldPlaceholderText',
'labelPlaceholderText'
'fieldPlaceholderText'
],
#category : #'Spec2-Examples-Demo-TextInput'
}
@@ -21,13 +17,13 @@ Class {
SpDemoTextInputPresenter class >> defaultSpec [
^ SpGridLayout new
beColumnNotHomogeneous;
add: #labelNormal at: 1 @ 1;
add: 'Normal:' at: 1 @ 1;
add: #fieldNormal at: 2 @ 1;
add: #labelDisabled at: 1 @ 2;
add: 'Disabled:' at: 1 @ 2;
add: #fieldDisabled at: 2 @ 2;
add: #labelPlaceholderText at: 1 @ 3;
add: 'Placeholder:' at: 1 @ 3;
add: #fieldPlaceholderText at: 2 @ 3;
add: #labelEncrypted at: 1 @ 4;
add: 'Password:' at: 1 @ 4;
add: #fieldEncrypted at: 2 @ 4;
yourself
]
@@ -74,57 +70,13 @@ SpDemoTextInputPresenter >> fieldPlaceholderText: anObject [

{ #category : #initialization }
SpDemoTextInputPresenter >> initializeWidgets [
labelNormal := self newLabel label: 'Normal:'.
fieldNormal := self newTextInput.

labelDisabled := self newLabel label: 'Disabled:'.
fieldDisabled := self newTextInput enabled: false.

labelPlaceholderText := self newLabel label: 'Placeholder:'.
fieldPlaceholderText := self newTextInput placeholder: 'Placeholder text'.

labelEncrypted := self newLabel label: 'Password:'.
fieldEncrypted := self newTextInput
text: 'Password';
bePassword
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelDisabled [
^ labelDisabled
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelDisabled: anObject [
labelDisabled := anObject
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelEncrypted [
^ labelEncrypted
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelEncrypted: anObject [
labelEncrypted := anObject
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelNormal [
^ labelNormal
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelNormal: anObject [
labelNormal := anObject
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelPlaceholderText [
^ labelPlaceholderText
]

{ #category : #accessing }
SpDemoTextInputPresenter >> labelPlaceholderText: anObject [
labelPlaceholderText := anObject
]
@@ -15,10 +15,12 @@ Class {

{ #category : #specs }
SpDemoTreeTablePresenter class >> defaultSpec [

^ SpBoxLayout newVertical
add: #table1;
add: 'Double click to browse.' height: self labelHeight;
add: 'Double click to browse.'
expand: false
fill: false
padding: 0;
yourself
]

0 comments on commit d2e1bf1

Please sign in to comment.
You can’t perform that action at this time.