package cmsc131PhotoLibrary; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.JRadioButton; import javax.swing.filechooser.FileNameExtensionFilter; import p4_student.PhotoTools; /** * Manages photo editing system. A dialog box is displayed which allows the * user to load an image from the local machine or using an Internet URL. * * Once the image is loaded, it is displayed and the user will be given several * options for editing the image. After displaying the edited image, the user * may choose to edit the image further, or to load a different image. * * @author (c)2007 Fawzi Emad {with many later changes by Evan Golub} */ public class PhotoSystem { // To make Serializable interface happy static final long serialVersionUID = 20191013; static final int NUM_RADIO_BUTTONS = 14; /** * Begin the application. */ public static void begin(double displayScaleIn, String initialPhoto) { JRadioButton[] radioButtons = new JRadioButton[NUM_RADIO_BUTTONS]; radioButtons[0] = new JRadioButton("Red Only"); radioButtons[1] = new JRadioButton("Green Only"); radioButtons[2] = new JRadioButton("Blue Only"); radioButtons[3] = new JRadioButton("Grayscale"); radioButtons[4] = new JRadioButton("Artistic"); radioButtons[5] = new JRadioButton("Gradient"); radioButtons[6] = new JRadioButton("Censor It"); radioButtons[7] = new JRadioButton("Horizontal Stretch"); radioButtons[8] = new JRadioButton("Vertical Stretch"); radioButtons[9] = new JRadioButton("Mirror It"); radioButtons[10] = new JRadioButton("Me and My Mirror"); radioButtons[11] = new JRadioButton("Rotated"); radioButtons[12] = new JRadioButton("Upside Down"); radioButtons[13] = new JRadioButton("Wacky"); for (int i=0; i