SimpleBorder.st
author Claus Gittinger <cg@exept.de>
Sat, 24 Oct 2009 12:07:55 +0200
changeset 5410 03d42dd62a01
parent 5393 429ab467ebbd
child 5417 b4a2fe418cce
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
 COPYRIGHT (c) 2009 by eXept Software AG
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
     4
	      All Rights Reserved
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 This software is furnished under a license and may be used
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 only in accordance with the terms of that license and with the
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 inclusion of the above copyright notice.   This software may not
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 be provided or otherwise made available to, or used by, any
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 other person.  No title to or ownership of the software is
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
 hereby transferred.
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libview' }"
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
AbstractBorder subclass:#SimpleBorder
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    16
	instanceVariableNames:'color'
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
5393
429ab467ebbd category
Claus Gittinger <cg@exept.de>
parents: 5375
diff changeset
    19
	category:'Graphics-Support'
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!SimpleBorder class methodsFor:'documentation'!
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
 COPYRIGHT (c) 1997 by eXept Software AG
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 2009 by eXept Software AG
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    28
	      All Rights Reserved
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    41
    a simple border, where all four sides are drawn in the same solid color
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    [author:]
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
        Claus Gittinger
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
! !
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
!SimpleBorder methodsFor:'accessing'!
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    50
color
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    ^ color
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
!
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    54
color:aColor
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    55
    "set the width"
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    57
    color := aColor
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
! !
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    60
!SimpleBorder methodsFor:'displaying'!
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    61
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    62
displayOn:aGC forDisplayBox:aRectangle
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    63
    |oldPaint|
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    65
    color isNil ifTrue:[^ self].
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    66
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    67
    oldPaint := aGC paint.
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    68
    aGC paint:color.
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    69
    aGC displayRectangle:aRectangle.
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    70
    aGC paint:oldPaint.
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
! !
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
!SimpleBorder class methodsFor:'documentation'!
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
version_CVS
5410
03d42dd62a01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5393
diff changeset
    76
    ^ '$Header: /cvs/stx/stx/libview/SimpleBorder.st,v 1.3 2009-10-24 10:07:55 cg Exp $'
5375
0fd570afede6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
! !