Web hosting asp - Chapter 12 Graphical User Interface Components: Part 1

Chapter 12 Graphical User Interface Components: Part 1 709 Location - locationName : String # setLocationName( String ) : void + getLocationName( ) : String + getButton( ) : Button + getDoor( ) : Door Floor + getButton( ) : Button + getDoor( ) : Door Elevator - moving : Boolean = false -summoned : Boolean = false -currentFloor : Location -destinationFloor : Location - travelTime : Integer = 5 + ride( ) : void + requestElevator( ) : void + enterElevator( ) : void + exitElevator( ) : void + departElevator( ) : void + getButton( ) : Button + getDoor( ) : Door Fig. 12.32Modified class diagram showing generalization of superclass 12.32 Locationand subclasses Elevatorand Floor. In this section we mentioned that the goal of object-oriented ananlysis is to produce a system-requirements document. We introduced the UML use-case diagram that facilitates gathering system requirements, and we examined the two use cases in our elevator simulation. We implemented our simulator s Graphical User Interface in Java. This section concludes the discussion on the interaction between the user and the simulation model. In Thinking About Objects Section 13.17, we integrate class ElevatorControllerwith the rest of the simulation. We also introduce the UML Component diagram, which models the .class, .java, image and sound files that comprise our system. SUMMARY A graphical user interface (GUI) presents a pictorial interface to a program. A GUI (pronounced GOO-EE ) gives a program a distinctive look and feel. By providing different applications with a consistent set of intuitive user interface components, GUIs allow the user to spend more time using the program in a productive manner. GUIs are built from GUI components (sometimes called controls or widgets). A GUI component is a visual object with which the user interacts via the mouse or the keyboard. Swing GUI components are defined in package javax.swing. Swing components are written, manipulated and displayed completely in Java. Copyright 1992 2002 by Deitel & Associates, Inc. All Rights Reserved. 7/7/01

Leave a Reply