ColorInspectorView.st
author claus
Thu, 10 Aug 1995 15:14:54 +0200
changeset 110 570a38362ae1
parent 87 0700c19ecb55
child 111 b4ef3e799345
permissions -rw-r--r--
.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     1
'From Smalltalk/X, Version:2.10.3 on 24-sep-1994 at 20:04:48'!
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     2
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     3
InspectorView subclass:#ColorInspectorView
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     4
	 instanceVariableNames:'colorView'
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     5
	 classVariableNames:''
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     6
	 poolDictionaries:''
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     7
	 category:'Interface-Inspector'
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     8
!
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
     9
87
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    10
!ColorInspectorView class methodsFor:'documentation'!
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    11
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    12
copyright
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    13
"
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    14
 COPYRIGHT (c) 1994 by Claus Gittinger
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    15
	      All Rights Reserved
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    16
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    17
 This software is furnished under a license and may be used
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    18
 only in accordance with the terms of that license and with the
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    19
 inclusion of the above copyright notice.   This software may not
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    20
 be provided or otherwise made available to, or used by, any
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    21
 other person.  No title to or ownership of the software is
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    22
 hereby transferred.
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    23
"
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    24
!
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    25
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    26
version
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    27
"
110
claus
parents: 87
diff changeset
    28
$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.3 1995-08-10 13:13:45 claus Exp $
claus
parents: 87
diff changeset
    29
$Revision: 1.3 $
87
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    30
"
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    31
! !
0700c19ecb55 *** empty log message ***
claus
parents: 44
diff changeset
    32
44
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    33
!ColorInspectorView methodsFor:'accessing'!
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    34
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    35
inspect:anObject
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    36
    super inspect:anObject.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    37
    realized ifFalse:[^ self].
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    38
    colorView viewBackground:anObject.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    39
    colorView clear
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    40
! !
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    41
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    42
!ColorInspectorView methodsFor:'initialization'!
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    43
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    44
initialize
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    45
    |newPanel sub|
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    46
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    47
    super initialize.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    48
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    49
    newPanel := VariableVerticalPanel in:self.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    50
    newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    51
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    52
    sub := subViews first.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    53
    self removeSubView:sub.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    54
    sub origin:0.0@0.0 corner:1.0@0.8.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    55
    newPanel addSubView:sub.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    56
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    57
    colorView := View in:newPanel.
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    58
    colorView origin:(0.0 @ 0.8) corner:(1.0 @ 1.0).
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    59
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    60
    "
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    61
     ColorInspectorView inspect:(Color yellow)
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    62
     ColorInspectorView inspect:(Color name:'brown') lightened)
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    63
    "
5f101bc4a0ca Initial revision
claus
parents:
diff changeset
    64
! !