java land f

26
Java Look-and- Feel Design Guidelines Eileen Kraemer University of Georgia CSCI 4800/600

Upload: guestc55e903c

Post on 20-May-2015

267 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Java Land F

Java Look-and-Feel Design Guidelines

Eileen KraemerUniversity of GeorgiaCSCI 4800/600

Page 2: Java Land F

An online book …

The Java Look-and-Feel Design Guidelines, Second Edition are available online

Target audience: the designer who chooses the interface elements,

lays them out in a set of components, and designs the user interaction model for an application

Page 3: Java Land F

Focus of the book ….

design guidelines for software that uses the Swing classes together with the Java look and feel.

on creating cross-platform GUI (graphical user interface) applications and applets in the JavaTM programming language.

on design issues and human-computer interaction in the context of the Java look and feel.

guidelines are appropriate for GUI applications and applets on PCs and network computers; doesn’t address the problem of S/W that runs on consumer electronic devices.

Page 4: Java Land F

What is the “Java Look and Feel”?

First of all, what is a “look-and-feel”? The appearance and behavior of a complete set of

GUI components.

Why do we need a Java look-and-feel? Want to have Java applications that have a consistent

look and behavior across multiple platforms The goal of the Java look-and-feel is to provide a

distinctive platform-independent appearance and standard behavior.

Page 5: Java Land F

Java look-and-feel

Flush 3D style surfaces appear to be

in the same plane as the surrounding canvas

border has a bevel

Drag texture Color model

Page 6: Java Land F
Page 7: Java Land F

Elements of the Java L&F

Style of use/appearance of:WindowsMenusToolbarseditor panesdialog boxesalert boxes

Page 8: Java Land F

Java L&F Windows

Platform-specific borders, title bar, and window controls

“Metal” look and feel window contents – menu bar, toolbar, editor pane, etc.

Here’s the code

Page 9: Java Land F

Menus, the Menu Bar

Provide access to and info about application’s primary functions

Later: guidelines for creation of such menus

Page 10: Java Land F

Drop-down menus

Menu separators divide choices into logical groupings

Titles highlighted in blue (default Java look and feel theme)

Can use keyboard shortcuts instead of the mouse.

Mnemonics – another way to access menu items..

Page 11: Java Land F

Keyboard shortcuts

keystroke combinations that activate a menu item from the keyboard even if the menu for that command is not currently displayed.

usually consist of a modifier key and a character key, like Control-Z, plus a few special keys such as F1 and Delete.

Don’t post menus; rather, perform the indicated actions directly.

Page 12: Java Land F

Mnemonic an underlined alphanumeric character in a

menu title, menu item, or other interface component.

reminds the user how to activate the equivalent command by simultaneously pressing the Alt key and the character key that corresponds to the underlined letter or numeral.

See example code for both shortcuts and mnemonics

Page 13: Java Land F

Guidelines for shortcuts …

Specify keyboard shortcuts for frequently used menu items; don’t need a shortcut for every command

 Display shortcuts using the standard abbreviations for key names (such as Ctrl for the Control key), separated by hyphens.

Know the common shortcuts across platforms; use them.  Don’t use the Meta key (the Command key on the

Macintosh platform) for a shortcut, except as an alternate for Control. It isn’t available on some target platforms.

Page 14: Java Land F

Java L&F Toolbar

displays command and toggle buttons that offer immediate access to the functions of many menu items.

divided into functional areas Flush 3D style

Page 15: Java Land F

Java L&F Editor Pane

Editor pane inside a scroll pane

Page 16: Java Land F

Java L&F Dialog Boxes use the

borders and title bars of the platform they are running on

dialog box contents have the Java look and feel

Windows, Mac, CDE

Page 17: Java Land F

Java L&F Alert boxes

Windows, Mac, CDE

Page 18: Java Land F

Java Foundation Classes

An extension to the original Abstract Window Toolkit (AWT), Includes:

the Swing classes, which define a complete set of GUI components for JFC applications

pluggable look and feel designs the Java Accessibility API,

all implemented without native code (code that refers to the functions of a specific operating system or is compiled for a specific processor).

components include: windows and frames, panels and panes, dialog boxes, menus and

toolbars, buttons, sliders, combo boxes, text components, tables, list components, and trees.

Page 19: Java Land F

The Java 2 SDK

contains the AWT, the class library that provides the standard

application programming interfaces for building GUIs for Java programs.

Contains a JFC that also includes the Java 2D APIdrag and dropother enhancements

Page 20: Java Land F

Support for Accessibility

features of the Java 2 SDK that support people with special needs: the Java Accessibility API

provides “hooks” for an assistive technology to interact and communicate with JFC components ( screen readers and screen magnifiers.)

the Java Accessibility Utilities provides support in locating the objects that implement the Java

Accessibility API. (These utilities are necessary for developers who develop only assistive technologies, not mainstream applications.)

keyboard navigation, mnemonics, keyboard shortcuts (also called "accelerators"), customizable colors and fonts, and dynamic GUI layout.

A “pluggable” look and feel architecture that can be used to build both visual and nonvisual designs, such as audio and tactile UIs

Page 21: Java Land F

Accessibility, continued

Keyboard navigation enables users to use the keyboard to move

between components, open menus, highlight text, and so on.

makes an application accessible to people who find it difficult or impossible to use a mouse.

Page 22: Java Land F

Support for Internationalization

J2SDK provides internationalized text handling and resource bundles. support for the bidirectional display of text lines

J2SDK provides resource bundles locale-sensitive sorting support for localized numbers, dates, times, and

messages.

Page 23: Java Land F

User Interface Components of the JFC Swing, a complete set of user interface

components, including windows, dialog boxes, alert boxes, panels and panes, and basic controls.

Each JFC component containsa model (the data structure) a user interface (the presentation and

behavior of the component)

Page 24: Java Land F
Page 25: Java Land F

Major JFC UI Components

See table of components

Page 26: Java Land F

Java L&F - Recommendations

Don’t specify look and feel explicity. cross-platform l&f allows app to appear and perform

the same everywhere simplifies the app's development and doc Java look and feel is used by default. If error occurs while specifying name of any l&f, the

Java l&f is used by default. Available Look and Feel Designs:

Metal Windows CDE/Motif