5374
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
COPYRIGHT (c) 2009 by eXept Software AG
|
|
4 |
All Rights Reserved
|
|
5 |
|
|
6 |
This software is furnished under a license and may be used
|
|
7 |
only in accordance with the terms of that license and with the
|
|
8 |
inclusion of the above copyright notice. This software may not
|
|
9 |
be provided or otherwise made available to, or used by, any
|
|
10 |
other person. No title to or ownership of the software is
|
|
11 |
hereby transferred.
|
|
12 |
"
|
|
13 |
"{ Package: 'stx:libview' }"
|
|
14 |
|
|
15 |
Object subclass:#AbstractBorder
|
|
16 |
instanceVariableNames:''
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'Interface-Support'
|
|
20 |
!
|
|
21 |
|
|
22 |
!AbstractBorder class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
27 |
COPYRIGHT (c) 2009 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
"
|
|
37 |
!
|
|
38 |
|
|
39 |
documentation
|
|
40 |
"
|
|
41 |
extracted from Border.
|
|
42 |
|
|
43 |
[author:]
|
|
44 |
Claus Gittinger
|
|
45 |
"
|
|
46 |
! !
|
|
47 |
|
|
48 |
!AbstractBorder class methodsFor:'instance creation'!
|
|
49 |
|
|
50 |
width:borderWidth
|
|
51 |
"create a new instance of the receiver with a border of the given width
|
|
52 |
(and default color)."
|
|
53 |
|
|
54 |
^ self new width:borderWidth color:(Color black)
|
|
55 |
|
|
56 |
"Modified: 10.2.1997 / 15:19:57 / cg"
|
|
57 |
!
|
|
58 |
|
|
59 |
width:borderWidth color:aColor
|
|
60 |
"create a new instance of the receiver with a border of the given width
|
|
61 |
and color."
|
|
62 |
|
|
63 |
^ self new setBorderWidth:borderWidth color:aColor
|
|
64 |
|
|
65 |
"Modified: 10.2.1997 / 15:20:32 / cg"
|
|
66 |
! !
|
|
67 |
|
|
68 |
!AbstractBorder methodsFor:'accessing'!
|
|
69 |
|
|
70 |
setBorderWidth:aWidth color:aColor
|
|
71 |
self setBorderWidth:aWidth.
|
|
72 |
self setBorderColor:aColor
|
|
73 |
|
|
74 |
"Created: 10.2.1997 / 15:21:27 / cg"
|
|
75 |
! !
|
|
76 |
|
|
77 |
!AbstractBorder methodsFor:'displaying'!
|
|
78 |
|
|
79 |
displayOn:aGC forDisplayBox:aRectangle
|
|
80 |
"display the borders represented by the receiver in the specified rectangle.
|
|
81 |
The gc is restored after the draw."
|
|
82 |
|
|
83 |
self displayOn:aGC forDisplayBox:aRectangle using:nil
|
|
84 |
|
|
85 |
"Modified: 10.2.1997 / 14:56:10 / cg"
|
|
86 |
!
|
|
87 |
|
|
88 |
displayOn:aGC forDisplayBox:aRectangle using:colorSource
|
|
89 |
self subclassResponsibility
|
|
90 |
! !
|
|
91 |
|
|
92 |
!AbstractBorder methodsFor:'private accessing'!
|
|
93 |
|
|
94 |
setBorderColor:arg
|
|
95 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
96 |
|
|
97 |
^ self subclassResponsibility
|
|
98 |
!
|
|
99 |
|
|
100 |
setBorderWidth:arg
|
|
101 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
102 |
|
|
103 |
^ self subclassResponsibility
|
|
104 |
! !
|
|
105 |
|
|
106 |
!AbstractBorder class methodsFor:'documentation'!
|
|
107 |
|
|
108 |
version_CVS
|
|
109 |
^ '$Header: /cvs/stx/stx/libview/AbstractBorder.st,v 1.1 2009-10-23 12:25:52 cg Exp $'
|
|
110 |
! !
|