ColorInspectorView.st
author Claus Gittinger <cg@exept.de>
Sat, 11 Nov 1995 16:41:09 +0100
changeset 165 df29ee4514c1
parent 111 b4ef3e799345
child 2236 257f587ad7dc
permissions -rw-r--r--
uff - version methods changed to return stings

'From Smalltalk/X, Version:2.10.3 on 24-sep-1994 at 20:04:48'!

InspectorView subclass:#ColorInspectorView
	 instanceVariableNames:'colorView'
	 classVariableNames:''
	 poolDictionaries:''
	 category:'Interface-Inspector'
!

!ColorInspectorView class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      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.
"
!

version
    ^ '$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.5 1995-11-11 15:39:26 cg Exp $'
! !

!ColorInspectorView methodsFor:'accessing'!

inspect:anObject
    super inspect:anObject.
    realized ifFalse:[^ self].
    colorView viewBackground:anObject.
    colorView clear
! !

!ColorInspectorView methodsFor:'initialization'!

initialize
    |newPanel sub|

    super initialize.

    newPanel := VariableVerticalPanel in:self.
    newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0.

    sub := subViews first.
    self removeSubView:sub.
    sub origin:0.0@0.0 corner:1.0@0.8.
    newPanel addSubView:sub.

    colorView := View in:newPanel.
    colorView origin:(0.0 @ 0.8) corner:(1.0 @ 1.0).

    "
     ColorInspectorView inspect:(Color yellow)
     ColorInspectorView inspect:(Color name:'brown') lightened)
    "
! !