1 /* 2 * Copyright (c) 1998, 2014, 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™ 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 @SuppressWarnings("serial") // Same-version serialization only 55 class DefaultSwatchChooserPanel extends AbstractColorChooserPanel { 56 57 SwatchPanel swatchPanel; 58 RecentSwatchPanel recentSwatchPanel; 59 MouseListener mainSwatchListener; 60 MouseListener recentSwatchListener; 61 private KeyListener mainSwatchKeyListener; 62 private KeyListener recentSwatchKeyListener; 63 64 public DefaultSwatchChooserPanel() { 65 super(); 66 setInheritsPopupMenu(true); 67 } 68 69 public String getDisplayName() { 70 return UIManager.getString("ColorChooser.swatchesNameText", getLocale()); 71 } 72 73 /** 74 * Provides a hint to the look and feel as to the 75 * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to 76 * access the panel. A return value <= 0 indicates there is no mnemonic. 77 * <p> 78 * The return value here is a hint, it is ultimately up to the look 79 * and feel to honor the return value in some meaningful way. 80 * <p> 81 * This implementation looks up the value from the default 82 * <code>ColorChooser.swatchesMnemonic</code>, or if it 83 * isn't available (or not an <code>Integer</code>) returns -1. 84 * The lookup for the default is done through the <code>UIManager</code>: 85 * <code>UIManager.get("ColorChooser.swatchesMnemonic");</code>. 86 * 87 * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no 88 * mnemonic 89 * @see #getDisplayedMnemonicIndex 90 * @since 1.4 91 */ 92 public int getMnemonic() { 93 return getInt("ColorChooser.swatchesMnemonic", -1); 94 } 95 96 /** 97 * Provides a hint to the look and feel as to the index of the character in 98 * <code>getDisplayName</code> that should be visually identified as the 99 * mnemonic. The look and feel should only use this if 100 * <code>getMnemonic</code> returns a value > 0. 101 * <p> 102 * The return value here is a hint, it is ultimately up to the look 103 * and feel to honor the return value in some meaningful way. For example, 104 * a look and feel may wish to render each 105 * <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>, 106 * and further use this return value to underline a character in 107 * the <code>getDisplayName</code>. 108 * <p> 109 * This implementation looks up the value from the default 110 * <code>ColorChooser.rgbDisplayedMnemonicIndex</code>, or if it 111 * isn't available (or not an <code>Integer</code>) returns -1. 112 * The lookup for the default is done through the <code>UIManager</code>: 113 * <code>UIManager.get("ColorChooser.swatchesDisplayedMnemonicIndex");</code>. 114 * 115 * @return Character index to render mnemonic for; -1 to provide no 116 * visual identifier for this panel. 117 * @see #getMnemonic 118 * @since 1.4 119 */ 120 public int getDisplayedMnemonicIndex() { 121 return getInt("ColorChooser.swatchesDisplayedMnemonicIndex", -1); 122 } 123 124 public Icon getSmallDisplayIcon() { 125 return null; 126 } 127 128 public Icon getLargeDisplayIcon() { 129 return null; 130 } 131 132 /** 133 * The background color, foreground color, and font are already set to the 134 * defaults from the defaults table before this method is called. 135 */ 136 public void installChooserPanel(JColorChooser enclosingChooser) { 137 super.installChooserPanel(enclosingChooser); 138 } 139 140 protected void buildChooser() { 141 142 String recentStr = UIManager.getString("ColorChooser.swatchesRecentText", getLocale()); 143 144 GridBagLayout gb = new GridBagLayout(); 145 GridBagConstraints gbc = new GridBagConstraints(); 146 JPanel superHolder = new JPanel(gb); 147 148 swatchPanel = new MainSwatchPanel(); 149 swatchPanel.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, 150 getDisplayName()); 151 swatchPanel.setInheritsPopupMenu(true); 152 153 recentSwatchPanel = new RecentSwatchPanel(); 154 recentSwatchPanel.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, 155 recentStr); 156 157 mainSwatchKeyListener = new MainSwatchKeyListener(); 158 mainSwatchListener = new MainSwatchListener(); 159 swatchPanel.addMouseListener(mainSwatchListener); 160 swatchPanel.addKeyListener(mainSwatchKeyListener); 161 recentSwatchListener = new RecentSwatchListener(); 162 recentSwatchKeyListener = new RecentSwatchKeyListener(); 163 recentSwatchPanel.addMouseListener(recentSwatchListener); 164 recentSwatchPanel.addKeyListener(recentSwatchKeyListener); 165 166 JPanel mainHolder = new JPanel(new BorderLayout()); 167 Border border = new CompoundBorder( new LineBorder(Color.black), 168 new LineBorder(Color.white) ); 169 mainHolder.setBorder(border); 170 mainHolder.add(swatchPanel, BorderLayout.CENTER); 171 172 gbc.anchor = GridBagConstraints.LAST_LINE_START; 173 gbc.gridwidth = 1; 174 gbc.gridheight = 2; 175 Insets oldInsets = gbc.insets; 176 gbc.insets = new Insets(0, 0, 0, 10); 177 superHolder.add(mainHolder, gbc); 178 gbc.insets = oldInsets; 179 180 recentSwatchPanel.setInheritsPopupMenu(true); 181 JPanel recentHolder = new JPanel( new BorderLayout() ); 182 recentHolder.setBorder(border); 183 recentHolder.setInheritsPopupMenu(true); 184 recentHolder.add(recentSwatchPanel, BorderLayout.CENTER); 185 186 JLabel l = new JLabel(recentStr); 187 l.setLabelFor(recentSwatchPanel); 188 189 gbc.gridwidth = GridBagConstraints.REMAINDER; 190 gbc.gridheight = 1; 191 gbc.weighty = 1.0; 192 superHolder.add(l, gbc); 193 194 gbc.weighty = 0; 195 gbc.gridheight = GridBagConstraints.REMAINDER; 196 gbc.insets = new Insets(0, 0, 0, 2); 197 superHolder.add(recentHolder, gbc); 198 superHolder.setInheritsPopupMenu(true); 199 200 add(superHolder); 201 } 202 203 public void uninstallChooserPanel(JColorChooser enclosingChooser) { 204 super.uninstallChooserPanel(enclosingChooser); 205 swatchPanel.removeMouseListener(mainSwatchListener); 206 swatchPanel.removeKeyListener(mainSwatchKeyListener); 207 recentSwatchPanel.removeMouseListener(recentSwatchListener); 208 recentSwatchPanel.removeKeyListener(recentSwatchKeyListener); 209 210 swatchPanel = null; 211 recentSwatchPanel = null; 212 mainSwatchListener = null; 213 mainSwatchKeyListener = null; 214 recentSwatchListener = null; 215 recentSwatchKeyListener = null; 216 217 removeAll(); // strip out all the sub-components 218 } 219 220 public void updateChooser() { 221 222 } 223 224 225 private class RecentSwatchKeyListener extends KeyAdapter { 226 public void keyPressed(KeyEvent e) { 227 if (KeyEvent.VK_SPACE == e.getKeyCode()) { 228 Color color = recentSwatchPanel.getSelectedColor(); 229 setSelectedColor(color); 230 } 231 } 232 } 233 234 private class MainSwatchKeyListener extends KeyAdapter { 235 public void keyPressed(KeyEvent e) { 236 if (KeyEvent.VK_SPACE == e.getKeyCode()) { 237 Color color = swatchPanel.getSelectedColor(); 238 setSelectedColor(color); 239 recentSwatchPanel.setMostRecentColor(color); 240 } 241 } 242 } 243 244 class RecentSwatchListener extends MouseAdapter implements Serializable { 245 public void mousePressed(MouseEvent e) { 246 if (isEnabled()) { 247 Color color = recentSwatchPanel.getColorForLocation(e.getX(), e.getY()); 248 recentSwatchPanel.setSelectedColorFromLocation(e.getX(), e.getY()); 249 setSelectedColor(color); 250 recentSwatchPanel.requestFocusInWindow(); 251 } 252 } 253 } 254 255 class MainSwatchListener extends MouseAdapter implements Serializable { 256 public void mousePressed(MouseEvent e) { 257 if (isEnabled()) { 258 Color color = swatchPanel.getColorForLocation(e.getX(), e.getY()); 259 setSelectedColor(color); 260 swatchPanel.setSelectedColorFromLocation(e.getX(), e.getY()); 261 recentSwatchPanel.setMostRecentColor(color); 262 swatchPanel.requestFocusInWindow(); 263 } 264 } 265 } 266 267 } 268 269 @SuppressWarnings("serial") // Same-version serialization only 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 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 350 public Color getSelectedColor() { 351 return getColorForCell(selCol, selRow); 352 } 353 354 protected void initValues() { 355 356 } 357 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 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 400 protected void initColors() { 401 402 403 } 404 405 public String getToolTipText(MouseEvent e) { 406 Color color = getColorForLocation(e.getX(), e.getY()); 407 return color.getRed()+", "+ color.getGreen() + ", " + color.getBlue(); 408 } 409 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 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 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 @SuppressWarnings("serial") // Superclass is not serializable across versions 441 class RecentSwatchPanel extends SwatchPanel { 442 protected void initValues() { 443 swatchSize = UIManager.getDimension("ColorChooser.swatchesRecentSwatchSize", getLocale()); 444 numSwatches = new Dimension( 5, 7 ); 445 gap = new Dimension(1, 1); 446 } 447 448 449 protected void initColors() { 450 Color defaultRecentColor = UIManager.getColor("ColorChooser.swatchesDefaultRecentColor", getLocale()); 451 int numColors = numSwatches.width * numSwatches.height; 452 453 colors = new Color[numColors]; 454 for (int i = 0; i < numColors ; i++) { 455 colors[i] = defaultRecentColor; 456 } 457 } 458 459 public void setMostRecentColor(Color c) { 460 461 System.arraycopy( colors, 0, colors, 1, colors.length-1); 462 colors[0] = c; 463 repaint(); 464 } 465 466 } 467 468 @SuppressWarnings("serial") // Superclass is not serializable across versions 469 class MainSwatchPanel extends SwatchPanel { 470 471 472 protected void initValues() { 473 swatchSize = UIManager.getDimension("ColorChooser.swatchesSwatchSize", getLocale()); 474 numSwatches = new Dimension( 31, 9 ); 475 gap = new Dimension(1, 1); 476 } 477 478 protected void initColors() { 479 int[] rawValues = initRawValues(); 480 int numColors = rawValues.length / 3; 481 482 colors = new Color[numColors]; 483 for (int i = 0; i < numColors ; i++) { 484 colors[i] = new Color( rawValues[(i*3)], rawValues[(i*3)+1], rawValues[(i*3)+2] ); 485 } 486 } 487 488 private int[] initRawValues() { 489 490 int[] rawValues = { 491 255, 255, 255, // first row. 492 204, 255, 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 204, 204, 255, 501 204, 204, 255, 502 255, 204, 255, 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, 204, 204, 511 255, 204, 204, 512 255, 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, 255, 204, 521 204, 255, 204, 522 204, 204, 204, // second row. 523 153, 255, 255, 524 153, 204, 255, 525 153, 153, 255, 526 153, 153, 255, 527 153, 153, 255, 528 153, 153, 255, 529 153, 153, 255, 530 153, 153, 255, 531 153, 153, 255, 532 204, 153, 255, 533 255, 153, 255, 534 255, 153, 204, 535 255, 153, 153, 536 255, 153, 153, 537 255, 153, 153, 538 255, 153, 153, 539 255, 153, 153, 540 255, 153, 153, 541 255, 153, 153, 542 255, 204, 153, 543 255, 255, 153, 544 204, 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, 153, 551 153, 255, 153, 552 153, 255, 204, 553 204, 204, 204, // third row 554 102, 255, 255, 555 102, 204, 255, 556 102, 153, 255, 557 102, 102, 255, 558 102, 102, 255, 559 102, 102, 255, 560 102, 102, 255, 561 102, 102, 255, 562 153, 102, 255, 563 204, 102, 255, 564 255, 102, 255, 565 255, 102, 204, 566 255, 102, 153, 567 255, 102, 102, 568 255, 102, 102, 569 255, 102, 102, 570 255, 102, 102, 571 255, 102, 102, 572 255, 153, 102, 573 255, 204, 102, 574 255, 255, 102, 575 204, 255, 102, 576 153, 255, 102, 577 102, 255, 102, 578 102, 255, 102, 579 102, 255, 102, 580 102, 255, 102, 581 102, 255, 102, 582 102, 255, 153, 583 102, 255, 204, 584 153, 153, 153, // fourth row 585 51, 255, 255, 586 51, 204, 255, 587 51, 153, 255, 588 51, 102, 255, 589 51, 51, 255, 590 51, 51, 255, 591 51, 51, 255, 592 102, 51, 255, 593 153, 51, 255, 594 204, 51, 255, 595 255, 51, 255, 596 255, 51, 204, 597 255, 51, 153, 598 255, 51, 102, 599 255, 51, 51, 600 255, 51, 51, 601 255, 51, 51, 602 255, 102, 51, 603 255, 153, 51, 604 255, 204, 51, 605 255, 255, 51, 606 204, 255, 51, 607 153, 255, 51, 608 102, 255, 51, 609 51, 255, 51, 610 51, 255, 51, 611 51, 255, 51, 612 51, 255, 102, 613 51, 255, 153, 614 51, 255, 204, 615 153, 153, 153, // Fifth row 616 0, 255, 255, 617 0, 204, 255, 618 0, 153, 255, 619 0, 102, 255, 620 0, 51, 255, 621 0, 0, 255, 622 51, 0, 255, 623 102, 0, 255, 624 153, 0, 255, 625 204, 0, 255, 626 255, 0, 255, 627 255, 0, 204, 628 255, 0, 153, 629 255, 0, 102, 630 255, 0, 51, 631 255, 0 , 0, 632 255, 51, 0, 633 255, 102, 0, 634 255, 153, 0, 635 255, 204, 0, 636 255, 255, 0, 637 204, 255, 0, 638 153, 255, 0, 639 102, 255, 0, 640 51, 255, 0, 641 0, 255, 0, 642 0, 255, 51, 643 0, 255, 102, 644 0, 255, 153, 645 0, 255, 204, 646 102, 102, 102, // sixth row 647 0, 204, 204, 648 0, 204, 204, 649 0, 153, 204, 650 0, 102, 204, 651 0, 51, 204, 652 0, 0, 204, 653 51, 0, 204, 654 102, 0, 204, 655 153, 0, 204, 656 204, 0, 204, 657 204, 0, 204, 658 204, 0, 204, 659 204, 0, 153, 660 204, 0, 102, 661 204, 0, 51, 662 204, 0, 0, 663 204, 51, 0, 664 204, 102, 0, 665 204, 153, 0, 666 204, 204, 0, 667 204, 204, 0, 668 204, 204, 0, 669 153, 204, 0, 670 102, 204, 0, 671 51, 204, 0, 672 0, 204, 0, 673 0, 204, 51, 674 0, 204, 102, 675 0, 204, 153, 676 0, 204, 204, 677 102, 102, 102, // seventh row 678 0, 153, 153, 679 0, 153, 153, 680 0, 153, 153, 681 0, 102, 153, 682 0, 51, 153, 683 0, 0, 153, 684 51, 0, 153, 685 102, 0, 153, 686 153, 0, 153, 687 153, 0, 153, 688 153, 0, 153, 689 153, 0, 153, 690 153, 0, 153, 691 153, 0, 102, 692 153, 0, 51, 693 153, 0, 0, 694 153, 51, 0, 695 153, 102, 0, 696 153, 153, 0, 697 153, 153, 0, 698 153, 153, 0, 699 153, 153, 0, 700 153, 153, 0, 701 102, 153, 0, 702 51, 153, 0, 703 0, 153, 0, 704 0, 153, 51, 705 0, 153, 102, 706 0, 153, 153, 707 0, 153, 153, 708 51, 51, 51, // eigth row 709 0, 102, 102, 710 0, 102, 102, 711 0, 102, 102, 712 0, 102, 102, 713 0, 51, 102, 714 0, 0, 102, 715 51, 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, 102, 722 102, 0, 102, 723 102, 0, 51, 724 102, 0, 0, 725 102, 51, 0, 726 102, 102, 0, 727 102, 102, 0, 728 102, 102, 0, 729 102, 102, 0, 730 102, 102, 0, 731 102, 102, 0, 732 102, 102, 0, 733 51, 102, 0, 734 0, 102, 0, 735 0, 102, 51, 736 0, 102, 102, 737 0, 102, 102, 738 0, 102, 102, 739 0, 0, 0, // ninth row 740 0, 51, 51, 741 0, 51, 51, 742 0, 51, 51, 743 0, 51, 51, 744 0, 51, 51, 745 0, 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, 51, 754 51, 0, 51, 755 51, 0, 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 51, 51, 0, 763 51, 51, 0, 764 0, 51, 0, 765 0, 51, 51, 766 0, 51, 51, 767 0, 51, 51, 768 0, 51, 51, 769 51, 51, 51 }; 770 return rawValues; 771 } 772 }