Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Description: This assignment is designed to test your understanding of graphical user interface components in Java using Swing. You will complete the graphical user

image text in transcribedimage text in transcribedimage text in transcribed

Program Description: This assignment is designed to test your understanding of graphical user interface components in Java using Swing. You will complete the graphical user interface (GUI) for an application that displays and manipulates images; the image processing classes have been provided for you. When the program initially loads, it should have the following appearance. The window title should be TCSS 305 Assignment 3". (NOTE: images in this document incorrectly show Assignment 4) TCSS 305 - Assignment 4 Edge Detect Edge Highlight Flip Horizontal Flip Vertical Grayscale Sharpen Soften Open... Save As... Close Image There are buttons centered along the top of the window labeled "Edge Detect", "Edge Highlight", "Flip Horizontal", "Flip Vertical", "Grayscale", "Sharpen", "Soften", "Open...", and "Save As..." (each with 3 dots called an ellipses) and a button labeled "Close Image". Note that the top buttons are initially disabled and so are the "Save As..." and "close Image" buttons. (The only button initially enabled is the "Open..." button.) When the user clicks "Open...", a file selection dialog appears to let the user load an image. Have the file selection dialog open in the current directory as shown below (use relative addressing). Open cfb3-snapshop Name bin icons sample_images src support files Date Modified Wednesday, January 27, 2016 8:08 PM Wednesday, January 27, 2016 8.08 PM Wednesday, January 27, 2016 8:08 PM Wednesday, January 27, 2016 8:08 PM Wednesday, January 27, 2016 8:10 PM When the user selects a file, the system loads image data from that file and displays that image in the center of the window (as shown on the next page). The window will resize to exactly fit the image and buttons; if the image is too large, this may make some of the buttons appear outside the screen area (this is expected behavior, and you do not need to handle it in any special way). If the user later pushes the "Open..." or "Save As..." button again, it should open the same folder where the file chooser was left previously. If the user cancels the file chooser, the contents of the window are left unchanged. File Format: All Files Cancel Open When an image is loaded, all buttons become enabled (as shown on the next page). Clicking each filter button causes a modification of the image: flipping, sharpening, softening, etc. Applying more than one filter to an image has a cumulative effect. These operations do not modify the original image file, they just change the onscreen appearance. If the user chooses a file that does not contain valid image data, the program displays an error message dialog (as shown on the next page). If the user chooses "close Image", the image should close, all buttons should disable except the "Open..." button, and the GUI should resize to its initial size and appearance. If the "Open..." button is used while an image is already open, a new image may be selected to replace the current image. Only one image can be open and displayed for editing at a time. When the GUI window is closed, the program should exit. 1 of 6 TCSS 305 - Assignment 4 Edge Detect Edge Highlight Flip Horizontal Flip Vertical Grayscale Sharpen Soften Open... Save As... Close Image Error! The following class diagram gives a summary of the classes in the project and their relationships. The SnapshopGvI is constructed by the SnapShopMain class. The GUI uses Filters to filter PixelImages that are composed of Pixels. ::Default::SnapShopMain snapshop.filters::EdgeDetectFilter > snapshop.filters::Filter Emain(...) EdgeDetectFilter(...) filter...) filter(...) # getDescription(...) starts snapshop.gui::SnapShopGUI snapshop.filters::FlipVerticalFilter snapshop.filters::AbstractFilter filteri...) FlipVerticalFilter(...) This is the class you will write. # AbstractFilter(...) getDescription.. snapshop.filters::GrayscaleFilter filter(...) # GrayscaleFilter(...) uses snapshop.filters::WeightedFilter snapshop.image::Pixellmage # filter(...) WeightedFilter...) snapshop.filters::FlipHorizontalFilter getPixelDatal...) load(...) save(...) setPixelData...) # Filter(...) FlipHorizontalFilter(...) snapshop.filters::SharpenFilter snapshop.filters::SoftenFilter snapshop.image::Pixel # SharpenFilter(...) E SoftenFilter(...) MAX_COLOR_VALUE: int MIN_COLOR_VALUE : int E NUM_CHANNELS : int Esnapshop.filters::EdgeHighlightFilter EdgeHighlightfilter...) getBlue...) getGreenl...) getRed...) Pixell...) Pixell...) setBlue...) setGreen(...) setRed...) Program Description: This assignment is designed to test your understanding of graphical user interface components in Java using Swing. You will complete the graphical user interface (GUI) for an application that displays and manipulates images; the image processing classes have been provided for you. When the program initially loads, it should have the following appearance. The window title should be TCSS 305 Assignment 3". (NOTE: images in this document incorrectly show Assignment 4) TCSS 305 - Assignment 4 Edge Detect Edge Highlight Flip Horizontal Flip Vertical Grayscale Sharpen Soften Open... Save As... Close Image There are buttons centered along the top of the window labeled "Edge Detect", "Edge Highlight", "Flip Horizontal", "Flip Vertical", "Grayscale", "Sharpen", "Soften", "Open...", and "Save As..." (each with 3 dots called an ellipses) and a button labeled "Close Image". Note that the top buttons are initially disabled and so are the "Save As..." and "close Image" buttons. (The only button initially enabled is the "Open..." button.) When the user clicks "Open...", a file selection dialog appears to let the user load an image. Have the file selection dialog open in the current directory as shown below (use relative addressing). Open cfb3-snapshop Name bin icons sample_images src support files Date Modified Wednesday, January 27, 2016 8:08 PM Wednesday, January 27, 2016 8.08 PM Wednesday, January 27, 2016 8:08 PM Wednesday, January 27, 2016 8:08 PM Wednesday, January 27, 2016 8:10 PM When the user selects a file, the system loads image data from that file and displays that image in the center of the window (as shown on the next page). The window will resize to exactly fit the image and buttons; if the image is too large, this may make some of the buttons appear outside the screen area (this is expected behavior, and you do not need to handle it in any special way). If the user later pushes the "Open..." or "Save As..." button again, it should open the same folder where the file chooser was left previously. If the user cancels the file chooser, the contents of the window are left unchanged. File Format: All Files Cancel Open When an image is loaded, all buttons become enabled (as shown on the next page). Clicking each filter button causes a modification of the image: flipping, sharpening, softening, etc. Applying more than one filter to an image has a cumulative effect. These operations do not modify the original image file, they just change the onscreen appearance. If the user chooses a file that does not contain valid image data, the program displays an error message dialog (as shown on the next page). If the user chooses "close Image", the image should close, all buttons should disable except the "Open..." button, and the GUI should resize to its initial size and appearance. If the "Open..." button is used while an image is already open, a new image may be selected to replace the current image. Only one image can be open and displayed for editing at a time. When the GUI window is closed, the program should exit. 1 of 6 TCSS 305 - Assignment 4 Edge Detect Edge Highlight Flip Horizontal Flip Vertical Grayscale Sharpen Soften Open... Save As... Close Image Error! The following class diagram gives a summary of the classes in the project and their relationships. The SnapshopGvI is constructed by the SnapShopMain class. The GUI uses Filters to filter PixelImages that are composed of Pixels. ::Default::SnapShopMain snapshop.filters::EdgeDetectFilter > snapshop.filters::Filter Emain(...) EdgeDetectFilter(...) filter...) filter(...) # getDescription(...) starts snapshop.gui::SnapShopGUI snapshop.filters::FlipVerticalFilter snapshop.filters::AbstractFilter filteri...) FlipVerticalFilter(...) This is the class you will write. # AbstractFilter(...) getDescription.. snapshop.filters::GrayscaleFilter filter(...) # GrayscaleFilter(...) uses snapshop.filters::WeightedFilter snapshop.image::Pixellmage # filter(...) WeightedFilter...) snapshop.filters::FlipHorizontalFilter getPixelDatal...) load(...) save(...) setPixelData...) # Filter(...) FlipHorizontalFilter(...) snapshop.filters::SharpenFilter snapshop.filters::SoftenFilter snapshop.image::Pixel # SharpenFilter(...) E SoftenFilter(...) MAX_COLOR_VALUE: int MIN_COLOR_VALUE : int E NUM_CHANNELS : int Esnapshop.filters::EdgeHighlightFilter EdgeHighlightfilter...) getBlue...) getGreenl...) getRed...) Pixell...) Pixell...) setBlue...) setGreen(...) setRed...)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2022 Workshops 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 In Computer And Information Science 33

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Alfred Taudes ,Atif Mashkoor ,Johannes Sametinger ,Jorge Martinez-Gil ,Florian Sobieczky ,Lukas Fischer ,Rudolf Ramler ,Maqbool Khan ,Gerald Czech

1st Edition

3031143426, 978-3031143427

More Books

Students also viewed these Databases questions

Question

b. What is the probability of winning?

Answered: 1 week ago

Question

1. What is called precipitation?

Answered: 1 week ago

Question

1.what is dew ?

Answered: 1 week ago

Question

1.The difference between climate and weather?

Answered: 1 week ago

Question

1. What is Fog ?

Answered: 1 week ago

Question

How water vapour forms ?

Answered: 1 week ago