applied hci l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Applied HCI PowerPoint Presentation
Download Presentation
Applied HCI

Loading in 2 Seconds...

play fullscreen
1 / 20

Applied HCI - PowerPoint PPT Presentation


  • 337 Views
  • Uploaded on

Applied HCI Week Six Mice in Space Overview Announcements ACM Meeting February 22 Women’s Basketball Pass out attendance roll Questions regarding Project 3 Lecture on Mouse events Critique and Lab time. Mouse Events In Spatial GUIs Spatial Interfaces Summary of Mouse Events

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Applied HCI' - Ava


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
applied hci

Applied HCI

Week Six

Mice in Space

overview
Overview
  • Announcements
    • ACM Meeting February 22
    • Women’s Basketball
  • Pass out attendance roll
  • Questions regarding Project 3
  • Lecture on Mouse events
  • Critique and Lab time.
mouse events in spatial guis
Mouse Events In Spatial GUIs
  • Spatial Interfaces
  • Summary of Mouse Events
  • Mouse Clicking Modifiers
  • Some Important Mouse Event Tips
  • Contextual Events in a Spatial GUI
  • Creating an Event Plan
  • Communication Among Events
spatial interfaces
Spatial Interfaces
  • Spatial interfaces rely mostly on mouse events, not on the keyboard input. Hybrid Interfaces will rely on both mouse and keyboard input.
  • In this course, mouse events may be thought of equally as:
    • mouse
    • trackball
    • touchpad
    • touch screen
    • etc.
summary of mouse events
Summary of Mouse Events

All of the actions below are reported as MouseEvents via a MouseListener or a MouseMotionListener

  • The primary event methods detected for a MouseListener are:
    • mouseClicked
    • mousePressed
    • mouseReleased
    • mouseEntered (when a mouse enters a component)
    • mouseExited (when the mouse exits a component)
  • The primary event methods detected for a MouseMotionListener are:
    • mouseDragged (mouse moving with a button pressed)
    • mouseMoved (mouse moving with no buttons pressed)
mouse clicking modifiers
Mouse Clicking Modifiers

Mouse clicks may be further modified:

  • * verify on your own system
  • * * Caution these clicks require keyboard input which may cause a cognitive interrupt
sample of java code to determine which button was clicked
Sample of Java Code to Determine Which Button Was Clicked

private void formMousePressed(java.awt.event.MouseEvent evt) {

if (evt.getButton() == 1) {

processLeftButton(evt); // button 1

} else {

processRightButton(evt); // button 3

}

}

Alternatively you may use:

(evt.getModifiers() == InputEvent.BUTTON1_MASK)

sample of java code to determine if shift key and mouse clicked
Sample of Java Code to Determine if Shift Key and Mouse Clicked

private void formMouseClicked(java.awt.event.MouseEvent evt) {

if (evt.isShiftDown()) {

}

some important mouse event tips
Some Important Mouse Event Tips
  • The location of Mouse Listeners handler is important! Place the listener in the JPanel you wish to work in, as the x and y coordinates will be relative to that panel.
  • Use the mousePressed method to determine where you are and what you are doing. For example, if you are inside a component you should determine which component your in within the mousePressed method.
  • Use the mouseDragged method to either move an object or “drag” a line.
  • Use the mouseReleased method to determine what you wish to do when you have completed your mouse action
contextual events in a spatial gui
Contextual Events in a Spatial GUI
  • Mouse events are usually contextual in spatial environments. That is, they may have different meanings depending on the context in which the event occurs.
  • Examples of contexts include:
    • clicking in a component may mean I wish to:
      • modify a component
      • delete a component
      • move a component
      • connect two components (via a connector)
    • clicking outside a component may mean I wish to create a new component at this location
contextual events in a spatial gui11
Contextual Events in a Spatial GUI
  • Other ways of determining the context include:
    • the type of button clicked (e.g. left/right buttons, single/multiple clicks, key + click)
    • via items selected elsewhere in the GUI environment (e.g. the type of component you wish to create).
contextual events in a spatial gui12
Contextual Events in a Spatial GUI
  • Caution: selecting the type of contexts is crucial to successful event handling and is not trivial. The contexts must be kept straight, as there may be competing contexts at play
contextual events in a spatial gui13
Contextual Events in a Spatial GUI

Best approach is to:

  • Prior to coding, construct an event plan:
    • Identify the contexts (and their triggering events).
    • Anticipate as many conflicts as possible.
  • During coding:
    • Try to incrementally develop the event handlers (e.g. work with components prior to working on connectors)
    • Test as you go! (Do NOT try to do this all at once!)
event plan
Event Plan
  • *if components or connectors are handled separately by type, you should create additional columns
  • Please note there is no retrieve in this CRUD interface since it is assumed that the components will be retrieved and visible.
communication among events
Communication Among Events

It is important to communicate between the events. This may be accomplished by way of signals or booleans.

mouse events in spatial guis16
Mouse Events In Spatial GUIs
  • Spatial Interfaces
  • Summary of Mouse Events
  • Mouse Clicking Modifiers
  • Some Important Mouse Event Tips
  • Contextual Events in a Spatial GUI
  • Creating an Event Plan
  • Communication Among Events
project critiques
Project Critiques
  • Please do not underestimate the importance of these critique sessions!!!
  • Be prepared! Have your project ready for usability testing prior to turn in.
  • Have your partner go through an entire set of predetermined tasks as set up by you. (e.g. create, retrieve, update, and delete). Use the assignment specs as a guide, but don’t be afraid to augment with additional tests to suit your additional features.
project developer s responsibilities
Project Developer’s Responsibilities
  • When your partner runs your project, watch what he/she does. Take notes, but do not interfere, unless help is requested or required. Does your partner:
    • Get excited?
    • Get confused?
    • Struggle with a task?
    • Know exactly what to do?
user s responsibilities
User’s Responsibilities
  • Be prepared to test the entire project.
  • Give it an honest try, but do not bend over backwards to make the project work. If the interface is not intuitive or straightforward, help your partner by letting him/her know.
  • Don’t be insulting but don’t hold back either.
applied hci20

Applied HCI

Week Six

Mice in Space