87 |
87 |
ImageIcon imageIconHelp;
|
88 |
88 |
|
89 |
89 |
/**
|
90 |
|
* Crea un <code>ImageNavigator</code> especificandole quien pintara el
|
91 |
|
* componente
|
92 |
|
* @param iClient
|
93 |
|
*/
|
|
90 |
* Crea un <code>ImageNavigator</code> especificandole quien pintara el
|
|
91 |
* componente
|
|
92 |
* @param iClient
|
|
93 |
*/
|
94 |
94 |
public ImageNavigator(IClientImageNavigator iClient) {
|
95 |
95 |
this.iClient = iClient;
|
96 |
96 |
|
... | ... | |
400 |
400 |
newX1 = x1;
|
401 |
401 |
newX2 = x1 + this.getWidth() / zoom;
|
402 |
402 |
}
|
|
403 |
if ((Double.isNaN(newX1)) || (Double.isNaN(newY1)))
|
|
404 |
return;
|
403 |
405 |
iClient.drawImage(getCacheGraphics(), newX1, newY1, newX2, newY2, zoom, this.getWidth(), this.getHeight());
|
404 |
406 |
}
|
405 |
407 |
|
... | ... | |
486 |
488 |
g.drawImage(image, 0, 0, this);
|
487 |
489 |
} else {
|
488 |
490 |
// Dibujar en escala de grises y aclarado para cuando esta inactivo
|
489 |
|
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
|
|
491 |
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
|
490 |
492 |
|
491 |
493 |
Graphics big = bi.createGraphics();
|
492 |
494 |
big.drawImage(image, 0, 0, this);
|
... | ... | |
730 |
732 |
/**
|
731 |
733 |
* Define el color de los recuadros del fondo
|
732 |
734 |
*
|
733 |
|
* @param backgroundColor the backgroundColor to set
|
734 |
|
*/
|
735 |
|
public void setBackgroundColor(Color backgroundColor) {
|
736 |
|
this.backgroundColor = backgroundColor;
|
737 |
|
}
|
|
735 |
* @param backgroundColor the backgroundColor to set
|
|
736 |
*/
|
|
737 |
public void setBackgroundColor(Color backgroundColor) {
|
|
738 |
this.backgroundColor = backgroundColor;
|
|
739 |
}
|
738 |
740 |
|
739 |
741 |
/**
|
740 |
742 |
* Devuelve el color de los recuadros del fondo
|
741 |
|
* @return the backgroundColor
|
742 |
|
*/
|
743 |
|
public Color getBackgroundColor() {
|
744 |
|
return backgroundColor;
|
745 |
|
}
|
|
743 |
* @return the backgroundColor
|
|
744 |
*/
|
|
745 |
public Color getBackgroundColor() {
|
|
746 |
return backgroundColor;
|
|
747 |
}
|
746 |
748 |
|
747 |
749 |
/**
|
748 |
750 |
* Devuelve si se esta mostrando o no la cuadricula de fondo.
|
749 |
|
* @return the showBackground
|
750 |
|
*/
|
751 |
|
public boolean isShowBackground() {
|
752 |
|
return showBackground;
|
753 |
|
}
|
|
751 |
* @return the showBackground
|
|
752 |
*/
|
|
753 |
public boolean isShowBackground() {
|
|
754 |
return showBackground;
|
|
755 |
}
|
754 |
756 |
|
755 |
757 |
/**
|
756 |
758 |
* Define si se muestra o no la cuadricula de fondo. Util para imagenes
|
757 |
759 |
* transparentes
|
758 |
|
* @param showBackground the showBackground to set
|
759 |
|
*/
|
760 |
|
public void setShowBackground(boolean showBackground) {
|
|
760 |
* @param showBackground the showBackground to set
|
|
761 |
*/
|
|
762 |
public void setShowBackground(boolean showBackground) {
|
761 |
763 |
this.showBackground = showBackground;
|
762 |
764 |
updateImageCache(true);
|
763 |
765 |
refreshImage(0, 0);
|
764 |
|
}
|
|
766 |
}
|
765 |
767 |
|
766 |
768 |
/* (non-Javadoc)
|
767 |
|
* @see javax.swing.JComponent#setEnabled(boolean)
|
768 |
|
*/
|
769 |
|
public void setEnabled(boolean enabled) {
|
770 |
|
super.setEnabled(enabled);
|
|
769 |
* @see javax.swing.JComponent#setEnabled(boolean)
|
|
770 |
*/
|
|
771 |
public void setEnabled(boolean enabled) {
|
|
772 |
super.setEnabled(enabled);
|
771 |
773 |
updateImageCache(true);
|
772 |
774 |
refreshImage(0, 0);
|
773 |
|
}
|
|
775 |
}
|
774 |
776 |
}
|