package com.redpois0n.gscrot;

import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.List;

public abstract class ImageProcessor {
	
	private static final List<ImageProcessor> UPLOADERS = new ArrayList<ImageProcessor>();
	
	public static final List<ImageProcessor> getAllProcessors() {
		return UPLOADERS;
	}

	public static final void addProcessor(ImageProcessor a) {
		UPLOADERS.add(a);
	}
	
	/**
	 * Remove global action
	 * @param a
	 */
	public static final void removeProcessor(ImageProcessor a) {
		UPLOADERS.remove(a);
	}
	
	private final String name;
	
	public ImageProcessor(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}

	/**
	 * Called when an image is taken before passed to uploader
	 * @param g
	 */
	public abstract void process(Graphics2D g);
}

@@ -104,16 +104,47 @@
 .List;%0A%0A
+import javax.swing.ImageIcon;%0A%0A
 public a
@@ -603,16 +603,47 @@
 g name;%0A
+%09private final ImageIcon icon;%0A
 %09%0A%09publi
@@ -670,16 +670,32 @@
 ing name
+, ImageIcon icon
 ) %7B%0A%09%09th
@@ -710,16 +710,36 @@
 = name;%0A
+%09%09this.icon = icon;%0A
 %09%7D%0A%09%0A%09pu
@@ -779,16 +779,66 @@
 name;%0A%09%7D
+%0A%09%0A%09public ImageIcon getIcon() %7B%0A%09%09return icon;%0A%09%7D
 %0A%0A%09/**%0A%09

ImageProcessor has icon