Skip to content

Interactive solution for the Skyline problem with GUI using Swing and AWT

Notifications You must be signed in to change notification settings

aloparev/SkylineProblem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is skyline problem?

Imagine NY downtown from far away, covered by smog. Skyscrapers have no longer the original color. It is difficult to tell where one ends and another begins. There is only an edgy silhouette that looks like merged rectangles.
The challenge is to take all the coordinates of stand alone skyscrapers and to merge them into one huge silhouette.

Motivation

During the 'Programming 2' course we worked with JavaFX to create graphical apps. JavaFX replaced out of date AWT and Swing libraries. My aim was to try them out and see the differences.

UI

There is a drawing space and a little control panel on the right side. The control panel has a merge check box, two radio buttons for color and a clear button. By default merge is activated.
By moving the mouse with a pressed button will set edge coordinates for a skyscraper. With merge enabled only silhouettes will appear. With merge disabled a color for every shaped building can be chosen. New buildings will appear in the foreground covering existing ones. Then if the merge is checked out all skyscrapers will be forged into one shape.
Clear the drawing space with the according button.
Tested with a display resolution 1680x1050 pixels.

Getting started
  1. clone the repository
  2. go to out/artifacts/Skyline_jar
  3. open Skyline.jar

Screenshot

About

Interactive solution for the Skyline problem with GUI using Swing and AWT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages