forked from External/mage
Made utility classes final to explicitly forbid it's inheritance
This commit is contained in:
parent
f309717616
commit
498c8cf60c
80 changed files with 83 additions and 83 deletions
|
|
@ -3,7 +3,7 @@ package org.mage.plugins.card.constants;
|
|||
import java.awt.Rectangle;
|
||||
import java.io.File;
|
||||
|
||||
public class Constants {
|
||||
public final class Constants {
|
||||
|
||||
public static final String RESOURCE_PATH_SET = File.separator + "sets" + File.separator;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import org.apache.log4j.Logger;
|
|||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
import org.mage.plugins.card.properties.SettingsManager;
|
||||
|
||||
public class CardImageUtils {
|
||||
public final class CardImageUtils {
|
||||
|
||||
private static final HashMap<CardDownloadData, String> pathCache = new HashMap<>();
|
||||
private static final Logger log = Logger.getLogger(CardImageUtils.class);
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ import java.awt.image.ImageFilter;
|
|||
import java.awt.image.ImageProducer;
|
||||
import java.awt.image.RGBImageFilter;
|
||||
|
||||
public class Transparency {
|
||||
public final class Transparency {
|
||||
public static Image makeColorTransparent(Image im, final Color color) {
|
||||
ImageFilter filter = new RGBImageFilter() {
|
||||
// the color we are looking for... Alpha bits are set to opaque
|
||||
public final int markerRGB = color.getRGB() | 0xFF000000;
|
||||
|
||||
@Override
|
||||
public final int filterRGB(int x, int y, int rgb) {
|
||||
public int filterRGB(int x, int y, int rgb) {
|
||||
if ((rgb | 0xFF000000) == markerRGB) {
|
||||
// Mark the alpha bits as zero - transparent
|
||||
return 0x00FFFFFF & rgb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue