Add delete cut copy and paste menu items to the edit menu


Question: Enhance the drawer6 package in the following ways:

a. Add "Delete," "Cut," "Copy," and "Paste" menu items to the Edit menu in the drawer6 package. The Delete menu item removes the selected figures from the canvas. The Copy menu item creates copies of the currently selected figures and puts them in a clipboard for later pasting. Cut is just like Copy except it deletes the currently selected figures after copying them. The Paste menu item should take the figures in the clipboard and paste them down and to the right a few pixels from where the original figures were at the time they were copied. Ideally you will use the system clipboard so that copied figures can also be pasted into other applications if they support such pasting. To get the system clipboard using Java, have your Drawing Canvas class call

getToolkit().getSystemClipboard()

b. Implement resizing. To do so, add a new "Resize" tool. When the user selects the resize tool and drags one of the corner (light green) boxes on a selected figure, that figure is stretched with the dragging. The corner of the selected figure opposite to the dragged corner remains fixed.

c. Add context menus. That is, when the user right clicks on a figure using the selection tool, that figure is and a popup menu appears with appropriate options for the type of figure selected.

For this exercise, the popup menu should just have a "Delete" menu item unless the selected figure is a Group Figure, in which case there should also be an "Ungroup" menu item.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Add delete cut copy and paste menu items to the edit menu
Reference No:- TGS02580371

Expected delivery within 24 Hours