Simple Screen Facade

Goal Description Hints Passoff

Due Date - Feb 23

Goal

 
Learn the basics of manipulating the screen indirectly.
 CS 656
Description
 
  • Write a program that will open a Facade Creation Window that looks like the following. Each of the three buttons should be selectable and when selected should show a highlight that indicates they are selected. These define the three modes of the program. This window is called the Facade Window and is resizable in the normal way. Prog2
  • New Facade Mode - when New Facade is selected you should capture the entire screen image and then create a borderless window that covers the entire screen. This borderless window should contain the screen captured window. To the user this will look like the screen but it will no longer respond as before. Over the top of the displayed image should be a transparent white rectangle that makes the entire screen appear grayed out.
    • The user is then able to specify a new facade by dragging out a small rectangle on the screen. This rectangle will show the captured image without the overlapping transparent white. The result will be that the screen appears grayed out except where the selected area shows through. This rectangle defines a new facade. Your program should remember the location on the screen where this rectangle was specified. After a rectangle is selected its captured image should appear somewhere in the Facade window. Make a placement that makes good interactive sense.
    • The user can select multiple facade rectangles.
  • Select Mode - when in selection mode (the arrow button) the entire screen is again captured and shown in a borderless window. All regions of the screen are grayed out except for existing facade regions. These are shown unobscured.
    • The user can drag any facade rectangle around in the facade window to place it in a new position. This is the mechanism for rearranging the facade.
    • The user can also drag around any of the exposed facade areas on the screen. As these are dragged around, the exposed area should follow and the corresponding facade area in the facade window should be updated. This is the mechanism for repositioning facade capture regions.
    • When a facade is selected, the delete key will delete that facade.
  • Run Mode - In this mode the borderless window that covers the screen is eliminated so that the other applications are now functional. Your program should sample each facade region once every second and update the corresponding facade rectangle in your facade window. It should thus appear like the application is working in the facade window as well as in its original position.
    • If the user clicks in the facade window on one of the facade rectangles you should do the following:
      1. Warp the mouse cursor to the corresponding position on the screen
      2. Place a borderless window over the top of that position to alert the user of the new mouse location. You will need to capture the region, add the highlight, show the window and then remove the window.

      This will allow the user to go to the facade location from the facade window.

Hints
 
The basic tools you will need are in Java's Robot class.
Passoff
 

__ 1) Brings up the Facade window correctly

__ 2) In New Facade mode the screen is correctly grayed out without interfering with the Facade Window.

__ 2) In New Facade mode all existing facade areas are shown unobscured.

__ 2) In New Facade mode new facades can be created and are correctly displayed by unobscuring their areas and by echoing them in the Facade Window

__ 2) In Select mode the user can reposition facade rectangles

__ 2) In Select mode the user can move facade areas around the screen and they are correctly echoed both on the screen and in the facade window.

__ 2) In Run mode the user can interact on the screen and the facade rectangles in the facade window are correctly updated.

__ 2) In Run mode, pointing at a facade rectangle in the facade window will correctly move and highlight the mouse position.