mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
Another fix for "NoSuchMethodError: mage.components.ImagePanel.<init>(Ljava/awt/image/BufferedImage;I)V"
This commit is contained in:
parent
6e82f194b9
commit
4c8122ebbb
4 changed files with 6 additions and 6 deletions
Binary file not shown.
|
|
@ -17,16 +17,16 @@ public class ImagePanel extends JPanel {
|
||||||
public static final int SCALED = 1;
|
public static final int SCALED = 1;
|
||||||
public static final int ACTUAL = 2;
|
public static final int ACTUAL = 2;
|
||||||
|
|
||||||
private Image image;
|
private BufferedImage image;
|
||||||
private int style;
|
private int style;
|
||||||
private float alignmentX = 0.5f;
|
private float alignmentX = 0.5f;
|
||||||
private float alignmentY = 0.5f;
|
private float alignmentY = 0.5f;
|
||||||
|
|
||||||
public ImagePanel(Image image) {
|
public ImagePanel(BufferedImage image) {
|
||||||
this(image, TILED);
|
this(image, TILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImagePanel(Image image, int style) {
|
public ImagePanel(BufferedImage image, int style) {
|
||||||
this.image = image;
|
this.image = image;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout());
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
Image sickness = ImageManagerImpl.getInstance().getSicknessImage();
|
BufferedImage 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);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public class ImageManagerImpl implements ImageManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Image getSicknessImage() {
|
public BufferedImage 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 Image imageSickness = null;
|
private static BufferedImage imageSickness = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue