Revision 19361 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/enhanced/graphics/OutputHistogram.java
OutputHistogram.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.GCanvas; |
... | ... | |
31 | 30 |
import org.gvsig.raster.beans.canvas.layers.GraphicHistogram; |
32 | 31 |
import org.gvsig.raster.dataset.properties.DatasetColorInterpretation; |
33 | 32 |
import org.gvsig.raster.datastruct.Histogram; |
34 |
import org.gvsig.raster.util.RasterToolsUtil; |
|
35 |
|
|
36 | 33 |
/** |
37 | 34 |
* Componente con el histograma de salida. |
38 | 35 |
* |
... | ... | |
57 | 54 |
super.init(); |
58 | 55 |
histogramColor = Color.GREEN; |
59 | 56 |
this.setLayout(new BorderLayout()); |
60 |
this.add(getNorthPanel(), BorderLayout.NORTH); |
|
61 | 57 |
this.add(getCanvas(), BorderLayout.CENTER); |
62 | 58 |
this.add(getSouthPanel(), BorderLayout.SOUTH); |
63 | 59 |
} |
... | ... | |
74 | 70 |
* @see org.gvsig.rastertools.enhanced.graphics.HistogramGraphicBase#getCanvas() |
75 | 71 |
*/ |
76 | 72 |
public GCanvas getCanvas() { |
77 |
if(canvas == null) { |
|
73 |
if (canvas == null) {
|
|
78 | 74 |
GraphicHistogram gHist = new GraphicHistogram(histogramDrawed, histogramColor); |
79 | 75 |
gHist.setType(GraphicHistogram.TYPE_LINE); |
80 |
|
|
76 |
|
|
81 | 77 |
canvas = new GCanvas(Color.BLACK); |
82 | 78 |
canvas.setDrawableElement(new Border(borderColor)); |
83 |
canvas.setDrawableElement(gHist);
|
|
79 |
canvas.setDrawableElement(gHist); |
|
84 | 80 |
} |
85 | 81 |
return canvas; |
86 | 82 |
} |
87 | 83 |
|
88 | 84 |
/* |
89 | 85 |
* (non-Javadoc) |
90 |
* @see org.gvsig.rastertools.enhanced.graphics.HistogramGraphicBase#getNorthPanel() |
|
91 |
*/ |
|
92 |
public JPanel getNorthPanel() { |
|
93 |
if(north == null) { |
|
94 |
north = new JPanel(); |
|
95 |
north.setLayout(new BorderLayout()); |
|
96 |
north.add(getSlider(), BorderLayout.CENTER); |
|
97 |
north.add(new JLabel(RasterToolsUtil.getText(null, "output_hist")), BorderLayout.NORTH); |
|
98 |
} |
|
99 |
return north; |
|
100 |
} |
|
101 |
|
|
102 |
/* |
|
103 |
* (non-Javadoc) |
|
104 | 86 |
* @see org.gvsig.rastertools.enhanced.graphics.HistogramGraphicBase#getSouthPanel() |
105 | 87 |
*/ |
106 | 88 |
public JPanel getSouthPanel() { |
... | ... | |
118 | 100 |
} |
119 | 101 |
return south; |
120 | 102 |
} |
121 |
|
|
122 |
} |
|
103 |
} |
Also available in: Unified diff