Revision 10963

View differences:

trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/histogram/HistogramProcess.java
14 14
	
15 15
	public void run() {
16 16
		try {
17
			iHistogramable.getHistogram();
17
			iHistogramable.getHistogram().getHistogram();
18
			
18 19
		} catch (HistogramException e) {
19 20
			// TODO Auto-generated catch block
20 21
			e.printStackTrace();
......
51 52
	public String getTitle() {
52 53
		return "Calculando histograma";
53 54
	}
55

  
56
	/*
57
	 * (non-Javadoc)
58
	 * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#canceled()
59
	 */
60
	public void canceled() {
61
		this.suspend();
62
	}
63

  
64
	/*
65
	 * (non-Javadoc)
66
	 * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#closed()
67
	 */
68
	public void closed() {
69
		this.suspend();
70
	}
71

  
72
	/*
73
	 * (non-Javadoc)
74
	 * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#resumed()
75
	 */
76
	public void resumed() {
77
		this.resume();
78
	}
79

  
80
	/*
81
	 * (non-Javadoc)
82
	 * @see org.gvsig.gui.beans.incrementabletask.IIncrementable#suspended()
83
	 */
84
	public void suspended() {
85
		this.suspend();
86
	}
54 87
}
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/histogram/ui/HistogramPanel.java
21 21
import java.awt.BorderLayout;
22 22
import java.awt.GridBagConstraints;
23 23
import java.awt.GridBagLayout;
24
import java.util.Vector;
24
import java.util.ArrayList;
25 25

  
26 26
import javax.swing.JButton;
27 27
import javax.swing.JComboBox;
......
52 52
	private static final long serialVersionUID = 2772897994667886753L;
53 53

  
54 54
	private HistogramPanelListener  	histogramPanelListener = null;
55
	private Vector comboSource = new Vector();
55
	private ArrayList comboSource = new ArrayList();
56 56

  
57 57
	public static int					MAXBANDS = 10;  
58 58
	private int 						HSUP = 60;
......
486 486
	}
487 487
	
488 488
	public void setHistogramableSource(IHistogramable lyr, String name) {
489
		Vector aux = new Vector();
489
		ArrayList aux = new ArrayList();
490 490
		aux.add(lyr);
491 491
		aux.add(name);
492 492
		comboSource.add(aux);
493 493
		updateComboBoxSource();
494 494
	}
495 495

  
496
	public Vector getComboSource() {
496
	public ArrayList getComboSource() {
497 497
		return comboSource;
498 498
	}
499 499

  
500 500
	private void updateComboBoxSource() {
501 501
		getJComboBoxOrigen().removeAllItems();
502 502
		for (int i = 0; i < comboSource.size(); i++) {
503
			getJComboBoxOrigen().addItem(((Vector) comboSource.get(i)).get(1));
503
			getJComboBoxOrigen().addItem(((ArrayList) comboSource.get(i)).get(1));
504 504
		}
505 505
		
506 506
	}
507 507

  
508 508
	public void clearSources() {
509
		comboSource = new Vector();
509
		comboSource = new ArrayList();
510 510
		updateComboBoxSource();
511 511
	}
512 512
}
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/histogram/HistogramPanelListener.java
22 22
import java.awt.event.ActionListener;
23 23
import java.awt.event.KeyEvent;
24 24
import java.awt.event.KeyListener;
25
import java.util.Vector;
25
import java.util.ArrayList;
26 26

  
27 27
import javax.swing.JButton;
28 28
import javax.swing.JComboBox;
......
75 75

  
76 76
	private void updateStatistic() {
77 77
		// TODO Actualizar tabla de los histogramas.
78
		System.out.println("Botones + o - apretados, actualizar tabla");
79 78
		panel.setStatistic(DatasetStatistics.getBasicStatsFromHistogram(getLastHistogram(), (int)panel.getBoxesValues()[1], (int)panel.getBoxesValues()[0], panel.showBands));
80 79
	}
81 80

  
......
125 124
		//Selecci?n de fuente de datos del histograma
126 125
		JComboBox cbo = panel.getJComboBoxOrigen();
127 126
		if (comboEventEnable && e.getSource() == cbo) {
128
			
129
			System.out.println(cbo.getSelectedIndex() + "");
130 127
//			showHistogram();
131 128
//			panel.setHistogramDataSource(cbo.getSelectedIndex());
132 129
			
......
143 140
		//Selecci?n de histograma acumulado y no acumulado
144 141
		JComboBox cbt = panel.getJComboBoxTipo();
145 142
		if (comboEventEnable && e.getSource() == cbt) {
146
			System.out.println(cbt.getSelectedIndex() + "");
147 143
			panel.setType(cbt.getSelectedIndex());
148 144
		}
149 145
	
......
222 218
//	}
223 219
	
224 220
	public void showHistogram() {
225
		IHistogramable iaux = (IHistogramable) ((Vector) panel.getComboSource().get(panel.getJComboBoxOrigen().getSelectedIndex())).get(0);
221
		IHistogramable iaux = (IHistogramable) ((ArrayList) panel.getComboSource().get(panel.getJComboBoxOrigen().getSelectedIndex())).get(0);
226 222
		HistogramProcess histogramProcess = new HistogramProcess(iaux);
227 223
		incrementableTask = new IncrementableTask(histogramProcess);
228 224
		incrementableTask.showWindow();

Also available in: Unified diff