User Interface Toolkits Professor: Tapan Parikh TA: Eun Kyoung Choe

Slides:



Advertisements
Similar presentations
Prof. Yitzchak Rosenthal
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Learning the Basics – Lesson 1
User Interface Structure Design
What is a Dialog box? A Dialog box is a window or “form” that contains other child windows or “controls” that have a specific appearances and pre-defined.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Graphics Programming. In this class, we will cover: The difference between AWT and Swing Creating a frame Frame positioning Displaying information in.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
Graphical User Interface (GUI) Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Swing CS-328 Dick Steflik John Margulies. Swing vs AWT AWT is Java’s original set of classes for building GUIs Uses peer components of the OS; heavyweight.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
0 CS 160: Design Process: Implement Event-based UI Programming, Model-View-Controller, and the Web Jeffrey Nichols IBM Almaden Research Center
Object-Oriented Analysis and Design
Graphical User Interface (GUI) Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Stanford hci group / cs376 research topics in human-computer interaction UI Software Tools Scott Klemmer 27 October 2005.
How to Use Microsoft PowerPoint What is PowerPoint? Presentation software that allows you to create slides, handouts, notes, and outlines. Slide.
Spring /6.831 User Interface Design and Implementation1 Lecture 8: Generating Designs.
User Interface Design Chapter 11. Objectives  Understand several fundamental user interface (UI) design principles.  Understand the process of UI design.
LOGO Chapter V Formattings 1. LOGO Overview  Conditional formatting  Working with tables  Filtering  Sorting  Freeze panes  Pivot tables  How to.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
Lesson 6: Working with Layout and Graphics
Written by Liron Blecher
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
Transferring Course Materials to the Web. Creating a Web Site With a Template To create a Web site with a template 1.Start FrontPage. 2.On the File menu,
MVC pattern and implementation in java
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 16: Java Applets & AWT Fundamentals of Web Programming.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Web Technologies Website Development Trade & Industrial Education
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
MVC CompSci 230 S Software Construction. MVC Architecture  A typical application includes software to  maintain application data,  document text.
Java Swing, Events and MVC Optional Readings: Eckel’s Thinking in Java: Chap 14 (
Marcel Casado NCAR/RAP WEATHER WARNING TOOL NCAR.
GUI Widgets Jeff Offutt SWE 432 Design and Implementation of Software for the Web.
(c) University of Washington08-1 CSC 143 Models and Views Reading: Ch. 18.
3461A Readings from the Swing Tutorial. 3461A Overview  The follow is the Table of Contents from the trail “Creating a GUI with JFC/Swing” in the “The.
Swing and MVCS CompSci 230 Software Construction.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Slide 1 Chapter 11 User Interface Structure Design Chapter 11 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
MSc Workshop - © S. Kamin, U. ReddyLect 3 - GUI -1 Lecture 3 - Graphical User Interfaces r GUI toolkits in Java API r JFrame r GUI components.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Java Applets: GUI Components, Events, Etc. Ralph Westfall June, 2010.
Spring /6.831 User Interface Design and Implementation1 Lecture 9: UI Software Architecture RS1 (for 6.831G), PS1 (for 6.813U) released today,
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture 4: Graphic User Interface Graphical User Interface Larry Rudolph MIT 6.893; SMA 5508 Spring 2004.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
PLACING AND LINKING GRAPHICS
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
Swing - 2 Session 13. Swing - 2 / 2 of 38 Objectives (1) Discuss trees and tables Discuss progress bars Discuss MVC architecture Describe menus.
LECTURE 18 16/11/15. MAKING THE INTERFACE CONSISTENT Consistency is one way to develop and reinforce the users conceptual model of applications and give.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Fall UI Design and Implementation1 Lecture 17: Toolkits.
Java Swing, Events Readings: Just Java 2: Chap 19 & 21, or Eckel’s Thinking in Java: Chap 14 Slide credits to CMPUT 301, Department of Computing Science.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
3461 Course Summary COSC 3461A Fall Intro to UI Design  Course plan: Implementation, Evaluation, Design  Human Computer Interaction is an.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
XP Creating Web Pages with Microsoft Office
How to Use Microsoft PowerPoint What is PowerPoint? Presentation software that allows you to create slides, handouts, notes, and outlines. Slide.
Java Look-and-Feel Design Guidelines
Chap 7. Building Java Graphical User Interfaces
The structure of Interactive Software
Model, View, Controller design pattern
Presentation transcript:

User Interface Toolkits Professor: Tapan Parikh TA: Eun Kyoung Choe Lecture #11 - March 6th, : User Interface Design and Development

Today’s Outline 1)Model-View-Controller (MVC) 2)Widgets 3)UI Toolkits 4)Internationalization

Model-View- Controller (MVC)

Architecture for developing programs with modular, reusable components Originally conceived in Smalltalk-80, immortalized in Design Patterns Allows separation of application state (model) from application display (view) and application logic (controller)

Source: Krasner and Pope, “A Description of the Model-View-Controller User Interface Paradigm in Smalltalk-80”

Model-View-Controller (MVC) Model –Maintains application data –Provides methods to access and modify data –Notifies observers when data changes View –Maintains application display –Updates view by listening to and querying model –Can have multiple views for the same model Controller –Handles user input –Mediates between view and model –Manages lifecycle of other objects –Views and controllers can be reusable across applications

Example: A Text Field Adapted from Rob Miller Text display Mutable string Keystroke handler ControllerView Model change events get text edit text Screen Keyboard

Example: Web Browser Adapted from Rob Miller Page view Document Model (DOM) Hyperlink handler ControllerView Model change events get nodes load page Screen Mouse

Observer Pattern Used to decouple model from views (can support multiple simultaneous views of one model) Adapted from Rob Miller Model View A View B stock market data graph table query update query

Observer Pattern Adapted from Rob Miller Model Observer modify update gets return register interface Model { void register(Observer) void unregister(Observer) Object get() void modify() } interface Observer { void update(Event) }

View-Controller In practice, it is often difficult to separate the view and the controller –Output is closely tied to Input –View needs to update itself based on controller state (currently depressed button, currently selected text, etc.) MVC has largely been superseded by MV - Model-View Reusable GUI components providing both input and output (also called components, or widgets) Adapted from Rob Miller

Widgets

Reusable user interface components –Also called components, controls, interactors, etc. –Handle both input and output Includes a view, a controller, and possibly a model –Embedded model - data included in widget; needs to be copied in and out –Linked model - data stored in model object, which provides interface for accessing and editing –Allows binding of widgets to data objects Adapted from Rob Miller

Kinds of Widgets Text boxes Buttons Scrollbars Menubars Containers Etc…

Widgets for 1-of-N Choices Adapted from Rob Miller Radio buttons Drop-down menu Single-selection listbox Toggle buttons

Widgets for Boolean Choices Adapted from Rob Miller Checkbox Toggle button

Widgets for K-of-N Choices Adapted from Rob Miller N checkboxes Multiple-selection listbox Two listboxes

Widgets for Commands Adapted from Rob Miller Menubar Toolbar Context menu (right-click) Push button Hyperlinkwww.ischool.berkeley.edu

Widgets for Organizing Content Adapted from Rob Miller Tabbed Pane Scrolled Pane Split Pane Listbox + Pane

Widgets for Dialogs Adapted from Rob Miller Dialog Box (Modal or Modeless) Sidebar

View Hierarchy Views can be arranged into hierarchies of containers and components –Containers: Window, Frame, Panel, etc. –Components / Widgets: Canvas, Text Box, Button, etc. –Containers are also components / widgets This hierarchy is used to delegate handling of input, output and layout Adapted from Rob Miller

View Hierarchy: Output Drawing –Draw requests are passed top-down through the hierarchy Clipping –Parent container prevents its child components from drawing outside its extent Z-order –Children are (usually) drawn on top of parents –Child order dictates drawing order between siblings Coordinate system –Every container has its own coordinate system –Child positions are expressed in terms of parent coordinates Adapted from Rob Miller

View Hierarchy: Input Raw input events (key presses, mouse movements, mouse clicks) are sent to lowest component Event propagates up the hierarchy until some component handles it One component in the hierarchy has the focus (which it can choose to delegate to its ancestors) Adapted from Rob Miller

View Hierarchy: Layout Children can be automatically positioned and sized relative to their parents and siblings –Allows window-resizing –Can handle internationalization and platform differences (window size, font size, etc.) –Reduces requirement for programmer to manage sizing and positioning (usually requires fiddling to achieve graphic design requirements) Adapted from Rob Miller

Pros and Cons of Widgets Pros –Reduce development effort - designing, coding, testing, maintaining, etc. –Maintain consistency across platforms and/or applications Cons –Constrains designer’s thinking –Encourages form and menu-based styles as opposed to more direct manipulation Further Reading –Jeff Johnson, GUI Bloopers 2.0: Common User Interface Design Don'ts and Dos Adapted from Rob Miller

User Interface Toolkits Software architecture: –Usually MV, or MVC Output: –View hierarchy –Stroke drawing –Pixel-level access Input: –Event handling Widgets: –Buttons, menus, containers, etc. Adapted from Rob Miller

Toolkit Examples Adapted from Rob Miller Win32Java SwingHTML componentswindowsJComponentselements strokesGDIGraphics pixelsbitmapsImage inputmessageslistenersJavascript window proc event handlers widgetsbutton, menu,JButton, JMenu,, textbox, …JTextField, …, …

Cross-Platform Toolkits: Swing Adapted from Rob Miller Windows Java AWT Motif XLib Java Swing OS X

Cross-Platform Toolkits: HTML Adapted from Rob Miller MS Windows Firefox GTK+ XLib HTML Mac OS IESafari

Cross-Platform Toolkits AWT, HTML –Use native widgets, but only those common to all platforms –Consistent look-and-feel with native applications, because they use the same underlying code –Sometimes misses some widgets Swing, Amulet: –Reimplement all widgets –Not constrained by least common denominator –Provides consistent look-and-feel across platforms SWT: –Use native widgets where possible –Reimplement missing widgets Adapted from Rob Miller

Themes for Successful Toolkits Address the Important Parts of the UI Provide a Low Threshold and a High Ceiling Make it Easy to do the Right Thing, and Hard to Do the Wrong Thing Make the Behavior of Your Toolkit Predictable Make Sure the Target of your Toolkit is Stable and Well-defined Source: Myers, Hudson and Pausch “Past, Present and Future of User Interface Software Tools”

Internationalization (i18n)

Internationalization Adapted from Rob Miller

Challenges of i18n Translations –Have to translate every visible word in the application –Requires specialists who are not only fluent in the language, but are aware of local culture, conventions and standards Right-to-left languages (arabic, hebrew, etc.) –Affects drawing, screen layout, icon shapes Adapted from Rob Miller

Challenges of i18n Encodings –Can vary across (and even within) languages –Fonts and input methods both need to support specific kinds of encodings Sorting (collation) –Uppercase / lowercase, accents, different letters - all affect sorting in different languages Numbers –172, (US), ,55 (Germany) –1,72, (India) Dates –3/6/8 (US) vs. 6/3/8 (everywhere else) Adapted from Rob Miller

Challenges of i18n Colors –Does white represent a wedding or a funeral? Icons Adapted from Rob Miller

Toolkit Support for i18n Message files –Separates messages from source code –“OK” vs. gettext(“OK”) –Human translators generate a message file for each supported locale Skins –Separates images, icons, presentation rules from source code Formatting support –Numbers, dates, currency Bidirectional layout Adapted from Rob Miller

For Next Time Interactive Prototype / Final Project Proposals are Due on Tuesday Review the slides and the readings on Heuristic Evaluation Each of you will be asked to perform one heuristic evaluation Each of your projects will be evaluated 2-3 times