equal
deleted
inserted
replaced
17 lengthLimit entryCompletionBlock entryCompletionCharacter |
17 lengthLimit entryCompletionBlock entryCompletionCharacter |
18 passwordCharacter autoScrollHorizontally acceptOnTab |
18 passwordCharacter autoScrollHorizontally acceptOnTab |
19 acceptOnLostFocus acceptOnPointerLeave acceptIfUnchanged leaveKey |
19 acceptOnLostFocus acceptOnPointerLeave acceptIfUnchanged leaveKey |
20 doubleClickAction emptyFieldReplacementText' |
20 doubleClickAction emptyFieldReplacementText' |
21 classVariableNames:'DefaultForegroundColor DefaultBackgroundColor |
21 classVariableNames:'DefaultForegroundColor DefaultBackgroundColor |
22 DefaultSelectionForegroundColor DefaultSelectionBackgroundColor' |
22 DefaultSelectionForegroundColor DefaultSelectionBackgroundColor |
|
23 DefaultBorderColor DefaultBorderWidth DefaultLevel' |
23 poolDictionaries:'' |
24 poolDictionaries:'' |
24 category:'Views-Text' |
25 category:'Views-Text' |
25 ! |
26 ! |
26 |
27 |
27 !EditField class methodsFor:'documentation'! |
28 !EditField class methodsFor:'documentation'! |
779 ! |
780 ! |
780 |
781 |
781 updateStyleCache |
782 updateStyleCache |
782 "extract values from the styleSheet and cache them in class variables" |
783 "extract values from the styleSheet and cache them in class variables" |
783 |
784 |
784 <resource: #style (#'editField.foregroundColor' #'editField.backgroundColor' |
785 <resource: #style (#'editField.foregroundColor' |
785 #'editField.selectionForegroundColor' #'editFieldSelectionBackgroundColor' |
786 #'editField.backgroundColor' |
|
787 #'editField.selectionForegroundColor' |
|
788 #'editFieldSelectionBackgroundColor' |
786 #'editField.font')> |
789 #'editField.font')> |
787 |
790 |
788 DefaultForegroundColor := StyleSheet colorAt:'editField.foregroundColor' default:Black. |
791 DefaultForegroundColor := StyleSheet colorAt:'editField.foregroundColor' default:Black. |
789 DefaultBackgroundColor := StyleSheet colorAt:'editField.backgroundColor' default:White. |
792 DefaultBackgroundColor := StyleSheet colorAt:'editField.backgroundColor' default:White. |
790 DefaultSelectionForegroundColor := StyleSheet colorAt:'editField.selectionForegroundColor' default:nil. |
793 DefaultSelectionForegroundColor := StyleSheet colorAt:'editField.selectionForegroundColor' default:nil. |
794 DefaultSelectionBackgroundColor := StyleSheet colorAt:'editField.selectionBackgroundColor' default:nil. |
797 DefaultSelectionBackgroundColor := StyleSheet colorAt:'editField.selectionBackgroundColor' default:nil. |
795 DefaultSelectionBackgroundColor isNil ifTrue:[ |
798 DefaultSelectionBackgroundColor isNil ifTrue:[ |
796 DefaultSelectionBackgroundColor := StyleSheet colorAt:'selection.hilightBackgroundColor' default:DefaultForegroundColor. |
799 DefaultSelectionBackgroundColor := StyleSheet colorAt:'selection.hilightBackgroundColor' default:DefaultForegroundColor. |
797 ]. |
800 ]. |
798 DefaultFont := StyleSheet fontAt:'editField.font' default:nil. |
801 DefaultFont := StyleSheet fontAt:'editField.font' default:nil. |
|
802 DefaultBorderColor := StyleSheet colorAt:'editField.borderColor' default:nil. |
|
803 DefaultBorderWidth := StyleSheet at:'editField.borderWidth' default:nil. |
|
804 DefaultLevel := StyleSheet at:'editField.level' default:nil. |
799 |
805 |
800 " |
806 " |
801 self updateStyleCache |
807 self updateStyleCache |
802 " |
808 " |
803 |
809 |
1836 initStyle |
1842 initStyle |
1837 "setup viewStyle specifics" |
1843 "setup viewStyle specifics" |
1838 |
1844 |
1839 <resource: #style (#'editField.cursorType' |
1845 <resource: #style (#'editField.cursorType' |
1840 #'editField.cursorForegroundColor' |
1846 #'editField.cursorForegroundColor' |
1841 #'editField.cursorBackgroundColor' |
1847 #'editField.cursorBackgroundColor' |
1842 )> |
1848 )> |
1843 |
1849 |
1844 super initStyle. |
1850 super initStyle. |
1845 |
1851 |
1846 "/ DefaultFont notNil ifTrue:[font := DefaultFont on:device] |
1852 "/ DefaultFont notNil ifTrue:[font := DefaultFont on:device] |
1861 |
1867 |
1862 cursorType := styleSheet at:#'editField.cursorType' default:cursorType. |
1868 cursorType := styleSheet at:#'editField.cursorType' default:cursorType. |
1863 |
1869 |
1864 cursorFgColor := styleSheet at:#'editField.cursorForegroundColor' default:cursorFgColor. |
1870 cursorFgColor := styleSheet at:#'editField.cursorForegroundColor' default:cursorFgColor. |
1865 cursorBgColor := styleSheet at:#'editField.cursorBackgroundColor' default:cursorBgColor. |
1871 cursorBgColor := styleSheet at:#'editField.cursorBackgroundColor' default:cursorBgColor. |
|
1872 |
|
1873 DefaultLevel notNil ifTrue:[ |
|
1874 self level:DefaultLevel. |
|
1875 ]. |
|
1876 DefaultBorderWidth notNil ifTrue:[ |
|
1877 self borderWidth:DefaultBorderWidth. |
|
1878 DefaultBorderColor notNil ifTrue:[ |
|
1879 self borderColor:DefaultBorderColor. |
|
1880 ]. |
|
1881 ]. |
1866 |
1882 |
1867 "Modified: / 21.5.1998 / 15:38:14 / cg" |
1883 "Modified: / 21.5.1998 / 15:38:14 / cg" |
1868 ! |
1884 ! |
1869 |
1885 |
1870 initialize |
1886 initialize |
2251 ! ! |
2267 ! ! |
2252 |
2268 |
2253 !EditField class methodsFor:'documentation'! |
2269 !EditField class methodsFor:'documentation'! |
2254 |
2270 |
2255 version |
2271 version |
2256 ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.207 2009-10-20 15:46:45 cg Exp $' |
2272 ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.208 2009-10-23 12:27:07 cg Exp $' |
2257 ! |
2273 ! |
2258 |
2274 |
2259 version_CVS |
2275 version_CVS |
2260 ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.207 2009-10-20 15:46:45 cg Exp $' |
2276 ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.208 2009-10-23 12:27:07 cg Exp $' |
2261 ! ! |
2277 ! ! |