Revision 19292 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/colortable/ui/ColorTableDialog.java
ColorTableDialog.java | ||
---|---|---|
36 | 36 |
*/ |
37 | 37 |
public class ColorTableDialog extends JPanel implements IWindow, IWindowListener { |
38 | 38 |
private static final long serialVersionUID = -5374834293534046986L; |
39 |
private FLayer layer = null; |
|
39 | 40 |
|
40 | 41 |
/** |
41 | 42 |
* Panel de recortado de imagen que est? en la libreria raster |
... | ... | |
47 | 48 |
* @param width Ancho |
48 | 49 |
* @param height Alto |
49 | 50 |
*/ |
50 |
public ColorTableDialog(int width, int height) { |
|
51 |
this.setPreferredSize(new Dimension(width, height)); |
|
52 |
this.setSize(width, height); |
|
53 |
this.setLayout(new BorderLayout(5, 5)); |
|
54 |
this.add(getColorTablePanel(), java.awt.BorderLayout.CENTER); |
|
51 |
public ColorTableDialog(FLayer layer, int width, int height) { |
|
52 |
this.layer = layer; |
|
53 |
setPreferredSize(new Dimension(width, height)); |
|
54 |
setSize(width, height); |
|
55 |
setLayout(new BorderLayout(5, 5)); |
|
56 |
add(getColorTablePanel(), java.awt.BorderLayout.CENTER); |
|
55 | 57 |
} |
56 | 58 |
|
57 | 59 |
/** |
58 |
* Especificar el layer para el recorte |
|
59 |
* @param layer |
|
60 |
*/ |
|
61 |
public void setLayer(FLayer layer) { |
|
62 |
getColorTablePanel().setLayer(layer); |
|
63 |
} |
|
64 |
|
|
65 |
/** |
|
66 | 60 |
* Obtiene el panel con el histograma |
67 | 61 |
* @return HistogramPanel |
68 | 62 |
*/ |
69 | 63 |
private ColorTablePanel getColorTablePanel() { |
70 | 64 |
if (colorTablePanel == null) { |
71 |
colorTablePanel = new ColorTablePanel(this); |
|
65 |
colorTablePanel = new ColorTablePanel(layer, this);
|
|
72 | 66 |
} |
73 | 67 |
return colorTablePanel; |
74 | 68 |
} |
... | ... | |
93 | 87 |
*/ |
94 | 88 |
public void windowClosed() { |
95 | 89 |
getColorTablePanel().windowClosed(); |
96 |
}
|
|
90 |
}
|
|
97 | 91 |
|
98 | 92 |
public void windowActivated() {} |
99 | 93 |
} |
Also available in: Unified diff