Revision 38873 branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/coordinatespanel/CoordinatesPanel.java

View differences:

CoordinatesPanel.java
23 23
import java.awt.GridBagConstraints;
24 24
import java.awt.GridBagLayout;
25 25
import java.awt.Insets;
26
import java.net.URL;
26 27
import java.util.ArrayList;
27 28
import java.util.EventObject;
28 29
import java.util.Iterator;
......
40 41
 * @version 06/09/2007
41 42
 * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
42 43
 */
44
@SuppressWarnings("unchecked")
43 45
public class CoordinatesPanel extends JPanel implements DataInputContainerListener {
44 46
	private static final long  serialVersionUID       = 3336324382874763427L;
45 47
	private String             pathToImages           = "images/";
......
133 135

  
134 136
	private JLabel getLTitulo1(){
135 137
		if (lTitulo1 == null){
136
			lTitulo1 = new JLabel(new ImageIcon(getClass().getResource(pathToImages + "upleft.png")));
138
			URL resource = getClass().getResource(pathToImages + "upleft.png");
139
			if(resource != null) {
140
				ImageIcon icon = new ImageIcon(resource);
141
				lTitulo1 = new JLabel(icon);
142
			} else
143
				lTitulo1 = new JLabel();
137 144
		}
138 145
		return lTitulo1;
139 146
	}
140 147

  
141
	private JLabel getLTitulo2(){
148
	private JLabel getLTitulo2() {
142 149
		if (lTitulo2 == null){
143
			lTitulo2 = new JLabel(new ImageIcon(getClass().getResource(pathToImages + "downright.png")));
150
			if (lTitulo2 == null){
151
				URL resource = getClass().getResource(pathToImages + "downright.png");
152
				if(resource != null) {
153
					ImageIcon icon = new ImageIcon(resource);
154
					lTitulo2 = new JLabel(icon);
155
				} else
156
					lTitulo2 = new JLabel();
157
			}
144 158
		}
145 159
		return lTitulo2;
146 160
	}
......
207 221
	 * @param titlePanel
208 222
	 */
209 223
	public void setTitlePanel(String titlePanel) {
210
		getPCoord().setBorder(BorderFactory.createTitledBorder(null, titlePanel, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.PLAIN, 10), null));
224
		getPCoord().setBorder(BorderFactory.createTitledBorder(null, titlePanel, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.PLAIN, 12), null));
211 225
	}
212 226

  
213 227
	/**

Also available in: Unified diff