Lab 8: States and Transitions User Interface Lab: GUI Lab Oct. 16 th, 2013.

Slides:



Advertisements
Similar presentations
Help File For User Creation Click the “Course” button for Creating/Add User.
Advertisements

Lab 9: Code Organization User Interface Lab: GUI Lab October 23 rd, 2013.
Lab 10: Images and Skinning, Sound and Assets User Interface Lab: GUI Lab Oct. 30 th, 2013.
Sending Newsletters with Wordpress and Subscribe2.
OpenCMS and the MSASS Website. A Note on Terminology Locking a file for editing: No lockNOT locked You have write/edit access Someone else has write.
Microsoft® Small Basic
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
1 Model View Controller. 2 Outline Review Definitions of MVC Why do we need it? Administiriva Changing the display Event flow Dragging at interactive.
GTECH 731 Lab Session 1 – Introduction, Lab 1 8/31/10 Tony Ierulli
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
Introduction To Visual Basic 6. Announcements  Thursday, Oct 9th, 7:30PM, C106 Lloyd Douglas (NSF) Diversity in Science-Who needs it? 5 extra credits.
Graphical User Interfaces A Quick Outlook. Interface Many methods to create and “interface” with the user 2 most common interface methods: – Console –
Lab 2: Interface Building User Interface Lab: GUI Lab Sep. 4 th, 2012.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
Lehigh University Introduction to Flash MX Sharmeen Mecklai.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Chapter 8: Writing Graphical User Interfaces
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Colleague Budget Management Questions & Comments Contact Paula Sturge x5559.
Using the Netbeans GUI Builder. The Netbeans IDE provides a utility called the GUI Builder that assists you with creating Windows applications. The Netbeans.
Welcome to the Second Tutorial Welcome to the second part of this information system website tutorial! This tutorial is for church planters. If you’d like.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Lab 6: event & input intro User Interface Lab: GUI Lab Oct. 2 nd, 2013.
Java GUI’s are event driven, meaning they generate events when the user interacts with the program. Typical events are moving the mouse, clicking a mouse.
Lab 3: Actionscript User Interface Lab: GUI Lab Sep. 11 th, 2012.
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
Chapter Two Creating a First Project in Visual Basic.
How to Run a Scenario In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
User Interface Programming in C#: Direct Manipulation Chris North CS 3724: HCI.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
Lab 11: Animation User Interface Lab: GUI Lab Nov. 6 th, 2013.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
Event Handling. Event Issues Event Dispatch – Bottom-up – Top-Down Windowing system must handle events for any application Windowing system may or may.
It’s as Easy as… 1.Login 2.Submit Your Order 3.Track your Files Progress Let Us Show You How! 4. Print Published Documents Innovative technology that gives.
CIS 205—Web Design & Development Flash Chapter 3 Appendix on Using Buttons.
CSE 250 Spring  Can use either Eclipse plugin or web interface  For Eclipse, make sure all the files you want to submit are in the same project.
Host Objects: Browsers and the DOM
Mouse Events GUI. Types of Events  Below, are some of the many kinds of events, swing components generate. Act causing EventListener Type User clicks.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
© Anselm Spoerri Lecture 7 Meaning –Guiding Principles for Term Project Mechanics –Interactivity Recap –Simple and Disjointed Rollovers and Image Map –Navigation.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
WINDOWS 7 Windows 7 is an operating system that Microsoft has produced for use on personal computers. It is the follow-up to the Windows Vista Operating.
Import existing part with drawing
FOP: Multi-Screen Apps
Introduction To Visual Basic 6
Visual Basic Code & No.: CS 218
Chapter Topics 15.1 Graphical User Interfaces
Chapter 8: Writing Graphical User Interfaces
Chapter 2 – Introduction to the Visual Studio .NET IDE
Click on ‘Staff and Students’ to Login note: Please, do not enter your username and password on this page.
Chapter 2 Visual Basic Interface
Simple Windows Applications
GRAPHICAL USER INTERFACE
Polymorphism Pattern.
Taking an Online Benchmark Test in Schoolnet with TestNav
Chapter 15: GUI Applications & Event-Driven Programming
JavaScript and Events CS Programming Languages for Web Applications
Welcome to the Second Tutorial
JavaScript and Events CS Programming Languages for Web Applications
Presentation transcript:

Lab 8: States and Transitions User Interface Lab: GUI Lab Oct. 16 th, 2013

Flash Builder Expiring! Flash Developer for Windows Eclipse for Macs Website will update with fxp/zip options Make sure to read instructions if using Eclipse!

Hw2 Updated Due next Wednesday Added in states & transitions- making the Easy Button clickable.

Project Proposal Also due next Wednesday! Main goal: communicate your project idea – Preliminary scheduling/outlining – Iterable! Extra office hours at request

Lab 8 goals States Transitions

defaultdefaulthoverhover pressedpressed We’ve learned how to change the look of an UI component based on user’s actions using event handlers

States Different looks of an UI component can be considered as different states of the component The component goes from one state to another based on different events defaultdefault hoverhover pressedpressed

Using states in Flex UI components – E.g., buttons – MXML component file The whole application – E.g., the application goes from a “login” state to a “welcome” state – MXML application file

State machine diagram Solid circles: start/end point Rectangles: states Arrows: transitions (directions, conditions)

idleidle hoverhover pressedpressed

State machine diagram States make it easier to conceptualize different sets of appearance and behaviors – A good practice is to draw the design before you start to write code – The diagram could later be used to explain your code to other people

Steps 0. Design your state machine 1.Define states 2.Create the appearance of different states 3.Set up transition using event handlers

idleidle hoverhover pressedpressed Step 0.

Step 1: Define states Define three states for the MXML component: idle, hover, pressed idleidlehoverhoverpressedpressed

Alternative State Definition

Step 2: Create the appearance of different states Text shows the name of the current state Background color: 0xdcdcdc, 0xe6e6fa, 0x8b8989 Use attribute.state=“…” to assign values in different states – E.g., text.idle=“idle” idleidlehoverhoverpressedpressed

Alternative Appearance Setting protected function draw():void { switch (state) { IDLE : {set color for IDLE}; break; … }

Step 3: Set up transitions using event handlers Based on the diagram, what event should we handle? – mouseover, mouseout, mouseup, mousedown – Create these four event handlers

Step 3: Set up transition using event handlers The state of the component can be accessed in currentState Set initial state to be idle Set the rest of the transition based on the diagram

Step 3: Set up transition using event handlers idleidlehoverhoverpressedpressed

idleidle hoverhover pressedpressed

idleidle hoverhover pressedpressed mouseout

idleidle hoverhover pressedpressed pressedoutpressedout (application)

idleidle hoverhover pressedpressed

View states for Application Application can go from one view to another based on user’s actions Let’s create a simple login interface – What is your state diagram?

Login button Is clicked Submit button Is clicked but user name/passwor d is missing Submit button is clicked and both user name & password are entered Logout button Is clicked

Step 1: Define states Define four states

Step 2: Create the appearance of different states Utilize the IDE! – Design view states pane – Code view state selection Use includeIn/excludeIn attribute to include/exclude a component in a state – Avoid redundant code – attribute.state still works!

Step 3: Set up transition using event handlers Based on the diagram Change the value of a userName variable based on the current state

Other State Diagram Examples Another common actions in an interactive UI – dragging. Moves an item or changes the size of an item

Step 0. Start

Step 0. Idle Draggin g Start

Step 0. Idle Draggin g mousedown mouseup mousemove Start

Next time: Code Organization Very helpful for designing and organizing projects!