MonoMappedPalette.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 06 Sep 2017 09:47:50 +0200
branchjv
changeset 8179 ced410b68993
parent 3876 f4dc6267a30a
child 7955 66531231e428
permissions -rw-r--r--
Build files: fixed project definition ...so it passes the package validation.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
     3
	      All Rights Reserved
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
3876
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    16
"{ Package: 'stx:libview' }"
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
MappedPalette subclass:#MonoMappedPalette
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	instanceVariableNames:''
3876
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    20
	classVariableNames:'WhiteBlack BlackWhite'
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    22
	category:'Graphics-Images-Support'
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
!MonoMappedPalette class methodsFor:'documentation'!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
copyright
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    30
	      All Rights Reserved
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 This software is furnished under a license and may be used
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 other person.  No title to or ownership of the software is
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
 hereby transferred.
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
documentation
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    46
    This class will (sooner or later) take over and/or redefine some of the Colormap functionality.
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    47
    This migration will be done both to cleanup the code and for VW compatibility.
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    49
    Notice: For now, the whole functionality is still in Colormap
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    50
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    51
    [see also:]
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    52
	Color Image Form
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
! !
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
3876
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    56
!MonoMappedPalette class methodsFor:'instance creation'!
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    57
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    58
blackWhite
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    59
    BlackWhite isNil ifTrue:[
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    60
        BlackWhite := super blackWhite
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    61
    ].
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    62
    ^ BlackWhite
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    63
!
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    64
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    65
whiteBlack
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    66
    WhiteBlack isNil ifTrue:[
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    67
        WhiteBlack := super whiteBlack
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    68
    ].
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    69
    ^ WhiteBlack
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    70
! !
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    71
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    72
!MonoMappedPalette methodsFor:'accessing'!
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    73
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    74
at:index put:aColor
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    75
    self error:'this palette cannot be changed'.
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    76
! !
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    77
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
!MonoMappedPalette class methodsFor:'documentation'!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
version
3876
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    81
    ^ '$Header: /cvs/stx/stx/libview/MonoMappedPalette.st,v 1.3 2003-05-06 18:26:28 cg Exp $'
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
! !