mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
refactor: removed unused and outdated code
This commit is contained in:
parent
97be82d3a4
commit
915e1308eb
10 changed files with 0 additions and 243 deletions
|
|
@ -1,63 +0,0 @@
|
|||
package mage.cards.action.impl;
|
||||
|
||||
import mage.cards.action.ActionCallback;
|
||||
import mage.cards.action.TransferData;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
|
||||
/**
|
||||
* Callback that does nothing on any action
|
||||
*
|
||||
* @author nantuko84
|
||||
*/
|
||||
public class EmptyCallback implements ActionCallback {
|
||||
|
||||
@Override
|
||||
public void mouseMoved(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseDragged(MouseEvent e, TransferData data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseWheelMoved(int mouseWheelRotation, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideOpenComponents() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e, TransferData data, boolean doubleClick) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void popupMenuCard(MouseEvent e, TransferData data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void popupMenuPanel(MouseEvent e, Component sourceComponent) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package mage.filters;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.BufferedImageOp;
|
||||
import java.awt.image.ColorModel;
|
||||
|
||||
/**
|
||||
* Mage abstract class that implements single-input/single-output
|
||||
* operations performed on {@link java.awt.image.BufferedImage}.
|
||||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public abstract class MageBufferedImageOp implements BufferedImageOp {
|
||||
|
||||
/**
|
||||
* Creates compatible image for @param src image.
|
||||
*/
|
||||
@Override
|
||||
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dest) {
|
||||
if (dest == null) {
|
||||
dest = src.getColorModel();
|
||||
}
|
||||
return new BufferedImage(dest, dest.createCompatibleWritableRaster(src.getWidth(), src.getHeight()), dest.isAlphaPremultiplied(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderingHints getRenderingHints() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle2D getBounds2D(BufferedImage src) {
|
||||
return new Rectangle(0, 0, src.getWidth(), src.getHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point2D getPoint2D(Point2D srcPt, Point2D destPt) {
|
||||
if (destPt == null) {
|
||||
destPt = new Point2D.Double();
|
||||
}
|
||||
destPt.setLocation(srcPt.getX(), srcPt.getY());
|
||||
return destPt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets ARGB pixels from image. Solves the performance
|
||||
* issue of BufferedImage.getRGB method.
|
||||
*/
|
||||
public int[] getRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) {
|
||||
int type = image.getType();
|
||||
if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) {
|
||||
return (int[]) image.getRaster().getDataElements(x, y, width, height, pixels);
|
||||
}
|
||||
return image.getRGB(x, y, width, height, pixels, 0, width);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets ARGB pixels in image. Solves the performance
|
||||
* issue of BufferedImage.setRGB method.
|
||||
*/
|
||||
public void setRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) {
|
||||
int type = image.getType();
|
||||
if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) {
|
||||
image.getRaster().setDataElements(x, y, width, height, pixels);
|
||||
} else {
|
||||
image.setRGB(x, y, width, height, pixels, 0, width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package mage.utils;
|
||||
|
||||
import mage.view.TableView;
|
||||
|
||||
/**
|
||||
* Used to write less code for ActionWithResult anonymous classes with UUID return type.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public abstract class ActionWithUUIDResult extends ActionWithNullNegativeResult<TableView> {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue