08GUI - 1 CMSC 132: Object-Oriented Programming II...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 CMSC 132: Object-Oriented Programming II Graphical User Interface (GUI) Department of Computer Science University of Maryland, College Park 2 Graphical User Interface (GUI) User interface Interface between user and computer Both input and output Affects usability of computer 3 Model-View-Controller (MVC) Model for GUI programming (Xerox PARC ’78) Separates GUI-Oriented Program into components: 1. Model application data 2. View visual interface 3. Controller user interaction Model View Controller 4 MVC Model of GUI Design Model Should perform actual work Should be independent of the GUI But can provide access methods Controller Lets user control what work the program is doing Design of controller depends on model View Lets user see what the program is doing Should not display what controller thinks is happening (base display on model, not controller) 5 Programming Models Normal (control flow-based) Programming Approach Start at main() Continue until end of program or exit() Event-driven Programming Event - Action or condition occurring outside normal flow of control of program (e.g., mouse clicks, keyboard input, etc.) Unable to predict time & occurrence of event Approach Start with main() Define system elements and register event listeners Await events (& perform associated computation) 6 GUI...
View Full Document

This note was uploaded on 01/12/2012 for the course CMSC 132 taught by Professor Padua-perez during the Fall '08 term at Maryland.

Page1 / 26

08GUI - 1 CMSC 132: Object-Oriented Programming II...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online