Revision 13571 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/colortable/ColorTableListener.java
ColorTableListener.java | ||
---|---|---|
88 | 88 |
g.translate(0.0, (-(extent2.maxY() - y1) * zoom) * 2.0); |
89 | 89 |
} |
90 | 90 |
|
91 |
applyColorTable(rendering); |
|
91 |
applyColorTable(rendering, true);
|
|
92 | 92 |
try { |
93 | 93 |
rendering.draw(g, vp2); |
94 | 94 |
} catch (ArrayIndexOutOfBoundsException e) { |
... | ... | |
110 | 110 |
* @param rendering |
111 | 111 |
* @return |
112 | 112 |
*/ |
113 |
public void applyColorTable(Rendering rendering) { |
|
113 |
public void applyColorTable(Rendering rendering, boolean isPreview) {
|
|
114 | 114 |
RasterFilterList filterList = rendering.getFilterList(); |
115 | 115 |
RasterFilterListManager manager = new RasterFilterListManager(filterList); |
116 | 116 |
ColorTableListManager cManager = (ColorTableListManager) manager.getManagerByClass(ColorTableListManager.class); |
117 | 117 |
|
118 | 118 |
filterList.remove(ColorTableFilter.class); |
119 |
if (!isPreview) |
|
120 |
((FLyrRasterSE) getColorTablePanel().getLayer()).setLastLegend(null); |
|
119 | 121 |
|
120 | 122 |
if (getColorTablePanel().getCheckBoxEnabled().isSelected()) { |
121 | 123 |
filterList.remove(LinearEnhancementFilter.class); |
122 | 124 |
filterList.remove(TailTrimFilter.class); |
123 | 125 |
GridPalette gridPalette = colorTablePanel.getGridPalette(); |
124 | 126 |
cManager.addColorTableFilter(gridPalette); |
127 |
if (!isPreview) |
|
128 |
((FLyrRasterSE) getColorTablePanel().getLayer()).setLastLegend(gridPalette); |
|
125 | 129 |
} |
126 | 130 |
} |
127 | 131 |
|
... | ... | |
136 | 140 |
* ((IView)windows[i]).getTOC().refresh(); } |
137 | 141 |
*/ |
138 | 142 |
|
143 |
|
|
139 | 144 |
Rendering rendering = ((FLyrRasterSE) getColorTablePanel().getLayer()).getRender(); |
140 | 145 |
|
141 |
applyColorTable(rendering); |
|
142 |
|
|
146 |
applyColorTable(rendering, false);
|
|
147 |
//System.out.println("Terminada la carga"); |
|
143 | 148 |
getColorTablePanel().getLayer().getMapContext().invalidate(); |
149 |
//getColorTablePanel().getLayer().getMapContext().invalidate(); |
|
150 |
/* try { |
|
151 |
Thread.sleep(1000); |
|
152 |
} catch (InterruptedException e) { |
|
153 |
// TODO Auto-generated catch block |
|
154 |
e.printStackTrace(); |
|
155 |
}*/ |
|
156 |
//getColorTablePanel().getLayer().getMapContext().invalidate(); |
|
144 | 157 |
} |
145 | 158 |
|
146 | 159 |
/** |
Also available in: Unified diff