Statistics
| Revision:

root / trunk / libraries / libUI / src / org / gvsig / gui / beans / swing / jComboBoxWithImageIconItems / ImageIconItemInfo.java @ 10136

History | View | Annotate | Download (3.2 KB)

1
package org.gvsig.gui.beans.swing.jComboBoxWithImageIconItems;
2

    
3
import java.io.Serializable;
4

    
5
import javax.swing.ImageIcon;
6

    
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47

    
48

    
49

    
50
/**
51
 * This class represents the necessary information about each image icon item of 'JPanelWithJComboBoxImageIconItems'
52
 * 
53
 * @author Pablo Piqueras Bartolom? (p_queras@hotmail.com)
54
 */
55
public class ImageIconItemInfo implements Serializable {
56
        private static final long serialVersionUID = -7087121873703006781L;
57

    
58
        private ImageIcon imageIcon;
59
        private String toolTipText;
60
        
61
        /* This other attribute it's necessary because it's possible that the image icon couldn't be
62
             loaded and then in this case could be impossible to know the path after */
63
        private String path;
64

    
65
        /**
66
         * Default constructor without parameters
67
         */
68
        public ImageIconItemInfo() {
69
                path = null;
70
                imageIcon = null;
71
                toolTipText = null;
72
        }
73
        
74
        /**
75
         * Default constructor with two parameters
76
         * 
77
         * @param path Path to the image icon
78
         * @param image_Icon The image icon
79
         * @param text The tool tip text
80
         */
81
        public ImageIconItemInfo(String image_Icon_Path, ImageIcon image_Icon, String text) {
82
                path = image_Icon_Path;
83
                imageIcon = image_Icon;
84
                toolTipText = text;
85
        }
86

    
87
        /**
88
         * Gets the image icon object reference
89
         * 
90
         * @return the imageIcon
91
         */
92
        public ImageIcon getImageIcon() {
93
                return imageIcon;
94
        }
95

    
96
        /**
97
         * Sets the image icon object reference
98
         * 
99
         * @param imageIcon the imageIcon to set
100
         */
101
        public void setImageIcon(ImageIcon imageIcon) {
102
                this.imageIcon = imageIcon;
103
        }
104

    
105
        /**
106
         * Gets the path
107
         * 
108
         * @return the path
109
         */
110
        public String getPath() {
111
                return path;
112
        }
113

    
114
        /**
115
         * Sets the path
116
         * 
117
         * @param path the path to set
118
         */
119
        public void setPath(String path) {
120
                this.path = path;
121
        }
122
        
123
        /**
124
         * Gets the tool tip text
125
         * 
126
         * @return text the tool tip text to this icon image
127
         */
128
        public String getToolTipText() {
129
                return this.toolTipText;
130
        }
131
        
132
        /**
133
         * Sets the tool tip text
134
         * 
135
         * @param text the tool tip text to this icon image
136
         */
137
        public void setToolTipText(String text) {
138
                this.toolTipText = text;
139
        }
140
}