Fixed "java.lang.NoSuchMethodError: mage.components.ImagePanel.<init>(Ljava/awt/image/BufferedImage;I)V"

This commit is contained in:
magenoxx 2011-01-25 12:39:05 +03:00
parent 522ecfad59
commit 6e82f194b9
4 changed files with 5 additions and 4 deletions

View file

@ -127,7 +127,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
ptText.setGlow(Color.black, TEXT_GLOW_SIZE, TEXT_GLOW_INTENSITY); ptText.setGlow(Color.black, TEXT_GLOW_SIZE, TEXT_GLOW_INTENSITY);
add(ptText); add(ptText);
BufferedImage sickness = ImageManagerImpl.getInstance().getSicknessImage(); Image sickness = ImageManagerImpl.getInstance().getSicknessImage();
overlayPanel = new ImagePanel(sickness, ImagePanel.SCALED); overlayPanel = new ImagePanel(sickness, ImagePanel.SCALED);
overlayPanel.setOpaque(false); overlayPanel.setOpaque(false);
add(overlayPanel); add(overlayPanel);

View file

@ -1,7 +1,8 @@
package org.mage.plugins.card.utils; package org.mage.plugins.card.utils;
import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
public interface ImageManager { public interface ImageManager {
public BufferedImage getSicknessImage(); public Image getSicknessImage();
} }

View file

@ -24,7 +24,7 @@ public class ImageManagerImpl implements ImageManager {
} }
@Override @Override
public BufferedImage getSicknessImage() { public Image getSicknessImage() {
if (imageSickness == null) { if (imageSickness == null) {
Image image = getImageFromResourceTransparent("/sickness.png", Color.WHITE, new Rectangle(296, 265)); Image image = getImageFromResourceTransparent("/sickness.png", Color.WHITE, new Rectangle(296, 265));
Toolkit tk = Toolkit.getDefaultToolkit(); Toolkit tk = Toolkit.getDefaultToolkit();
@ -53,5 +53,5 @@ public class ImageManagerImpl implements ImageManager {
return resized; return resized;
} }
private static BufferedImage imageSickness = null; private static Image imageSickness = null;
} }