Nama: Elkana Hans Widersen NRP: 05111740000127 Kelas: PBO-A 1. Inilah rancangan interface dari image editor yang saya buat: 2. Berikut diagram dari kelas-kelas penyusun image editor saya beserta relasinya: Image Viewer: Kelas utama yang mengatur fitur-fitur utama dari image editor. Image Panel: Kelas swing untuk menampilkan gambar dalam format OF. Image File Manager: Mengatur fungsi load dan save. OF Image: Mendefinisikan gambar dalam format OF. Filter: Abstraksi dari filter-filter yang tersedia. Darker Filter: Berisi settingan filter Darker. Lighter Filter: Berisi settingan filter Lighter . Threshold Filter: Berisi settingan filter Threshold. Fish-eye Filter: Berisi settingan filter Fish-eye. 3. Berikut implementasi dari kelas-kelas di atas: Image Viewer import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.swing.*; import javax.swing.border.*; import java.io.File; import java.util.List;
Hi guys! In this post, we will make an Image Viewer v3 with GUI Programming. This is the classes we need to make the program: ImageViewer ImagePanel ImageFileManager OFImage Filter LighterFilter DarkerFilter ThresholdFilter FishEyeFilter Here is the source code for each of those classes ImageViewer import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.swing.*; import javax.swing.border.*; import java.io.File; import java.util.List; import java.util.ArrayList; import java.util.Iterator; /** * ImageViewer is the main class of the image viewer application. * It builds and displays the application GUI and * initializes all other components. * * @author (Elkana Hans Widersen) * @version 1.0 */ public class ImageViewer { // static fields: private static final String version = "Version 3.0"; private static JFileChooser fileChooser = new JFileChooser(System.getP