Fall 20066.831 UI Design and Implementation1 Lecture 15: Undo.

Slides:



Advertisements
Similar presentations
Facilitator: Mrs. Nkeiruka Ojei
Advertisements

Interaction Design: Visio
Whats New in Office 2010?. Major Changes in Office 2010 The Office Ribbon, which first made its appearance in Office 2007, now appears in all Office 2010.
ZoomText, Step-by-Step IU Adaptive Technology Center.
Lesson 12 Getting Started with Excel Essentials
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
1 Excel Lesson 1 Understanding Excel Fundamentals Microsoft Office 2010 Fundamentals Story / Walls.
Excel Understanding Excel Fundamentals Microsoft Office 2010 Fundamentals 1.
Word Lesson 1 Microsoft Word Basics
COE201 – Computer Proficiency Mr. Hamze Msheik
COMPREHENSIVE ICT Document Preparation System Mr.S.Sajiharan Computer Unit Faculty of Arts and Culture South Eastern University of Srilanka.
® Microsoft Office 2010 Word Tutorial 1 Creating a Document.
® Microsoft Office 2010 Word Tutorial 1 Creating a Document.
XP New Perspectives on Microsoft Office Word 2003 Tutorial 1 1 Microsoft Office Word 2003 Tutorial 1 – Creating a Document.
XP 1 Microsoft Office Word 2003 Tutorial 1 – Creating a Document.
Key Applications Module Lesson 16 — Excel Essentials Computer Literacy BASICS.
Key Applications Module Lesson 12 — Word Essentials
McGraw-Hill Career Education © 2008 by the McGraw-Hill Companies, Inc. All rights reserved. Office Word 2007 Lab 1 Creating and Editing a Document.
EDITING AND FORMATTING A DOCUMENT Presented by: Dr. Ennis-Cole.
Word Lesson 16 Working with Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
Word Tutorial 1 Creating a document.
Selecting Text Users can select text using a variety of methods: – Dragging over text with their mouse – Double-clicking over a word selects the word –
Microsoft Word 2010 Chapter 1 Creating, Formatting, and Editing a Word Document with Pictures.
Microsoft Office Word 2003 Tutorial 1 Creating a Document.
© 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 22 Macros.
Key Applications Module Lesson 16 — Excel Essentials Computer Literacy BASICS.
Pasewark & Pasewark 1 Word Lesson 1 Word Basics Microsoft Office 2007: Introductory.
IE 411/511: Visual Programming for Industrial Applications
Spring /6.831 User Interface Design and Implementation1 Lecture 5: Errors & User Control Make sure you’re registered for the right course!
Lesson 7: Creating and Editing Business Letters. 2 Learning Objectives After studying this lesson, you will be able to:  Type a professional business.
IC 3 BASICS, Internet and Computing Core Certification Key Applications Lesson 10 Creating and Formatting an Excel Worksheet.
Lesson 2 – Editing a Document Microsoft Word
COMPREHENSIVE An Introduction to Microsoft Word 2007.
Key Applications Module Lesson 21 — Access Essentials
Basic Editing Lesson 2.
Chapter 12: User Interface Design
COMPREHENSIVE Word Tutorial 1 Creating a Document COM111 Introduction to Computer Applications.
1 Lesson 12 Getting Started with Excel Essentials Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Chapter 23. Copyright 2003, Paradigm Publishing Inc. CHAPTER 23 BACKNEXTEND 23-2 LINKS TO OBJECTIVES Record, Run, Pause, and Delete Macros Record, Run,
MIT-Word Lesson Two Anderson—Fall The Open Command The Open command is accessed from the File Tab in the Backstage Clicking File/Open brings up.
CHAPTER 10 Creating a Word Document. Learning Objectives Enter text Undo and redo actions Create documents based on existing documents Select text Edit.
Moving the Insertion Point and Correcting Text Instructor: Glenda H. Easter ITSW 1401, Intro to Word Processing.
Microsoft Word Level 1 Michael Carco. Word Level 1 Agenda  Word Basics  Navigating in a Document  Inserting and Modifying Text  Creating and Modifying.
The Excel model for information processing The Excel model is a grid of cells in which items of information are stored and processed. Any information that.
Microsoft Word 2000 Creating and Editing a Document.
PYP002 Intro.to Computer Science Microsoft Word1 Lab 04 - a Microsoft Windows Applications Common Features.
1. Chapter 1 Creating, Printing, and Editing Documents.
1 After completing this lesson, you will be able to: Open a file. Navigate through a document. Scroll through a document. Insert text in a document. Select.
XP 1 Workshop Overview Goal Participants will leave the workshop with some basic Excel skills and the ability to locate and use online resources to continue.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 18 Getting Started with Excel Essentials 1 Morrison / Wells / Ruffolo.
1 Word Lesson 1 Microsoft Word Basics Microsoft Office 2010 Introductory Pasewark & Pasewark.
Building a Website: Layout Fall Overall Structure: Home Page Title Section Title Frame Picture UNCP Math Menu Content Footer Contact Information.
Microsoft Office 2007: Introductory Pasewark & Pasewark 1.
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
Key Applications Module Lesson 12 — Word Essentials Computer Literacy BASICS.
Creating Web Pages in Word. Sharing Office Files Online Many Web pages are created using the HTML programming language. Web page editors are software.
Creating a Word Document – Part 1
Creating, Formatting, and Editing a Word Document with Pictures
MS WORD.
Lesson 17 Getting Started with Excel Essentials
Lesson 18 Getting Started with Excel Essentials
TEACHERS AND POWERPOINT 2000
Creating a Word Document – Part 1
Shelly Cashman: Microsoft Word 2016
Word Tutorial 1 Creating a Document
CS 422: UI Design and Programming
1 Word Processing Part I.
Key Applications Module Lesson 16 — Excel Essentials
Word Tutorial 1 Creating a Document
Presentation transcript:

Fall UI Design and Implementation1 Lecture 15: Undo

Fall UI Design and Implementation2 UI Hall of Fame or Shame? Suggested by Ryan Damico

Fall UI Design and Implementation3 Today’s Topics Undo design principles History visualization Selective undo Command objects

Fall UI Design and Implementation4 Forming a Mental Model of Undo Undo reverses the effect of an action But that leaves many questions: –What stream of actions will be undone? –How is the stream divided into undoable units? –Which actions are undoable, and which are skipped? –How much of the previous state is actually recovered by the undo? –How far back in the stream can you undo?

Fall UI Design and Implementation5 What stream of actions will be undone? Actions in this window (MS Office) Actions in this text widget (web browser) Just my actions, or everybody ’ s (multiuser apps) Actions made by the computer –MS Office AutoCorrect and AutoFormat are undoable, even though user didn ’ t do them

Fall UI Design and Implementation6 How is the stream divided into units? Lexical level –Mouse clicks, key presses, mouse moves –Nobody does it at this level Syntactic level –Commands and button presses Semantic level –Changes to application data structures (e.g., the result of an entire Format dialog) –This is the normal level Text entry is aggregated into a single action –But other editing commands (like Backspace) and newlines interrupt the aggregation What about user-defined macros? –Undo macro actions individually, or as a unit?

Fall UI Design and Implementation7 Which actions are undoable? User ’ s action stream may include many actions that are ignored by Undo –Selection –Keyboard focus –Changing viewpoint (scrolling, zooming) –Changing layout (opening palettes or sidebars, adjusting window sizes) –UI customization (adding buttons to toolbars) So which actions does Undo actually undo? –Some applications (e.g. web browsers, IDEs) have Undo/Redo for the editing stream, Back/Forward for the viewpoint stream

Fall UI Design and Implementation8 How much state is recovered? Select text, delete it, and then undo –Text is restored –But is selection restored? Cursor position?

Fall UI Design and Implementation9 How far back can you undo? Often a limit on history size –Used to be one action -- now usually hundreds, or infinite Does action stream persist across application sessions? –If so, stream must be saved to file Does it persist across File/Save? –Not in MS Office

Fall UI Design and Implementation10 Design Principles for Undo Visibility –Make sure undone effects are visible e.g., scrolled into view, selected, possibly animated Aggregation –Units should be “ chunks ” of action stream: typed strings, dialogs, macros Reversibility of the Undo itself –Support Redo as well as Undo –Undo to a state where user can immediately reissue the undone command, or a variant on it e.g., restore selection & cursor position Reserve it for model changes, not view changes –For consistency with other applications, reserve Undo for changes to backend data “ Undo ” is not the only way to support reversibility –Backspace undoes typing, Back undoes browsing, Recent Files undoes file closing, scrolling back undoes scrolling –Forward error recovery: using new actions to fix errors

Fall UI Design and Implementation11 Visualizing the History Use Undo/Redo to browse history and view resulting application state –Not ideal, since user is making changes to model just to view the history Direct visual representation web browser historygraphical history

Fall UI Design and Implementation12 Undo and Redo Lists History list is a script of commands that generates the current model state Undo & Redo edit the script –Undo removes last action from history list and puts it on redo list –Redo adds back one action from redo list –Undo & Redo are not put in either list History listRedo list Current state

Fall UI Design and Implementation13 Adding New Commands to History New command is added to history list –And clears the redo list (in most apps) Or new command may branch history History listRedo list New command History list Redo list New command

Fall UI Design and Implementation14 Removing Commands from History (Selective Undo) Selective undo = deleting any action from the history list, not necessarily the last Selective redo = redoing any action in redo list, not necessarily the first Need to visualize history to choose action to undo Essential for multiuser applications Watch out for command interdependencies Create rectangle #5 Distribute all rectangles horizontally Delete text start=10,len=10 Delete text start=0,len=5

Fall UI Design and Implementation15 Undo Implementation History is a list of command objects –with undo() and redo() methods Command object must store enough data to implement undo and redo –Partial checkpoint of prior state Move circle from (0,0) to (100,100) Change text from Times to Arial –Object references vs. location descriptions Insert “ hello ” at char position 33 vs. Insert “ hello ” at marker # –Relative difference vs. absolute before & after values Move circle from (90,120) to (100, 100) vs. Move circle by (10,-20)

Fall UI Design and Implementation16 Swing Undo Architecture UndoableEdit undo() redo() CompoundEdit addEdit(UndoableEdit) StateEdit UndoManager UndoableEditListener editHappened(UndoableEditEvent) Document JTextComponent listeners model *

Fall UI Design and Implementation17 Implementation Challenges Global changes may need to save a lot of prior state –e.g. whole-image operations in an image editor Redo of object creation must produce references usable by subsequent modification/deletion actions –1: Create circle #5023 center (10,10) radius 20 –2: Change color circle #5023 from black to white –Undo 1 & 2, then redo 1 –Redo must restore the original circle so that action 2 still refers to it Object references on history list prevent garbage collection of deleted objects –generally handled by limited history length