Revision 4269 trunk/extensions/extRasterTools/src/com/iver/cit/gvsig/rasterTools/saveRaster/pruebas2/InputSizeDataPanel.java

View differences:

InputSizeDataPanel.java
4 4
import javax.swing.JLabel;
5 5
import javax.swing.JTextField;
6 6
import javax.swing.JComboBox;
7

  
8
import java.awt.Color;
7 9
import java.awt.FlowLayout;
8 10

  
9 11
public class InputSizeDataPanel extends JPanel {
......
21 23
	public InputSizeDataPanel() {
22 24
		super();
23 25
		initialize();
26
		this.setActive(false);
24 27
	}
25 28

  
26 29
	/**
......
108 111
		return cbMeasureType;
109 112
	}
110 113

  
114
	/**
115
	 * Activa o desactiva las cajas de texto con los datos
116
	 * ancho y alto.
117
	 * @param active true activa los JTextBox y false los desactiva
118
	 */
119
	public void setActive(boolean active){
120
		Color backgroudColor = getBackground();
121
		
122
		this.getTWidth().setEnabled(active);
123
		this.getTHeight().setEnabled(active);
124
		this.getCbMeasureType().setEnabled(active);
125
		
126
		if(active){
127
			getTWidth().setBackground(Color.white);
128
			getTHeight().setBackground(Color.white);
129
		}else{
130
			getTWidth().setBackground(backgroudColor);
131
			getTHeight().setBackground(backgroudColor);
132
		}
133
	}
111 134
}

Also available in: Unified diff