File: DropDownIcon.java

package info (click to toggle)
libtoolbar-java 1.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 240 kB
  • ctags: 413
  • sloc: java: 2,284; xml: 64; makefile: 10
file content (44 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * DropDownIcon.java
 *
 * Created on 25 February 2003, 22:12
 */

package org.tigris.toolbar.toolbutton;

import javax.swing.ImageIcon;

/**
 * An implementation of a decorated icon which adds a drop down decoration
 * to the given icon
 *
 * @author Bob Tarling
 */
public class DropDownIcon extends DecoratedIcon {

    private static final int[][] standardBuffer = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0},
        {0, 0, 1, 1, 1, 1, 1, 1, 3, 3, 0},
        {0, 0, 0, 1, 1, 1, 1, 3, 3, 0, 0},
        {0, 0, 0, 0, 1, 1, 3, 3, 0, 0, 0},
        {0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    };


    /** Creates a new instance of DropDownIcon */
    DropDownIcon(ImageIcon imageIcon) {
        super(imageIcon);
        init(standardBuffer);
    }
}