LabelledEnterField.st
changeset 100 3d33433f459c
parent 86 4d7dbb5f1719
child 104 5ba179a1366d
equal deleted inserted replaced
99:27c080be3479 100:3d33433f459c
    16 	 poolDictionaries:''
    16 	 poolDictionaries:''
    17 	 category:'Views-Interactors'
    17 	 category:'Views-Interactors'
    18 !
    18 !
    19 
    19 
    20 !LabelledEnterField class methodsFor:'documentation'!
    20 !LabelledEnterField class methodsFor:'documentation'!
       
    21 
       
    22 copyright
       
    23 "
       
    24  COPYRIGHT (c) 1991 by Claus Gittinger
       
    25 	      All Rights Reserved
       
    26 
       
    27  This software is furnished under a license and may be used
       
    28  only in accordance with the terms of that license and with the
       
    29  inclusion of the above copyright notice.   This software may not
       
    30  be provided or otherwise made available to, or used by, any
       
    31  other person.  No title to or ownership of the software is
       
    32  hereby transferred.
       
    33 "
       
    34 !
    21 
    35 
    22 documentation
    36 documentation
    23 "
    37 "
    24     An EnterField with a name. Its protocol mimics that of an
    38     An EnterField with a name. Its protocol mimics that of an
    25     inputfield for the most common cases. However, for access to
    39     inputfield for the most common cases. However, for access to
    70     f4 model:model; aspect:#telNo; change:#telNo:.
    84     f4 model:model; aspect:#telNo; change:#telNo:.
    71     panel add:f4.
    85     panel add:f4.
    72 
    86 
    73     top open
    87     top open
    74 "
    88 "
    75 !
    89 ! !
    76 
    90 
    77 version
    91 !LabelledEnterField methodsFor:'accessing'!
    78     ^ '$Header: /cvs/stx/stx/libwidg2/LabelledEnterField.st,v 1.11 1995-11-11 16:29:07 cg Exp $'
    92 
    79 !
    93 inputField
    80 
    94     "return the input field component"
    81 copyright
    95 
    82 "
    96     ^ textField
    83  COPYRIGHT (c) 1991 by Claus Gittinger
    97 !
    84 	      All Rights Reserved
    98 
    85 
    99 labelView
    86  This software is furnished under a license and may be used
   100     "return the label component"
    87  only in accordance with the terms of that license and with the
   101 
    88  inclusion of the above copyright notice.   This software may not
   102     ^ labelField
    89  be provided or otherwise made available to, or used by, any
   103 ! !
    90  other person.  No title to or ownership of the software is
   104 
    91  hereby transferred.
   105 !LabelledEnterField methodsFor:'accessing-behavior'!
    92 "
   106 
       
   107 disable
       
   108     textField disable
       
   109 !
       
   110 
       
   111 enable
       
   112     textField enable
       
   113 ! !
       
   114 
       
   115 !LabelledEnterField methodsFor:'accessing-look'!
       
   116 
       
   117 contents
       
   118     ^ textField contents
       
   119 !
       
   120 
       
   121 contents:aString
       
   122     textField contents:aString
       
   123 !
       
   124 
       
   125 editValue 
       
   126     ^ textField editValue 
       
   127 !
       
   128 
       
   129 editValue:something 
       
   130     textField editValue:something 
       
   131 !
       
   132 
       
   133 label:aString
       
   134     labelField label:aString
       
   135 ! !
       
   136 
       
   137 !LabelledEnterField methodsFor:'accessing-mvc'!
       
   138 
       
   139 addModelInterfaceTo:aDictionary
       
   140     labelField addModelInterfaceTo:aDictionary.
       
   141     textField addModelInterfaceTo:aDictionary
       
   142 !
       
   143 
       
   144 aspectMessage:aspectSymbol 
       
   145     textField aspectMessage:aspectSymbol.
       
   146     labelField aspectMessage:aspectSymbol
       
   147 !
       
   148 
       
   149 changeMessage:aSymbol
       
   150     textField changeMessage:aSymbol
       
   151 !
       
   152 
       
   153 labelMessage:aSymbol 
       
   154     labelField labelMessage:aSymbol
       
   155 !
       
   156 
       
   157 model:aModel
       
   158     textField model:aModel.
       
   159     labelField model:aModel
    93 ! !
   160 ! !
    94 
   161 
    95 !LabelledEnterField methodsFor:'initialization'!
   162 !LabelledEnterField methodsFor:'initialization'!
    96 
   163 
    97 initialize
   164 initialize
   131     p := textField preferredExtent.
   198     p := textField preferredExtent.
   132     ix := p x. iy := p y.
   199     ix := p x. iy := p y.
   133     ^ (lx + ix) @ (ly max:iy)
   200     ^ (lx + ix) @ (ly max:iy)
   134 ! !
   201 ! !
   135 
   202 
   136 !LabelledEnterField methodsFor:'accessing'!
   203 !LabelledEnterField class methodsFor:'documentation'!
   137 
   204 
   138 labelView
   205 version
   139     "return the label component"
   206     ^ '$Header: /cvs/stx/stx/libwidg2/LabelledEnterField.st,v 1.12 1995-11-23 18:18:39 cg Exp $'
   140 
   207 ! !
   141     ^ labelField
       
   142 !
       
   143 
       
   144 inputField
       
   145     "return the input field component"
       
   146 
       
   147     ^ textField
       
   148 ! !
       
   149 
       
   150 !LabelledEnterField methodsFor:'accessing-behavior'!
       
   151 
       
   152 disable
       
   153     textField disable
       
   154 !
       
   155 
       
   156 enable
       
   157     textField enable
       
   158 ! !
       
   159 
       
   160 !LabelledEnterField methodsFor:'accessing-mvc'!
       
   161 
       
   162 model:aModel
       
   163     textField model:aModel.
       
   164     labelField model:aModel
       
   165 !
       
   166 
       
   167 changeMessage:aSymbol
       
   168     textField changeMessage:aSymbol
       
   169 !
       
   170 
       
   171 aspectMessage:aspectSymbol 
       
   172     textField aspectMessage:aspectSymbol.
       
   173     labelField aspectMessage:aspectSymbol
       
   174 !
       
   175 
       
   176 labelMessage:aSymbol 
       
   177     labelField labelMessage:aSymbol
       
   178 !
       
   179 
       
   180 addModelInterfaceTo:aDictionary
       
   181     labelField addModelInterfaceTo:aDictionary.
       
   182     textField addModelInterfaceTo:aDictionary
       
   183 ! !
       
   184 
       
   185 !LabelledEnterField methodsFor:'accessing-look'!
       
   186 
       
   187 label:aString
       
   188     labelField label:aString
       
   189 !
       
   190 
       
   191 editValue 
       
   192     ^ textField editValue 
       
   193 !
       
   194 
       
   195 editValue:something 
       
   196     textField editValue:something 
       
   197 !
       
   198 
       
   199 contents
       
   200     ^ textField contents
       
   201 !
       
   202 
       
   203 contents:aString
       
   204     textField contents:aString
       
   205 ! !