Revision 19361 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/enhanced/graphics/InputHistogram.java

View differences:

InputHistogram.java
23 23
import java.awt.GridBagConstraints;
24 24
import java.awt.GridBagLayout;
25 25

  
26
import javax.swing.JLabel;
27 26
import javax.swing.JPanel;
28 27

  
29 28
import org.gvsig.raster.beans.canvas.DrawableElement;
......
34 33
import org.gvsig.raster.beans.canvas.layers.StraightLine;
35 34
import org.gvsig.raster.dataset.properties.DatasetColorInterpretation;
36 35
import org.gvsig.raster.datastruct.Histogram;
37
import org.gvsig.raster.util.RasterToolsUtil;
38 36
import org.gvsig.rastertools.enhanced.ui.EnhancedListener;
39

  
40 37
/**
41 38
 * Componente con el histograma de entrada.
42 39
 * 
......
44 41
 * @author Nacho Brodin nachobrodin@gmail.com
45 42
 */
46 43
public class InputHistogram extends HistogramGraphicBase {
47
	private static final long                serialVersionUID   = 1L;
48
	
44
	private static final long serialVersionUID = 681848373747974757L;
49 45
	private MinMaxLines                      minMaxLines        = null; 
50 46
	private Color                            minmaxColor        = Color.WHITE;
51 47
	private DrawableElement                  dElement           = null;
......
66 62
			
67 63
		dElement = new StraightLine(Color.YELLOW);
68 64
		this.setLayout(new BorderLayout());
69
		this.add(getNorthPanel(), BorderLayout.NORTH);
70 65
		this.add(getCanvas(), BorderLayout.CENTER);
71 66
		this.add(getSouthPanel(), BorderLayout.SOUTH);
72 67
	}
73 68
	
74 69
	/*
75 70
	 * (non-Javadoc)
76
	 * @see org.gvsig.rastertools.enhanced.graphics.HistogramGraphicBase#getNorthPanel()
77
	 */
78
	public JPanel getNorthPanel() {
79
		if(north == null) {
80
			north = new JPanel();
81
			north.setLayout(new BorderLayout());
82
			north.add(getSlider(), BorderLayout.CENTER);
83
			north.add(new JLabel(RasterToolsUtil.getText(null, "input_hist")), BorderLayout.NORTH);
84
		}
85
		return north;
86
	}
87
	
88
	/*
89
	 * (non-Javadoc)
90 71
	 * @see org.gvsig.rastertools.enhanced.graphics.HistogramGraphicBase#getSouthPanel()
91 72
	 */
92 73
	public JPanel getSouthPanel() {
......
130 111
	 * @param listener
131 112
	 */
132 113
	public void setListener(EnhancedListener listener) {
133
		getCanvas();
134
		minMaxLines.setActionManager(listener);
114
		getCanvas().addValueChangedListener(listener);
135 115
	}
136
}
116
}

Also available in: Unified diff