Revision 28368 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/FFrameLegend.java
FFrameLegend.java | ||
---|---|---|
92 | 92 |
private int dependenceIndex = -1; |
93 | 93 |
private ArrayList nameLayers=new ArrayList(); |
94 | 94 |
private ArrayList areVisible=new ArrayList(); |
95 |
private PrintRequestAttributeSet properties; |
|
95 | 96 |
|
96 | 97 |
public FFrameLegend() { |
97 | 98 |
|
... | ... | |
168 | 169 |
* @param imgBase Imagen para acelerar el dibujado. |
169 | 170 |
*/ |
170 | 171 |
public void draw(Graphics2D g, AffineTransform at, Rectangle2D rv, |
171 |
BufferedImage imgBase) throws ReadDriverException {
|
|
172 |
BufferedImage imgBase) { |
|
172 | 173 |
Rectangle2D.Double re = getBoundingBox(at); |
173 | 174 |
g.rotate(Math.toRadians(getRotation()), re.x + (re.width / 2), |
174 | 175 |
re.y + (re.height / 2)); |
... | ... | |
210 | 211 |
* @throws ReadDriverException TODO |
211 | 212 |
*/ |
212 | 213 |
private void drawLegendOrToFFrame(Graphics2D g, Rectangle2D re, double h, |
213 |
FLayers layers, int[] n, LayoutContext layout) throws ReadDriverException {
|
|
214 |
FLayers layers, int[] n, LayoutContext layout) { |
|
214 | 215 |
float sizefont = 0; |
215 | 216 |
|
216 | 217 |
if ((re.getHeight() / m_numLayers) < (re.getWidth() / (m_max * 0.7))) { |
... | ... | |
440 | 441 |
(int) haux); |
441 | 442 |
try { |
442 | 443 |
symbol2d.drawInsideRectangle(g, new AffineTransform(), |
443 |
rectangle); |
|
444 |
rectangle, properties);
|
|
444 | 445 |
} catch (SymbolDrawingException e) { |
445 | 446 |
if (e.getType() == SymbolDrawingException.UNSUPPORTED_SET_OF_SETTINGS) { |
446 | 447 |
try { |
447 | 448 |
SymbologyFactory.getWarningSymbol( |
448 | 449 |
SymbolDrawingException.STR_UNSUPPORTED_SET_OF_SETTINGS, |
449 | 450 |
symbol2d.getDescription(), |
450 |
SymbolDrawingException.UNSUPPORTED_SET_OF_SETTINGS).drawInsideRectangle(g, null, rectangle); |
|
451 |
SymbolDrawingException.UNSUPPORTED_SET_OF_SETTINGS).drawInsideRectangle(g, null, rectangle, null);
|
|
451 | 452 |
} catch (SymbolDrawingException e1) { |
452 | 453 |
// IMPOSSIBLE TO REACH THIS |
453 | 454 |
} |
... | ... | |
457 | 458 |
} |
458 | 459 |
} |
459 | 460 |
} |
460 |
|
|
461 |
|
|
461 | 462 |
/** |
462 | 463 |
* A?ade al Layout un nuevo FFrameSymbol. |
463 | 464 |
* |
... | ... | |
573 | 574 |
//toFFrames(layout, lays, rectangle, r.getWidth(), r.getHeight(), h, 0); |
574 | 575 |
int[] n = new int[1]; |
575 | 576 |
n[0] = 0; |
576 |
try { |
|
577 |
drawLegendOrToFFrame(null,rectangle,h,lays,n,layout); |
|
578 |
} catch (ReadDriverException e) { |
|
579 |
e.printStackTrace(); |
|
580 |
} |
|
581 |
layout.delFFrame(this); |
|
577 |
drawLegendOrToFFrame(null,rectangle,h,lays,n,layout); |
|
578 |
layout.delFFrame(this); |
|
582 | 579 |
|
583 | 580 |
///layout.getFFrames().remove(this); |
584 | 581 |
//layout.getEFS().endComplexCommand(); |
... | ... | |
715 | 712 |
* @see com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame#print(java.awt.Graphics2D, |
716 | 713 |
* java.awt.geom.AffineTransform) |
717 | 714 |
*/ |
718 |
public void print(Graphics2D g, AffineTransform at,FShape shape, PrintRequestAttributeSet properties) |
|
719 |
throws ReadDriverException { |
|
720 |
draw(g, at, null, null); |
|
715 |
public void print(Graphics2D g, AffineTransform at,FShape shape, PrintRequestAttributeSet properties) { |
|
716 |
this.properties=properties; |
|
717 |
draw(g, at, s, null); |
|
718 |
this.properties=null; |
|
721 | 719 |
} |
722 | 720 |
|
723 | 721 |
/** |
Also available in: Unified diff