Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.

Slides:



Advertisements
Similar presentations
Designing a Graphical User Interface (GUI) 10 IST – Topic 6.
Advertisements

Event Handling.
Computer Science 209 Graphics and GUIs. Working with Color The class java.awt.Color includes constants for typical color values and also supports the.
Inner Classes in Java CMSC 432 Shon Vick. 2 Conceptual Structure package p 1 class A 1 class A 2... class A n... package n class A 1 class A 2... class.
CS 180 Problem Solving and Object Oriented Programming Fall 2011 Notes for Week 10: Oct 24-28, 2011 Aditya Mathur Department of Computer Science Purdue.
CS 180 Problem Solving and Object Oriented Programming Fall 2011 Notes for Week 9: Oct 17-21, 2011 Aditya Mathur Department of Computer Science Purdue.
Mouse Events and Keyboard Events
Event Handling Events and Listeners Timers and Animation.
Hoofdstuk 13 Object-georiënteerd ontwerp. Methode-aanroep: Type van parameters void paint(Graphics g) { g.drawRect( ); class Graphics { void drawRect(int.
For IST410 Students only Events-1 Event Handling.
Graphics Programming with Inheritance Template pattern (Chap 6, se SceneEditor)
3D Game Programming All in One By Kenneth C. Finney.
Monday, April 2, 2007 Multisensory & Multimedia Multisensory & Multimedia.
GUI. Swing Class Hierarchy Swing Components Swing Conatiners  JFrame – top-level window to store components.
EVENTS CSC 171 FALL 2004 LECTURE 16. “Traditional” Input In console applications, user input is under control of the program The program asks the user.
GUI Event Handling Nithya Raman. What is an Event? GUI components communicate with the rest of the applications through events. The source of an event.
Graphical User Interfaces A Quick Outlook. Interface Many methods to create and “interface” with the user 2 most common interface methods: – Console –
Mouse Events. Handling Mouse Events Java provides two listener interfaces to handle mouse events: MouseListener;  MouseListener;  MouseMotionListener.
1 CSE 331 More Events (Mouse, Keyboard, Window, Focus, Change, Document...) slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D.
More Event Handling Adapters Anonymous Listeners Pop menus Validating User Input.
Cs884(Prasad)java12AWT1 Abstract Windowing Toolkit Support for Graphical User Interface (Event-driven programming)
CS 11 java track: lecture 4 This week: arrays interfaces listener classes inner classes GUI callbacks.
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.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 14 Event-Driven Programming.
CSE 501N Fall ‘09 20: Event Handling and Inner Classes 17 November 2009 Nick Leidenfrost.
SD2071 Games Programming Abstraction, inheritance and interfaces Exceptions Two dimensional arrays Java collections framework Files Aaron Kans.
Previous programs used a JLabel for OUTPUT. Another Swing component that can be used for both user input and output is the JTextfield. Suppose we want.
Lesson 34: Layering Images with Java GUI. The FlowLayout RECAP.
Graphic User Interface. Graphic User Interface (GUI) Most of us interact with computers using GUIs. GUIs are visual representations of the actions you.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
Copyright © 2002, Systems and Computer Engineering, Carleton University b-Gui2.ppt * Object-Oriented Software Development Part 18-b Building.
COMP 321 Week 2. Outline Event-Driven Programming Events, Event Sources, Event Listeners Button and Timer Events Mouse Events, Adapters.
CSE 219 Computer Science III Image Manipulation. HW 1 Has been posted on Blackboard Making a Game of Life with limited.
E.g.: MS-DOS interface. DIR C: /W /A:D will list all the directories in the root directory of drive C in wide list format. Disadvantage is that commands.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Event Handling. 2 GUIs are event driven –Generate events when user interacts with GUI e.g., moving mouse, pressing button, typing in text field, etc.
Understand the difference between applets and applications Identify meaningful applet resources for academic subjects Create and demonstrate a basic Java.
© Marty Hall, Larry Brown Web core programming 1 Handling Mouse and Keyboard Events.
Object Oriented Programming.  Interface  Event Handling.
CS 151: Object-Oriented Design October 31 Class Meeting Department of Computer Science San Jose State University Fall 2013 Instructor: Ron Mak
GUI DYNAMICS Lecture 11 CS2110 – Fall GUI Statics and GUI Dynamics  Statics: what’s drawn on the screen  Components buttons, labels, lists, sliders,
COSC 4126 User Interaction User Interaction capturing and responding to input events.
Mouse Listeners Moving the mouse will also generate events like the Timer –To have your program respond, you must implement either or both of MouseListener.
CS Lecture 04 Mice Lynda Thomas
CS 180 Problem Solving and Object Oriented Programming Fall 2010 Notes for Week 9: Oct 18-22, 2010 Aditya Mathur Department of Computer Science Purdue.
1 Event Handling – Lecture 4 Prepared by: Ahmad Ramin Rahimee Assistant Professor ICTI.
Laboratory Study November, Demonstrates Life Cycle of an Applet + Mouse Events + Scrolling.
What Is an Event? Events – Objects that describe what happened Event sources – The generator of an event Event handlers – A method that receives an event.
Event Listeners ActionListener –button,list AdjustmentListener-scroll bar ComponentListener-when component hidden…. ContainerListener-comp added or removed.
Institute of Ambient Intelligence 2009, Choi, Namseok, Dongseo Univ., Java 기초 ( 컴포넌트와 이벤트 처리 프로그래밍 ) Choi,
CSI 3125, Preliminaries, page 1 Event Handling. CSI 3125, Preliminaries, page 2 Event Handling An Event Change in the state of an object is known as event.
Mouse Events GUI. Types of Events  Below, are some of the many kinds of events, swing components generate. Act causing EventListener Type User clicks.
TENTH LECTURE Event and listener. Events and Listeners An event can be defined as a type of signal to the program that something has happened. The event.
Dept. of CSIE, National University of Tainan 10/21/2012 Responding to User Input.
Prepared by: Dr. Abdallah Mohamed, AOU-KW Unit7: Event-driven programming 1.
Events and Event Handling
Topics Graphical User Interfaces Using the tkinter Module
Lecture 8 Object Oriented Programming Using Java
Computer Science 209 Graphics and GUIs.
GUI III IS
Programming in Java Event Handling
GUI Event Handling Nithya Raman.
GUI Programming III: Events
CSE Software Engineering Fall 1999 Updated by J. Brown
Event-driven programming for GUI
ITEC324 Principle of CS III
Events, Event Handlers, and Threads
Final project.
ITEC324 Principle of CS III
Chapter 6 Inheritance.
Presentation transcript:

Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005

Standard Inputs What makes an input “standard”?

Keyboard Connect keys to different behavior (Correction: KeyAdapter, etc., is in java.awt.event)

Mouse Clicks, drags, etc.

gridCanvas.addMouseListener( new TesterMouseMotionListener()); class TesterMouseMotionListener implements MouseListener, MouseMotionListener { public void mousePressed(MouseEvent e) { int xPos = e.getX(); int yPos = e.getY(); System.out.println("Clicked at "+xPos+", "+yPos); if ((xPos = 0 && yPos >= 0){ ((Device)(Tester.getAllDevices().elementAt(0))).setPosition(new Vec2(xPos, yPos)); } Tester.getGridCanvas().repaint(); } public void mouseDragged(MouseEvent e) {} public void mouseMoved(MouseEvent e) {} public void mouseReleased(MouseEvent e){} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} public void mouseClicked(MouseEvent e) {} }

Equivalent to: gridCanvas.addMouseListener(new TesterMouseAdapter()); class TesterMouseAdapter extends MouseAdapter { public void mousePressed(MouseEvent e) { int xPos = e.getX(); int yPos = e.getY(); System.out.println("Clicked at "+xPos+", "+yPos); if ((xPos = 0 &&yPos >= 0) { ((Device)(Tester.getAllDevices().elementAt(0))).setPosition( new Vec2(xPos, yPos)); } Tester.getGridCanvas().repaint(); }

Graphical User Interfaces (GUIs) “Standard” screen widgets

Buttons Clickable area of screen, graphically represented as a raised button, often with a text label.

Sliders Variable input (and output) Text label Returns an int, so need to give it a large scale if an approximately continuous response is wanted.

Check boxes Set parameters Often paired with one or more buttons

Radio Buttons Only one can be selected at a time

Text Boxes Enter one or more lines of text. Often coupled with a button.

Others?

Example: New York Times What GUI elements does the site include?

Other GUI Elements? Can we think of any other GUI widgets that would be useful?

Less Standard Does not ship with typical PCs

Adapting the Mouse and Keyboard Physical coupling

3D GUI Croquet Alan Kay

Game Pad

Stylus

Accelerometer EcoRaft Repurposing mouse

USB Button

Telephone tones

Voice: Non-verbal AlphaWolf Volume Harmonicity Length

Voice: Language-based Sphinx

Sphinx + FreeTTS

IrDA EcoRaft

Vision: Background subtraction Look for differences in the pixels from frame to frame.

Vision: Multi-camera

Tangible User Interfaces (TUIs) Ishii et al.

Location: GPS Geocaching

Location: Other PlaceLab access points, etc.

Synthetic Nose Natalie Jeremijenko

Integrating Input with Graphics and Sound

Evaluating Input Technologies Quantitative study - e.g., how fast can users accomplish some task using the input? Qualitative study - which inputs do they like and why? Artistic license - what feels good to you?

Readings

Dourish Context How much input needs to be consciously delivered by a person? How much can provide implicit contextual cues? How much context can be extrapolated/interpolated from other information?

Reeves & Nass Social interactions with computers Politeness

Schechner Indian Theater vs. Western Theater Engaging the body viscerally. How can interactive computational systems engage the body and the senses?

Vectorpark

Ze Frank’s Frog

Other sites to analyze?