User Interface Software Look under the hood

Slides:



Advertisements
Similar presentations
Chapter 18 Building the user interface. This chapter discusses n Javas graphical user interface. n Swing: an enhancement of a library called the Abstract.
Advertisements

Chapter 16 Graphical User Interfaces
implementation support
Fall 2002CS/PSY User Interface Software Look under the hood Agenda Styles of tools  Design tools  UI toolkits  GUI builder tools.
Chapter 16 Graphical User Interfaces John Keyser’s Modifications of Slides by Bjarne Stroustrup
Excel and VBA Creating an Excel Application
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
The Task-Centered Design Process figure out who's going to use the system to do what choose representative tasks for task-centered design plagiarize rough.
Graphics not part of C++ libraries –X libraries –QT library –OS specific.
1 Standard Widget Toolkit. 2 SWT l a widget toolkit for Java developers l provides a portable API and tight integration with the underlying native OS.
Human Computer Interaction Implementation Support.
1 Lecture 3: Overview of UI Software and Tools Brad Myers Advanced User Interface Software.
Introduction to Java Swing “We are the sultans of swing” – Mark Knopfler.
Written by Liron Blecher
ACM/JETT Workshop - August 4-5, ExceptionHandling and User Interfaces (Event Delegation, Inner classes) using Swing.
Welcome to CIS 083 ! Events CIS 068.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
1 Implementation support chapter 8 programming tools –levels of services for programmers windowing systems –core support for separate and simultaneous.
Objectives of This Session
Ch 3-4: GUI Basics Java Software Solutions Foundations of Program Design Sixth Edition by Lewis & Loftus Coming up: GUI Components.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
Dale Roberts Introduction to Visual Programming Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
1 Lecture 2: Overview of UI Software and Tools Brad Myers Advanced User Interface Software.
Object Oriented Programming.  Interface  Event Handling.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Ajmer Singh PGT(IP) JAVA IDE Programming - I. Ajmer Singh PGT(IP) GUI (Graphical User Interface) It is an interface that uses a graphic entities along.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
1 Visual Basic: An Object Oriented Approach 7 – The User interface.
A Quick Java Swing Tutorial
Dive Into® Visual Basic 2010 Express
Mobile Computing CSE 40814/60814 Spring 2017.
CSC 222: Object-Oriented Programming
Visual Basic.NET Windows Programming
Object-Orientated Programming
Support for the Development of Interactive Systems
Event Loops and GUI Intro2CS – weeks
CompSci 230 S Software Construction
GUI Design and Coding PPT By :Dr. R. Mall.
A First Look at GUI Applications
Chapter Topics 15.1 Graphical User Interfaces
Chapter 8: Writing Graphical User Interfaces
Event loops 16-Jun-18.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Java Look-and-Feel Design Guidelines
Fundamentals of Programming I The Model/View/Controller Design Pattern
Understand Windows Forms Applications and Console-based Applications
Ellen Walker Hiram College
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Fundamentals of Python: From First Programs Through Data Structures
Event Driven Programming
EE 422C Java FX.
Introduction to Computing Using Java
Event loops.
implementation support
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Steps to Creating a GUI Interface
Fundamentals of Programming I The Model/View/Controller Design Pattern
Advanced Programming in Java
Chapter 15: GUI Applications & Event-Driven Programming
Event loops 8-Apr-19.
Basic OOP Concepts and Terms
implementation support
Event loops.
CMPE 135: Object-Oriented Analysis and Design March 14 Class Meeting
Event loops.
Event loops 19-Aug-19.
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

User Interface Software Look under the hood Agenda Styles of tools Design tools UI toolkits GUI builder tools Fall 2002 CS/PSY 6750

Get What You Ask For Fall 2002 CS/PSY 6750

User Interface Software What support is provided for building graphical user interfaces? UI toolkits GUI builder tools Let’s examine some background… Fall 2002 CS/PSY 6750

GUI System Architecture Layered Architecture Application Higher level Tool UI Toolkit Window System OS Hardware Fall 2002 CS/PSY 6750

Window System Virtual display abstraction Coordinates different input devices Provides window primitives Important components Graphics model Input model May or may not include window manager Fall 2002 CS/PSY 6750

UI Toolkit What application programmer typically programs with Combination of interface objects and management behaviors Usually object-oriented now Library of software components and routines that programmer puts together X Windows: X Toolkit & Motif Macintosh: Mac Toolbox, MacApp Windows: Windows Developers’ Toolkit Java: Swing Fall 2002 CS/PSY 6750

Higher Level Tools Provide assistance or some automation in developing UIs Many names User Interface Management System UIMS User Interface Builder User Interface Development Environment Fall 2002 CS/PSY 6750

Separation of Concerns Application Core functionality Operations Data Interface Interface components Graphics I/O Should these be separated in code? Why? Why not? Fall 2002 CS/PSY 6750

How Does a Toolkit Work? Toolkit Workings What exactly does it provide? How is it organized? Toolkit Workings User takes actions, interacts with interface Those actions must be delivered to application in meaningful ways Application takes appropriate actions, perhaps updating display Fall 2002 CS/PSY 6750

Application interface Seeheim Model Conversational model Application interface Dialog control Presentation Dominant model for long time Fall 2002 CS/PSY 6750

Object Model UI is collection of interactor objects (often called widgets) User directly manipulates them Objects responsible for transmitting user actions to application in meaningful ways Application UI User Fall 2002 CS/PSY 6750

Locus of Control “Traditional” software Event-driven software Control is in system, query user when input needed Event-driven software Control is with user (wait for action) Code reacts to user actions More difficult to write code this way, harder to modularize, etc. Fall 2002 CS/PSY 6750

Event-Driven Program Initialize display & system Repeat Until Done Wait for and get next user action Decipher action Take appropriate action Update display Until Done Fall 2002 CS/PSY 6750

Event-Driven Program U I Entry point System Main application code What’s that? Fall 2002 CS/PSY 6750

Callback Routine Software procedure, part of application Invoked when particular action occurs to UI component, such as pressing a PushButton Procedure is invoked with event parameters Fall 2002 CS/PSY 6750

Example – X & Motif Object-oriented hierarchy of UI interactors called widgets Associate callback routines in your code with them Interface is built up by putting child widgets “onto” parent widgets Fall 2002 CS/PSY 6750

Widget Graphical user interface interactor object Fall 2002 CS/PSY 6750

Widget Hierarchy Widgets organized into inheritance hierarchy Primitive Text Label Button Scroll Bar Push Button Drawn Button Toggle Button Fall 2002 CS/PSY 6750

Widget Visual appearance Set of tailorable attributes Interactive behavior PushButton { Color BackGround; int MarginLeft; int MarginRight; int BorderWidth; Pixmap ArmPixmap; Boolean FillOnArm; CallbackList ActivateCallback; } Fall 2002 CS/PSY 6750

Widget Use Set up widget attributes Create widget object (as child of parent widget) Define callback or event procedure for widget Fall 2002 CS/PSY 6750

Widget and Callback n = 0; xmstr = XmStringCreate("Color",XmSTRING_DEFAULT_CHARSET); XtSetArg(args[n], XmNlabelString, xmstr); n++; XtSetArg(args[n], XmNbackground, red); n++; colorbut = XtCreateManagedWidget("colorbutton", xmPushButtonWidgetClass,focusrowcol, args, n); XtAddCallback(colorbut, XmNactivateCallback, colorChangeCB, id); void colorChangeCB(Widget w, XtPointer userdata, XtPointer evtdata) { // Actions } Fall 2002 CS/PSY 6750

Main Program Event Loop voidCheckXEvents() { XEvent xev; while (XtAppPending(_context)) { XtAppNextEvent(_context, &xev); XtDispatchEvent(&xev); } Fall 2002 CS/PSY 6750

OO Systems Java’s GUI programming done with AWT and Swing More distributed model (separate threads) Primary action here is dispatching events to objects (widgets) as messages Delegation important Can make particular objects responsible for event handling Fall 2002 CS/PSY 6750

GUI Builder Tools Why build graphical (visual) interface with textual commands? Why not show what you want it to look like? Visual builder tools: Visual Basic, Visual C++, Borland Delphi, Symantec Cafe Fall 2002 CS/PSY 6750

Tool Methods Work area (interface being built) Drag and drop interactors/widgets onto work area Specify position, color, look, etc. Often provide Build/Test modes Fall 2002 CS/PSY 6750

Example: dtbuilder (Motif) Fall 2002 CS/PSY 6750