Presentation on theme: "Principle 7: Design for Responsiveness You want the interface to be fast (but not too fast). Sub-second response time is the norm, but if things happen."— Presentation transcript:
Principle 7: Design for Responsiveness You want the interface to be fast (but not too fast). Sub-second response time is the norm, but if things happen too fast the user begins to wonder if the right things are getting done. The user is more satisfied if the machine pauses a little when working on what the user believes to be a lot of steps that SHOULD slow the machine down. If it will take a while, there should be feedback that the machine is working. If it gets the job done instantaneously there should be confirmation of what has been done.
Perception of Responsiveness Defined Impeding the users work flow (the user should be able to set the pace and have the machine keep up). Lack of feedback on accomplishmentsthe user has to go out and check to make sure that the work was done. Locking the machine to prevent user intervention holding the user hostage, especially without any indication of the length of the side trip. Ignoring or not acknowledging user input in a timely manner. On the web the penalty of non-responsiveness is that the user changes sites. Designers must be aware of the price of client server interaction and should attempt to do as much processing on the client as possible.
Seven Guidelines Responsiveness can be high when performance (speed of execution) is sluggish. CPUs are normally burdenedsoftware always demands more than hardware can give. UI is real-time programming All delays are not equal, priorities should be evident. Software can reorder requests to process them more efficiently. All requests need not be honored Humans and software make different requirements on interfacesthe user is not just another module of the system.
Exam 1 86 A 79 A 76 A- 67 B 62 B- Item analysis: – 1a 1b 1c 1d 2 3 4 5 6 7a 7b 7c 7d 7e –0.84 0.76 0.64 0.6 0.35 0.8 0.82 0.48 0.72 1 0.6 1 0.6 0.6 –7f 7g 7h 7i 7j 7k 7l 7m 7n 8 9a 9b 9c average –0.8 0 0.6 1 1 0.8 0.8 0.8 1 0.91 0.96 0.8 0.76 74 Threads inherit a run() (Runable interfaces must add a run() Standard levels are –3000, 0, 100 (palette), 200 (modal), 300 (popup) & 400 (drag) JComponet is an abstract class that provides a lot of services to all the Swing components. JPanel adds almost no functionality beyond what all Jcomponent objects have, but the constructor allows the setting of the LayoutManger and doublebuffering.
Using Graphics Primitives The library has methods to draw lines (between two points, in direction), rectangles, polygons, round rectangles, ovals, and arcs. Polygons and ovals can also be filled. Java 2D API has more shapes. When you get to counting pixels you find that Java outlines shapes, so that you must specify one pixel less for height and width to get the same area described as you do in requesting a filled shape. There is a default line color and a default fill color. Shapes with negative dimensions do not get drawn at all, but drawing outside the graphic area merely causes clipping.
Examples RectangleDemo (note how filled rectange is drawn inside of rectangle)RectangleDemo ShapesDemo (demonstrates calls on variety of library shape-drawing methods)ShapesDemo FontDemo applet TextXY applet The Font and FontMetrics classes allow customization not possible with a text-drawing component such as a label or a text component. –g.drawString(text, x,y) [y is baseline, x is lower-left corner of text image (less descender) Text height above base line is getAscender, getHeight is distance between baselines. getLeading is distance from descender to next ascender. Advance width measures the pixels used from the current point to display the character, byte or string.] –g.drawBytes and g.drawChars