/************************************************************************** * Copyright (c) 2001 by Acunia N.V. All rights reserved. * * * * This software is copyrighted by and is the sole property of Acunia N.V. * * and its licensors, if any. All rights, title, ownership, or other * * interests in the software remain the property of Acunia N.V. and its * * licensors, if any. * * * * This software may only be used in accordance with the corresponding * * license agreement. Any unauthorized use, duplication, transmission, * * distribution or disclosure of this software is expressly forbidden. * * * * This Copyright notice may not be removed or modified without prior * * written consent of Acunia N.V. * * * * Acunia N.V. reserves the right to modify this software without notice. * * * * Acunia N.V. * * Vanden Tymplestraat 35 info@acunia.com * * 3000 Leuven http://www.acunia.com * * Belgium - EUROPE * **************************************************************************/ // Author: D. Buytaert // Created: 2001/05/18 package com.acunia.wonka.test.awt.Image; import java.awt.*; import com.acunia.wonka.test.awt.*; public class DrawIcon extends VisualTestImpl { public static final byte[] HOME_ICON = { -119, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 50, 0, 0, 0, 48, 8, 2, 0, 0, 0, -36,-107, -66, -19, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, -61, 0, 0, 14, -61, 1, -57, 111, -88, 100, 0, 0, 4, 31, 73, 68, 65, 84, 120,-100, -51, -103, -5, 79, 20, 87, 20, -57, -17, 60, 118, -10, 85, 118,-119, 21, 121, 38, 42, -43, 70, 32, 20,-124, -74, -96, 22, 35, 15, 107, 19, 91, 34, -55, 110, 4, 83, -45, 54, -79, 17, 86, 91, 98, -78, 49, 116, 95, -94, -62, 46, -49, 125, -52, 46, 16, -64, 6, 127, -80, 86, 19,-115, -43, 25, 88, 19, -3, 19,-124, -2, -38, -33, -3, 7, -4, 7, 100, 123, -26, -98, -103, 21, -45, -2, 64,-101, 112, 47,-109,-109, -55, -20, 102, -77, -9,-109, 115, -66, -5, 61, -25, -34, 37, -31,-116, -66, -51,-120, 102, 87, -73, 25, 17, 85,-117, 102,-115, -49, -1, 48, 28, -39, -2, -9, 111, 13, -78, 19, 88, -31,-100, -15, -31, -60, -4,-125,-106,-106,-106, 93,-124, 69, -55, 86, 99, -73, 18,-124, -4,-121, -17, 103,-128, -91, 39, 23, -18, -98, -17, -9, -17, 46, -84, -44, -14, -17, 51, -55, -23, -46, -46, 82, 34, -16, -64,-118, -88, 58, -42, -21, 70, 110, 45,-108, -43, -32, 1, -18, 83, 119, -98, -87, -86, 58, 56, 56, 72, -24, -59, 45, 91, -31, 108, 30, -86, 6, 76, -88, -12,-108, -70, 56, 58, 58, -38, -48, -48, -64, 19, 11, 104, 32, 103, 0, 68,-103, 12, 73, -59, 39, -58, 7, 6, 6,-120, 117, -15, 42, -94, 78, 107, 103, -36, 103,-105, 30, -91, 82, -87, 64, 32, -48, -40, -40, -56, 25, 43, -90, -26, -15, 25, 84,-107, 81, 115, 35, -95, -21, 29, 29, 29, 30, -113, 7,-103, 4, 65, -32, -90, 45,-116, -12, -4, -35, 120, 60, -34, -41, -41, 87, 89, 89, 41, 73, 18, -49, 108, -95, -95, 67, -85,-103, 93, -4, 109, 114, 42, 113, -15, -69, 111, 107, 107, 107, -73, 50, -15, 42, -94, 6, -86,-102, 89, 126,-100, 74, -49, -2, 52, 124, -75, -87, -87, -55, -27, 114, -111, -9, -81, 29, -57, 66, 25,-127,-122, 126, -55, -23, 112, 7, 97, -47, -106,-100, 79, -86, 11, -47, 104, -12, 84, 87, -89, -57, -5, 1, 17, -55, -67, 17, -74, 88, 104, 7, -88, 116, 52, 82, 72, 85, 106, 110, 5, 36, -27, -9, -5, -85, 107, 42, 101,-101, -72, -14, -77, -80, -98, 97,-117,-123, 118, 16, 50, 38, 22, 100, -46, 64, -26, -29,-119, -79, 115, 125, -67, 21, 21, 21,-126, 36, 62,-115, 10, 111, 117, -62, 30, 75, 67, 31, -57,-100, -91,-105, -18, 79, 78, 79, 25, 50, 63, 116, 80,-106, -27, -55, -17, 9, 48, 109, -14, -64, 50, 60, 51, 70, -59, -98, 92, -6, 67, 77, 39, -81, 13, 15, 55, 55, 55, -69, -35, -18, -42, -61, 98, 65, 39,-123, 85, -87, -96,-117, 27, 42, 115, 109, 21, 3, 100, 30,-119, 68, -70, -69, 79, 123, -67, 94, 81,-108, 33, 67, 20, -53, 8, 62, -38, 50,-102, -15, -4, -81, -15, -60,-104, -49, -25, -85, -86, -87,-106, -88, -52,-127, -26, 45, 47, 44, 16, 59,-112, -91,-106, 31, 38,-109, -55, 31, 47, 95, 58, 82, -9, -79, 77,-111, -82, 124, 77, 54, 41, -51, 38, -59,-126, -25, 87,-116,-117, 8, 76, 83, 119, -12, -71, 108, -10, 122, 48, 120, -20, 120, 91, 73, 73,-119, 32, -54, 111, 30, 66, -86, 4, 4, -94, -39,-110, -2, 76, 51, -41, -42, -51, -79, -23, 96, 48, -8, 101, 79, -49, -66, -67, 123, 69, 81, 124, 121, 27,-108, 46, 22, -42, 4, -13, -82, -15, 40, -30, -75,-119, -91, -42, 79, 63, -81, 107, -88, 47, 43, -33, 39, -55, 2, 44, -7, 36, 102, -86, 10, -123, -75, 73, 13, -30, 21, -29, 108, 65, 17, -69, 122, 47, -64, 74, 14, -105, 93, -79, -53, -72, -22, 95,-117, 22, 19,-122, -58, -36, -27, -47, 26, 62, 105, -17, -74, -37, -19, -48,-110, -95,-120, -80, -86, -17, 11, 82, 88, -77, -36, -63, -72, 11, 124, 124, 43,-106, 91, 43, -81, -6, -56, -31, 112, 57, 93, 118, 36, -53, 13, 33,-109,-120, 6, -79,-111, 17, 89, 27, 4, -18, 35, -6,-121, -62, -80, -98, -35, -23, 80, 20,-123, 24, 26, 35, 47, -58, -34, 21,-111, -75, -74, -24, 110, -62, 60, 92, 56, 113, -58, 15, 70, -22, 116, 58, 37,-101, 108,-112, 9, -28, -11,-118, 41, 121, -10, -38, -62, 58, -30, -16, -98, -81, 63, -38, 14, 69, 4, 50, 44, -27,-107, -77, 88, 68, 105, 61, 45, -80, -50, -42, -5,-121, 31, 121, -17,-121, 21, 14, 122, -63, -14,-128,-122, 93,-120, -67, -28, 77, 109,-127, 83,-124, -52, -52, -23, 101, 85, -5, 21,-121, 13, 116, 6, -13, 22,-108, 50, 23, 96, -34, 124, -2, 57, -53,-121, -26, 86, 7, 2, 17, -96,-127,-124, -55,-118, 13, 57, -78, 67, -68, -79, 112, 36, 60, -7,-107, 15, -58, 101, 112, 50, 24, 6, 81, -2,-100, -79,-118, 71, 35, 71,-114, 30, 7, -31, 67, -50, 96, -65, -70, 43, -80, 80, 106, 96, 28, -98, 61, 101, 14, -89, 2, 13,-128, 16, -2, 88,-102, 101, -3, -49, 123, 47, 94,-123, 95, 35, -76, 75,-101, -43, 46, 57, 106, -53, 116, 13, 28, -16, -37, 58, -65, 17, 101, -55, -23, 54, -37, 37, 79, -55,-121, -24, 22,-115,-122, 113, -20, 118, -80, -66, 21, 58, -46, -42, 82, -14, -55, 86,-111, 9, 2, -34, -71, 20, -50, 40, 110, -89, -47, 43, -7, 74, 30, 84, 21, -91, 7,-126, -42, -26, 86, -21, -20, -19, -73,-112, 4, 110, 69, -76, 2, -79, -52,-105,-115, -97, 117, -14,-105, 60, -114, 21, 120, 48, 97, 84, 115, -50, 120, -77, -68, -6, 0, 26, 24, -97, 34, 22, -67, -66, -40, -62, -83,-103, 44, -60, -13,-105, -8, -81,-127,-121, -105, 29, 103, -4, -30, -82, -62, 42,-114, -41, 117, -51, 109, 59,-114, -11, 63,-126, -59, 63, 100, 44, -29, 111, 109, -84,-110, 77, 122, 23, 45,-115, 0, 0, 0, 0, 73, 69, 78, 68, -82, 66, 96,-126 }; class IconButton extends Button { public IconButton(String label) { super(label); } public void paint(Graphics g) { Image im = Toolkit.getDefaultToolkit().createImage(HOME_ICON); g.drawImage(im, 5, 5, null); } } class IconPanel extends Panel { public void paint(Graphics g) { Image im = Toolkit.getDefaultToolkit().createImage(HOME_ICON); g.drawImage(im, 5, 5, null); } } public DrawIcon() { setLayout(new GridLayout(2, 2)); add(new IconButton("Icon button")); add(new IconPanel()); add(new IconPanel()); add(new IconButton("Icon button")); } public String getHelpText(){ return ""; } }