1: ================================================================================
  2: 
  3: Smalltalk.KSU defineClass: #ColorCMY
  4:     superclass: #{KSU.ColorAbstract}
  5:     indexedType: #none
  6:     private: false
  7:     instanceVariableNames: ''
  8:     classInstanceVariableNames: ''
  9:     imports: ''
 10:     category: 'KSU-Template'
 11: 
 12: ================================================================================
 13: 
 14: KSU.ColorCMY method for 'accessing'
 15: 
 16: color
 17: 
 18:     | aColor |
 19:     aColor := ColorValue
 20:                 cyan: (0 max: (self cyanGauge value min: 1))
 21:                 magenta: (0 max: (self magentaGauge value min: 1))
 22:                 yellow: (0 max: (self yellowGauge value min: 1)).
 23:     ^aColor
 24: 
 25: ------------------------------------------------------------
 26: 
 27: KSU.ColorCMY method for 'aspects'
 28: 
 29: cyanGauge
 30: 
 31:     ^self firstGauge
 32: 
 33: ------------------------------------------------------------
 34: 
 35: KSU.ColorCMY method for 'aspects'
 36: 
 37: magentaGauge
 38: 
 39:     ^self secondGauge
 40: 
 41: ------------------------------------------------------------
 42: 
 43: KSU.ColorCMY method for 'aspects'
 44: 
 45: yellowGauge
 46: 
 47:     ^self thirdGauge
 48: 
 49: ================================================================================
 50: 
 51: KSU.ColorCMY class
 52:     instanceVariableNames: ''
 53: 
 54: ================================================================================
 55: 
 56: KSU.ColorCMY class method for 'examples'
 57: 
 58: example1
 59:     "KSU.ColorCMY example1."
 60: 
 61:     | anApplication |
 62:     anApplication := KSU.ColorCMY new.
 63:     anApplication open.
 64:     ^anApplication
 65: 
 66: ------------------------------------------------------------
 67: 
 68: KSU.ColorCMY class method for 'interface specs'
 69: 
 70: windowSpec
 71:     "Tools.UIPainter new openOnClass: self andSelector: #windowSpec"
 72: 
 73:     <resource: #canvas>
 74:     ^#(#{UI.FullSpec} 
 75:         #window: 
 76:         #(#{UI.WindowSpec} 
 77:             #label: '減法混色' 
 78:             #min: #(#{Core.Point} 512 160 ) 
 79:             #max: #(#{Core.Point} 512 160 ) 
 80:             #bounds: #(#{Graphics.Rectangle} 1023 719 1535 879 ) 
 81:             #flags: 4 
 82:             #menu: #menuBar ) 
 83:         #component: 
 84:         #(#{UI.SpecCollection} 
 85:             #collection: #(
 86:                 #(#{UI.LabelSpec} 
 87:                     #layout: #(#{Core.Point} 24 17 ) 
 88:                     #name: #cyanLabel 
 89:                     #colors: 
 90:                     #(#{UI.LookPreferences} 
 91:                         #setBackgroundColor: #(#{Graphics.ColorValue} #pink ) ) 
 92:                     #label: 'シアン :' ) 
 93:                 #(#{UI.LabelSpec} 
 94:                     #layout: #(#{Core.Point} 24 49 ) 
 95:                     #name: #magentaLabel 
 96:                     #colors: 
 97:                     #(#{UI.LookPreferences} 
 98:                         #setBackgroundColor: #(#{Graphics.ColorValue} 6143 8191 6143 ) ) 
 99:                     #label: 'マゼンタ:' ) 
100:                 #(#{UI.LabelSpec} 
101:                     #layout: #(#{Core.Point} 24 81 ) 
102:                     #name: #yellowLabel 
103:                     #colors: 
104:                     #(#{UI.LookPreferences} 
105:                         #setBackgroundColor: #(#{Graphics.ColorValue} 6143 6143 8191 ) ) 
106:                     #label: 'イエロー:' ) 
107:                 #(#{UI.ProgressWidgetSpec} 
108:                     #layout: #(#{Graphics.Rectangle} 232 17 488 40 ) 
109:                     #name: #cyanPercent 
110:                     #isOpaque: true 
111:                     #model: #cyanGauge 
112:                     #direction: #horizontal 
113:                     #position: #topLeft 
114:                     #area: true 
115:                     #reverse: false ) 
116:                 #(#{UI.ProgressWidgetSpec} 
117:                     #layout: #(#{Graphics.Rectangle} 232 49 488 72 ) 
118:                     #name: #magentaPercent 
119:                     #isOpaque: true 
120:                     #model: #magentaGauge 
121:                     #direction: #horizontal 
122:                     #position: #topLeft 
123:                     #area: true 
124:                     #reverse: false ) 
125:                 #(#{UI.ProgressWidgetSpec} 
126:                     #layout: #(#{Graphics.Rectangle} 232 81 488 104 ) 
127:                     #name: #yellowPercent 
128:                     #isOpaque: true 
129:                     #model: #yellowGauge 
130:                     #direction: #horizontal 
131:                     #position: #topLeft 
132:                     #area: true 
133:                     #reverse: false ) 
134:                 #(#{UI.SpinButtonSpec} 
135:                     #layout: #(#{Graphics.Rectangle} 112 17 208 40 ) 
136:                     #name: #cyanGauge 
137:                     #colors: 
138:                     #(#{UI.LookPreferences} 
139:                         #setBackgroundColor: #(#{Graphics.ColorValue} 6143 8191 8191 ) 
140:                         #setSelectionBackgroundColor: #(#{Graphics.ColorValue} 6143 8191 8191 ) ) 
141:                     #model: #cyanGauge 
142:                     #tabable: false 
143:                     #alignment: #center 
144:                     #type: #number 
145:                     #low: 0 
146:                     #high: 1 
147:                     #interval: 0.01 ) 
148:                 #(#{UI.SpinButtonSpec} 
149:                     #layout: #(#{Graphics.Rectangle} 112 49 208 72 ) 
150:                     #name: #magentaGauge 
151:                     #colors: 
152:                     #(#{UI.LookPreferences} 
153:                         #setBackgroundColor: #(#{Graphics.ColorValue} 8191 6143 8191 ) 
154:                         #setSelectionBackgroundColor: #(#{Graphics.ColorValue} 8191 6143 8191 ) ) 
155:                     #model: #magentaGauge 
156:                     #tabable: false 
157:                     #alignment: #center 
158:                     #type: #number 
159:                     #low: 0 
160:                     #high: 1 
161:                     #interval: 0.01 ) 
162:                 #(#{UI.SpinButtonSpec} 
163:                     #layout: #(#{Graphics.Rectangle} 112 81 208 104 ) 
164:                     #name: #yellowGauge 
165:                     #colors: 
166:                     #(#{UI.LookPreferences} 
167:                         #setBackgroundColor: #(#{Graphics.ColorValue} 8191 8191 6143 ) 
168:                         #setSelectionBackgroundColor: #(#{Graphics.ColorValue} 8191 8191 6143 ) ) 
169:                     #model: #yellowGauge 
170:                     #tabable: false 
171:                     #alignment: #center 
172:                     #type: #number 
173:                     #low: 0 
174:                     #high: 1 
175:                     #interval: 0.01 ) ) ) )
176: 
177: ================================================================================

This document was generated by KSU.TextDoclet on 2012/11/10 at 10:56:49.