1 /*
2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 package javax.swing.colorchooser;
27 
28 import javax.swing.*;
29 import javax.swing.border.*;
30 import javax.swing.event.*;
31 import java.awt.*;
32 import java.awt.image.*;
33 import java.awt.event.*;
34 import java.beans.PropertyChangeEvent;
35 import java.beans.PropertyChangeListener;
36 import java.io.Serializable;
37 import javax.accessibility.*;
38 
39 
40 /**
41  * The standard color swatch chooser.
42  * <p>
43  * <strong>Warning:</strong>
44  * Serialized objects of this class will not be compatible with
45  * future Swing releases. The current serialization support is
46  * appropriate for short term storage or RMI between applications running
47  * the same version of Swing.  As of 1.4, support for long term storage
48  * of all JavaBeans&trade;
49  * has been added to the <code>java.beans</code> package.
50  * Please see {@link java.beans.XMLEncoder}.
51  *
52  * @author Steve Wilson
53  */
54 class DefaultSwatchChooserPanel extends AbstractColorChooserPanel {
55 
56     SwatchPanel swatchPanel;
57     RecentSwatchPanel recentSwatchPanel;
58     MouseListener mainSwatchListener;
59     MouseListener recentSwatchListener;
60     private KeyListener mainSwatchKeyListener;
61     private KeyListener recentSwatchKeyListener;
62 
DefaultSwatchChooserPanel()63     public DefaultSwatchChooserPanel() {
64         super();
65         setInheritsPopupMenu(true);
66     }
67 
getDisplayName()68     public String getDisplayName() {
69         return UIManager.getString("ColorChooser.swatchesNameText", getLocale());
70     }
71 
72     /**
73      * Provides a hint to the look and feel as to the
74      * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to
75      * access the panel. A return value <= 0 indicates there is no mnemonic.
76      * <p>
77      * The return value here is a hint, it is ultimately up to the look
78      * and feel to honor the return value in some meaningful way.
79      * <p>
80      * This implementation looks up the value from the default
81      * <code>ColorChooser.swatchesMnemonic</code>, or if it
82      * isn't available (or not an <code>Integer</code>) returns -1.
83      * The lookup for the default is done through the <code>UIManager</code>:
84      * <code>UIManager.get("ColorChooser.swatchesMnemonic");</code>.
85      *
86      * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no
87      *         mnemonic
88      * @see #getDisplayedMnemonicIndex
89      * @since 1.4
90      */
getMnemonic()91     public int getMnemonic() {
92         return getInt("ColorChooser.swatchesMnemonic", -1);
93     }
94 
95     /**
96      * Provides a hint to the look and feel as to the index of the character in
97      * <code>getDisplayName</code> that should be visually identified as the
98      * mnemonic. The look and feel should only use this if
99      * <code>getMnemonic</code> returns a value > 0.
100      * <p>
101      * The return value here is a hint, it is ultimately up to the look
102      * and feel to honor the return value in some meaningful way. For example,
103      * a look and feel may wish to render each
104      * <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>,
105      * and further use this return value to underline a character in
106      * the <code>getDisplayName</code>.
107      * <p>
108      * This implementation looks up the value from the default
109      * <code>ColorChooser.rgbDisplayedMnemonicIndex</code>, or if it
110      * isn't available (or not an <code>Integer</code>) returns -1.
111      * The lookup for the default is done through the <code>UIManager</code>:
112      * <code>UIManager.get("ColorChooser.swatchesDisplayedMnemonicIndex");</code>.
113      *
114      * @return Character index to render mnemonic for; -1 to provide no
115      *                   visual identifier for this panel.
116      * @see #getMnemonic
117      * @since 1.4
118      */
getDisplayedMnemonicIndex()119     public int getDisplayedMnemonicIndex() {
120         return getInt("ColorChooser.swatchesDisplayedMnemonicIndex", -1);
121     }
122 
getSmallDisplayIcon()123     public Icon getSmallDisplayIcon() {
124         return null;
125     }
126 
getLargeDisplayIcon()127     public Icon getLargeDisplayIcon() {
128         return null;
129     }
130 
131     /**
132      * The background color, foreground color, and font are already set to the
133      * defaults from the defaults table before this method is called.
134      */
installChooserPanel(JColorChooser enclosingChooser)135     public void installChooserPanel(JColorChooser enclosingChooser) {
136         super.installChooserPanel(enclosingChooser);
137     }
138 
buildChooser()139     protected void buildChooser() {
140 
141         String recentStr = UIManager.getString("ColorChooser.swatchesRecentText", getLocale());
142 
143         GridBagLayout gb = new GridBagLayout();
144         GridBagConstraints gbc = new GridBagConstraints();
145         JPanel superHolder = new JPanel(gb);
146 
147         swatchPanel =  new MainSwatchPanel();
148         swatchPanel.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY,
149                                       getDisplayName());
150         swatchPanel.setInheritsPopupMenu(true);
151 
152         recentSwatchPanel = new RecentSwatchPanel();
153         recentSwatchPanel.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY,
154                                             recentStr);
155 
156         mainSwatchKeyListener = new MainSwatchKeyListener();
157         mainSwatchListener = new MainSwatchListener();
158         swatchPanel.addMouseListener(mainSwatchListener);
159         swatchPanel.addKeyListener(mainSwatchKeyListener);
160         recentSwatchListener = new RecentSwatchListener();
161         recentSwatchKeyListener = new RecentSwatchKeyListener();
162         recentSwatchPanel.addMouseListener(recentSwatchListener);
163         recentSwatchPanel.addKeyListener(recentSwatchKeyListener);
164 
165         JPanel mainHolder = new JPanel(new BorderLayout());
166         Border border = new CompoundBorder( new LineBorder(Color.black),
167                                             new LineBorder(Color.white) );
168         mainHolder.setBorder(border);
169         mainHolder.add(swatchPanel, BorderLayout.CENTER);
170 
171         gbc.anchor = GridBagConstraints.LAST_LINE_START;
172         gbc.gridwidth = 1;
173         gbc.gridheight = 2;
174         Insets oldInsets = gbc.insets;
175         gbc.insets = new Insets(0, 0, 0, 10);
176         superHolder.add(mainHolder, gbc);
177         gbc.insets = oldInsets;
178 
179         recentSwatchPanel.setInheritsPopupMenu(true);
180         JPanel recentHolder = new JPanel( new BorderLayout() );
181         recentHolder.setBorder(border);
182         recentHolder.setInheritsPopupMenu(true);
183         recentHolder.add(recentSwatchPanel, BorderLayout.CENTER);
184 
185         JLabel l = new JLabel(recentStr);
186         l.setLabelFor(recentSwatchPanel);
187 
188         gbc.gridwidth = GridBagConstraints.REMAINDER;
189         gbc.gridheight = 1;
190         gbc.weighty = 1.0;
191         superHolder.add(l, gbc);
192 
193         gbc.weighty = 0;
194         gbc.gridheight = GridBagConstraints.REMAINDER;
195         gbc.insets = new Insets(0, 0, 0, 2);
196         superHolder.add(recentHolder, gbc);
197         superHolder.setInheritsPopupMenu(true);
198 
199         add(superHolder);
200     }
201 
uninstallChooserPanel(JColorChooser enclosingChooser)202     public void uninstallChooserPanel(JColorChooser enclosingChooser) {
203         super.uninstallChooserPanel(enclosingChooser);
204         swatchPanel.removeMouseListener(mainSwatchListener);
205         swatchPanel.removeKeyListener(mainSwatchKeyListener);
206         recentSwatchPanel.removeMouseListener(recentSwatchListener);
207         recentSwatchPanel.removeKeyListener(recentSwatchKeyListener);
208 
209         swatchPanel = null;
210         recentSwatchPanel = null;
211         mainSwatchListener = null;
212         mainSwatchKeyListener = null;
213         recentSwatchListener = null;
214         recentSwatchKeyListener = null;
215 
216         removeAll();  // strip out all the sub-components
217     }
218 
updateChooser()219     public void updateChooser() {
220 
221     }
222 
223 
224     private class RecentSwatchKeyListener extends KeyAdapter {
keyPressed(KeyEvent e)225         public void keyPressed(KeyEvent e) {
226             if (KeyEvent.VK_SPACE == e.getKeyCode()) {
227                 Color color = recentSwatchPanel.getSelectedColor();
228                 setSelectedColor(color);
229             }
230         }
231     }
232 
233     private class MainSwatchKeyListener extends KeyAdapter {
keyPressed(KeyEvent e)234         public void keyPressed(KeyEvent e) {
235             if (KeyEvent.VK_SPACE == e.getKeyCode()) {
236                 Color color = swatchPanel.getSelectedColor();
237                 setSelectedColor(color);
238                 recentSwatchPanel.setMostRecentColor(color);
239             }
240         }
241     }
242 
243     class RecentSwatchListener extends MouseAdapter implements Serializable {
mousePressed(MouseEvent e)244         public void mousePressed(MouseEvent e) {
245             if (isEnabled()) {
246                 Color color = recentSwatchPanel.getColorForLocation(e.getX(), e.getY());
247                 recentSwatchPanel.setSelectedColorFromLocation(e.getX(), e.getY());
248                 setSelectedColor(color);
249                 recentSwatchPanel.requestFocusInWindow();
250             }
251         }
252     }
253 
254     class MainSwatchListener extends MouseAdapter implements Serializable {
mousePressed(MouseEvent e)255         public void mousePressed(MouseEvent e) {
256             if (isEnabled()) {
257                 Color color = swatchPanel.getColorForLocation(e.getX(), e.getY());
258                 setSelectedColor(color);
259                 swatchPanel.setSelectedColorFromLocation(e.getX(), e.getY());
260                 recentSwatchPanel.setMostRecentColor(color);
261                 swatchPanel.requestFocusInWindow();
262             }
263         }
264     }
265 
266 }
267 
268 
269 
270 class SwatchPanel extends JPanel {
271 
272     protected Color[] colors;
273     protected Dimension swatchSize;
274     protected Dimension numSwatches;
275     protected Dimension gap;
276 
277     private int selRow;
278     private int selCol;
279 
SwatchPanel()280     public SwatchPanel() {
281         initValues();
282         initColors();
283         setToolTipText(""); // register for events
284         setOpaque(true);
285         setBackground(Color.white);
286         setFocusable(true);
287         setInheritsPopupMenu(true);
288 
289         addFocusListener(new FocusAdapter() {
290             public void focusGained(FocusEvent e) {
291                 repaint();
292             }
293 
294             public void focusLost(FocusEvent e) {
295                 repaint();
296             }
297         });
298 
299         addKeyListener(new KeyAdapter() {
300             public void keyPressed(KeyEvent e) {
301                 int typed = e.getKeyCode();
302                 switch (typed) {
303                     case KeyEvent.VK_UP:
304                         if (selRow > 0) {
305                             selRow--;
306                             repaint();
307                         }
308                         break;
309                     case KeyEvent.VK_DOWN:
310                         if (selRow < numSwatches.height - 1) {
311                             selRow++;
312                             repaint();
313                         }
314                         break;
315                     case KeyEvent.VK_LEFT:
316                         if (selCol > 0 && SwatchPanel.this.getComponentOrientation().isLeftToRight()) {
317                             selCol--;
318                             repaint();
319                         } else if (selCol < numSwatches.width - 1
320                                 && !SwatchPanel.this.getComponentOrientation().isLeftToRight()) {
321                             selCol++;
322                             repaint();
323                         }
324                         break;
325                     case KeyEvent.VK_RIGHT:
326                         if (selCol < numSwatches.width - 1
327                                 && SwatchPanel.this.getComponentOrientation().isLeftToRight()) {
328                             selCol++;
329                             repaint();
330                         } else if (selCol > 0 && !SwatchPanel.this.getComponentOrientation().isLeftToRight()) {
331                             selCol--;
332                             repaint();
333                         }
334                         break;
335                     case KeyEvent.VK_HOME:
336                         selCol = 0;
337                         selRow = 0;
338                         repaint();
339                         break;
340                     case KeyEvent.VK_END:
341                         selCol = numSwatches.width - 1;
342                         selRow = numSwatches.height - 1;
343                         repaint();
344                         break;
345                 }
346             }
347         });
348     }
349 
getSelectedColor()350     public Color getSelectedColor() {
351         return getColorForCell(selCol, selRow);
352     }
353 
initValues()354     protected void initValues() {
355 
356     }
357 
paintComponent(Graphics g)358     public void paintComponent(Graphics g) {
359          g.setColor(getBackground());
360          g.fillRect(0,0,getWidth(), getHeight());
361          for (int row = 0; row < numSwatches.height; row++) {
362             int y = row * (swatchSize.height + gap.height);
363             for (int column = 0; column < numSwatches.width; column++) {
364                 Color c = getColorForCell(column, row);
365                 g.setColor(c);
366                 int x;
367                 if (!this.getComponentOrientation().isLeftToRight()) {
368                     x = (numSwatches.width - column - 1) * (swatchSize.width + gap.width);
369                 } else {
370                     x = column * (swatchSize.width + gap.width);
371                 }
372                 g.fillRect( x, y, swatchSize.width, swatchSize.height);
373                 g.setColor(Color.black);
374                 g.drawLine( x+swatchSize.width-1, y, x+swatchSize.width-1, y+swatchSize.height-1);
375                 g.drawLine( x, y+swatchSize.height-1, x+swatchSize.width-1, y+swatchSize.height-1);
376 
377                 if (selRow == row && selCol == column && this.isFocusOwner()) {
378                     Color c2 = new Color(c.getRed() < 125 ? 255 : 0,
379                             c.getGreen() < 125 ? 255 : 0,
380                             c.getBlue() < 125 ? 255 : 0);
381                     g.setColor(c2);
382 
383                     g.drawLine(x, y, x + swatchSize.width - 1, y);
384                     g.drawLine(x, y, x, y + swatchSize.height - 1);
385                     g.drawLine(x + swatchSize.width - 1, y, x + swatchSize.width - 1, y + swatchSize.height - 1);
386                     g.drawLine(x, y + swatchSize.height - 1, x + swatchSize.width - 1, y + swatchSize.height - 1);
387                     g.drawLine(x, y, x + swatchSize.width - 1, y + swatchSize.height - 1);
388                     g.drawLine(x, y + swatchSize.height - 1, x + swatchSize.width - 1, y);
389                 }
390             }
391          }
392     }
393 
getPreferredSize()394     public Dimension getPreferredSize() {
395         int x = numSwatches.width * (swatchSize.width + gap.width) - 1;
396         int y = numSwatches.height * (swatchSize.height + gap.height) - 1;
397         return new Dimension( x, y );
398     }
399 
initColors()400     protected void initColors() {
401 
402 
403     }
404 
getToolTipText(MouseEvent e)405     public String getToolTipText(MouseEvent e) {
406         Color color = getColorForLocation(e.getX(), e.getY());
407         return color.getRed()+", "+ color.getGreen() + ", " + color.getBlue();
408     }
409 
setSelectedColorFromLocation(int x, int y)410     public void setSelectedColorFromLocation(int x, int y) {
411         if (!this.getComponentOrientation().isLeftToRight()) {
412             selCol = numSwatches.width - x / (swatchSize.width + gap.width) - 1;
413         } else {
414             selCol = x / (swatchSize.width + gap.width);
415         }
416         selRow = y / (swatchSize.height + gap.height);
417         repaint();
418     }
419 
getColorForLocation( int x, int y )420     public Color getColorForLocation( int x, int y ) {
421         int column;
422         if (!this.getComponentOrientation().isLeftToRight()) {
423             column = numSwatches.width - x / (swatchSize.width + gap.width) - 1;
424         } else {
425             column = x / (swatchSize.width + gap.width);
426         }
427         int row = y / (swatchSize.height + gap.height);
428         return getColorForCell(column, row);
429     }
430 
getColorForCell( int column, int row)431     private Color getColorForCell( int column, int row) {
432         return colors[ (row * numSwatches.width) + column ]; // (STEVE) - change data orientation here
433     }
434 
435 
436 
437 
438 }
439 
440 class RecentSwatchPanel extends SwatchPanel {
initValues()441     protected void initValues() {
442         swatchSize = UIManager.getDimension("ColorChooser.swatchesRecentSwatchSize", getLocale());
443         numSwatches = new Dimension( 5, 7 );
444         gap = new Dimension(1, 1);
445     }
446 
447 
initColors()448     protected void initColors() {
449         Color defaultRecentColor = UIManager.getColor("ColorChooser.swatchesDefaultRecentColor", getLocale());
450         int numColors = numSwatches.width * numSwatches.height;
451 
452         colors = new Color[numColors];
453         for (int i = 0; i < numColors ; i++) {
454             colors[i] = defaultRecentColor;
455         }
456     }
457 
setMostRecentColor(Color c)458     public void setMostRecentColor(Color c) {
459 
460         System.arraycopy( colors, 0, colors, 1, colors.length-1);
461         colors[0] = c;
462         repaint();
463     }
464 
465 }
466 
467 class MainSwatchPanel extends SwatchPanel {
468 
469 
initValues()470     protected void initValues() {
471         swatchSize = UIManager.getDimension("ColorChooser.swatchesSwatchSize", getLocale());
472         numSwatches = new Dimension( 31, 9 );
473         gap = new Dimension(1, 1);
474     }
475 
initColors()476     protected void initColors() {
477         int[] rawValues = initRawValues();
478         int numColors = rawValues.length / 3;
479 
480         colors = new Color[numColors];
481         for (int i = 0; i < numColors ; i++) {
482             colors[i] = new Color( rawValues[(i*3)], rawValues[(i*3)+1], rawValues[(i*3)+2] );
483         }
484     }
485 
initRawValues()486     private int[] initRawValues() {
487 
488         int[] rawValues = {
489 255, 255, 255, // first row.
490 204, 255, 255,
491 204, 204, 255,
492 204, 204, 255,
493 204, 204, 255,
494 204, 204, 255,
495 204, 204, 255,
496 204, 204, 255,
497 204, 204, 255,
498 204, 204, 255,
499 204, 204, 255,
500 255, 204, 255,
501 255, 204, 204,
502 255, 204, 204,
503 255, 204, 204,
504 255, 204, 204,
505 255, 204, 204,
506 255, 204, 204,
507 255, 204, 204,
508 255, 204, 204,
509 255, 204, 204,
510 255, 255, 204,
511 204, 255, 204,
512 204, 255, 204,
513 204, 255, 204,
514 204, 255, 204,
515 204, 255, 204,
516 204, 255, 204,
517 204, 255, 204,
518 204, 255, 204,
519 204, 255, 204,
520 204, 204, 204,  // second row.
521 153, 255, 255,
522 153, 204, 255,
523 153, 153, 255,
524 153, 153, 255,
525 153, 153, 255,
526 153, 153, 255,
527 153, 153, 255,
528 153, 153, 255,
529 153, 153, 255,
530 204, 153, 255,
531 255, 153, 255,
532 255, 153, 204,
533 255, 153, 153,
534 255, 153, 153,
535 255, 153, 153,
536 255, 153, 153,
537 255, 153, 153,
538 255, 153, 153,
539 255, 153, 153,
540 255, 204, 153,
541 255, 255, 153,
542 204, 255, 153,
543 153, 255, 153,
544 153, 255, 153,
545 153, 255, 153,
546 153, 255, 153,
547 153, 255, 153,
548 153, 255, 153,
549 153, 255, 153,
550 153, 255, 204,
551 204, 204, 204,  // third row
552 102, 255, 255,
553 102, 204, 255,
554 102, 153, 255,
555 102, 102, 255,
556 102, 102, 255,
557 102, 102, 255,
558 102, 102, 255,
559 102, 102, 255,
560 153, 102, 255,
561 204, 102, 255,
562 255, 102, 255,
563 255, 102, 204,
564 255, 102, 153,
565 255, 102, 102,
566 255, 102, 102,
567 255, 102, 102,
568 255, 102, 102,
569 255, 102, 102,
570 255, 153, 102,
571 255, 204, 102,
572 255, 255, 102,
573 204, 255, 102,
574 153, 255, 102,
575 102, 255, 102,
576 102, 255, 102,
577 102, 255, 102,
578 102, 255, 102,
579 102, 255, 102,
580 102, 255, 153,
581 102, 255, 204,
582 153, 153, 153, // fourth row
583 51, 255, 255,
584 51, 204, 255,
585 51, 153, 255,
586 51, 102, 255,
587 51, 51, 255,
588 51, 51, 255,
589 51, 51, 255,
590 102, 51, 255,
591 153, 51, 255,
592 204, 51, 255,
593 255, 51, 255,
594 255, 51, 204,
595 255, 51, 153,
596 255, 51, 102,
597 255, 51, 51,
598 255, 51, 51,
599 255, 51, 51,
600 255, 102, 51,
601 255, 153, 51,
602 255, 204, 51,
603 255, 255, 51,
604 204, 255, 51,
605 153, 255, 51,
606 102, 255, 51,
607 51, 255, 51,
608 51, 255, 51,
609 51, 255, 51,
610 51, 255, 102,
611 51, 255, 153,
612 51, 255, 204,
613 153, 153, 153, // Fifth row
614 0, 255, 255,
615 0, 204, 255,
616 0, 153, 255,
617 0, 102, 255,
618 0, 51, 255,
619 0, 0, 255,
620 51, 0, 255,
621 102, 0, 255,
622 153, 0, 255,
623 204, 0, 255,
624 255, 0, 255,
625 255, 0, 204,
626 255, 0, 153,
627 255, 0, 102,
628 255, 0, 51,
629 255, 0 , 0,
630 255, 51, 0,
631 255, 102, 0,
632 255, 153, 0,
633 255, 204, 0,
634 255, 255, 0,
635 204, 255, 0,
636 153, 255, 0,
637 102, 255, 0,
638 51, 255, 0,
639 0, 255, 0,
640 0, 255, 51,
641 0, 255, 102,
642 0, 255, 153,
643 0, 255, 204,
644 102, 102, 102, // sixth row
645 0, 204, 204,
646 0, 204, 204,
647 0, 153, 204,
648 0, 102, 204,
649 0, 51, 204,
650 0, 0, 204,
651 51, 0, 204,
652 102, 0, 204,
653 153, 0, 204,
654 204, 0, 204,
655 204, 0, 204,
656 204, 0, 204,
657 204, 0, 153,
658 204, 0, 102,
659 204, 0, 51,
660 204, 0, 0,
661 204, 51, 0,
662 204, 102, 0,
663 204, 153, 0,
664 204, 204, 0,
665 204, 204, 0,
666 204, 204, 0,
667 153, 204, 0,
668 102, 204, 0,
669 51, 204, 0,
670 0, 204, 0,
671 0, 204, 51,
672 0, 204, 102,
673 0, 204, 153,
674 0, 204, 204,
675 102, 102, 102, // seventh row
676 0, 153, 153,
677 0, 153, 153,
678 0, 153, 153,
679 0, 102, 153,
680 0, 51, 153,
681 0, 0, 153,
682 51, 0, 153,
683 102, 0, 153,
684 153, 0, 153,
685 153, 0, 153,
686 153, 0, 153,
687 153, 0, 153,
688 153, 0, 153,
689 153, 0, 102,
690 153, 0, 51,
691 153, 0, 0,
692 153, 51, 0,
693 153, 102, 0,
694 153, 153, 0,
695 153, 153, 0,
696 153, 153, 0,
697 153, 153, 0,
698 153, 153, 0,
699 102, 153, 0,
700 51, 153, 0,
701 0, 153, 0,
702 0, 153, 51,
703 0, 153, 102,
704 0, 153, 153,
705 0, 153, 153,
706 51, 51, 51, // eigth row
707 0, 102, 102,
708 0, 102, 102,
709 0, 102, 102,
710 0, 102, 102,
711 0, 51, 102,
712 0, 0, 102,
713 51, 0, 102,
714 102, 0, 102,
715 102, 0, 102,
716 102, 0, 102,
717 102, 0, 102,
718 102, 0, 102,
719 102, 0, 102,
720 102, 0, 102,
721 102, 0, 51,
722 102, 0, 0,
723 102, 51, 0,
724 102, 102, 0,
725 102, 102, 0,
726 102, 102, 0,
727 102, 102, 0,
728 102, 102, 0,
729 102, 102, 0,
730 102, 102, 0,
731 51, 102, 0,
732 0, 102, 0,
733 0, 102, 51,
734 0, 102, 102,
735 0, 102, 102,
736 0, 102, 102,
737 0, 0, 0, // ninth row
738 0, 51, 51,
739 0, 51, 51,
740 0, 51, 51,
741 0, 51, 51,
742 0, 51, 51,
743 0, 0, 51,
744 51, 0, 51,
745 51, 0, 51,
746 51, 0, 51,
747 51, 0, 51,
748 51, 0, 51,
749 51, 0, 51,
750 51, 0, 51,
751 51, 0, 51,
752 51, 0, 51,
753 51, 0, 0,
754 51, 51, 0,
755 51, 51, 0,
756 51, 51, 0,
757 51, 51, 0,
758 51, 51, 0,
759 51, 51, 0,
760 51, 51, 0,
761 51, 51, 0,
762 0, 51, 0,
763 0, 51, 51,
764 0, 51, 51,
765 0, 51, 51,
766 0, 51, 51,
767 51, 51, 51 };
768         return rawValues;
769     }
770 }
771