initial checkin
authorClaus Gittinger <cg@exept.de>
Fri, 23 Oct 2009 14:25:52 +0200
changeset 5374 fa6ec7dc8508
parent 5373 44c47ff50380
child 5375 0fd570afede6
initial checkin
AbstractBorder.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AbstractBorder.st	Fri Oct 23 14:25:52 2009 +0200
@@ -0,0 +1,110 @@
+"
+ COPYRIGHT (c) 1997 by eXept Software AG
+ COPYRIGHT (c) 2009 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+"{ Package: 'stx:libview' }"
+
+Object subclass:#AbstractBorder
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Support'
+!
+
+!AbstractBorder class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1997 by eXept Software AG
+ COPYRIGHT (c) 2009 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+    extracted from Border.
+
+    [author:]
+        Claus Gittinger
+"
+! !
+
+!AbstractBorder class methodsFor:'instance creation'!
+
+width:borderWidth
+    "create a new instance of the receiver with a border of the given width  
+     (and default color)."
+
+    ^ self new width:borderWidth color:(Color black)
+
+    "Modified: 10.2.1997 / 15:19:57 / cg"
+!
+
+width:borderWidth color:aColor
+    "create a new instance of the receiver with a border of the given width  
+     and color."
+
+    ^ self new setBorderWidth:borderWidth color:aColor
+
+    "Modified: 10.2.1997 / 15:20:32 / cg"
+! !
+
+!AbstractBorder methodsFor:'accessing'!
+
+setBorderWidth:aWidth color:aColor
+     self setBorderWidth:aWidth.
+     self setBorderColor:aColor
+
+    "Created: 10.2.1997 / 15:21:27 / cg"
+! !
+
+!AbstractBorder methodsFor:'displaying'!
+
+displayOn:aGC forDisplayBox:aRectangle
+    "display the borders represented by the receiver in the specified rectangle.
+     The gc is restored after the draw."
+
+    self displayOn:aGC forDisplayBox:aRectangle using:nil
+
+    "Modified: 10.2.1997 / 14:56:10 / cg"
+!
+
+displayOn:aGC forDisplayBox:aRectangle using:colorSource
+    self subclassResponsibility
+! !
+
+!AbstractBorder methodsFor:'private accessing'!
+
+setBorderColor:arg
+    "raise an error: must be redefined in concrete subclass(es)"
+
+    ^ self subclassResponsibility
+!
+
+setBorderWidth:arg
+    "raise an error: must be redefined in concrete subclass(es)"
+
+    ^ self subclassResponsibility
+! !
+
+!AbstractBorder class methodsFor:'documentation'!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libview/AbstractBorder.st,v 1.1 2009-10-23 12:25:52 cg Exp $'
+! !