Revision 41180 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/toc/gui/TOC.java
TOC.java | ||
---|---|---|
391 | 391 |
TocItemLeaf itemLeaf; |
392 | 392 |
IHasImageLegend imageLegend = (IHasImageLegend) legendInfo; |
393 | 393 |
Image image = imageLegend.getImageLegend(); |
394 |
|
|
395 |
if (image != null) { |
|
394 |
|
|
395 |
int w = 0; |
|
396 |
int h = 0; |
|
397 |
|
|
398 |
if(image != null) { |
|
399 |
w = image.getWidth(null); |
|
400 |
h = image.getHeight(null); |
|
401 |
} |
|
402 |
|
|
403 |
if (image != null && w > 0 && h > 0) { |
|
396 | 404 |
itemLeaf = new TocItemLeaf(); |
397 |
itemLeaf.setImageLegend(image, "", new Dimension( |
|
398 |
image.getWidth(null), image.getHeight(null)));// new |
|
399 |
// Dimension(150,200)); |
|
405 |
itemLeaf.setImageLegend(image, "", new Dimension(w, h)); |
|
400 | 406 |
|
401 | 407 |
DefaultMutableTreeNode nodeValue = |
402 | 408 |
new DefaultMutableTreeNode(itemLeaf); |
Also available in: Unified diff