Wendy Chisholm, M.S.
Neal Ewers
Mark Novak, BSEE, PE
info@trace.wisc.edu
Trace R&D Center
2107 Engineering Centers Bldg.
1550 Engineering Dr.
Madison, WI 53706
(608) 262-6966
This paper provides a brief review of terminology and object technology followed by an examination of a few Java applications
for accessibility and usability issues. All examples are created with the 1.1.5 release of the JDK and Swing 0.7.
AWT (Abstract Windowing Toolkit): This is the initial set of classes released as the Java Language. Applications developed with this package rely on the operating system to draw components. This means that if the operating system that the Java application is running on does not provide the appropriate information the application may not be accessible. It also means that the application will look different for each operating system it is run on.
Swing: This package of classes, still under development, is based
on Netscape's Internet Foundation Classes (IFC). Contrasted to the
AWT, Swing provides a set of widgets and a framework that allows
developers to specify how their GUI will be presented ACROSS
platforms. We will show you an example of the difference in
information provided by the Swing classes versus the AWT classes.
So what is OOT? Basically, in OOT everything is an "object". An "object" is defined as a self-contained unit that combines both "data" and a means to operate on that stored data. Object operators are typically referred to as "methods." OOT actually "mirrors" the real world and behavior in the real world. This means that everything we deal with on a day to day basis is or can be thought of as an object. The apple in our lunch, the TV in our homes, our car, etc., are all objects. Note, that some objects are more complex than others or consist of many other objects.
To better understand the concept of "objects," think of a can of pop. The pop can "encapsulates" or contains the soda (think of the soda as the can's data). To access the soda (object's data), we must use an operator, or object method. The pop can has one "public" method to access the soda (data), which is the pop can pop-top (method). By opening the pop-top, we are able to access the soda (data). This pop can analogy closely resembles how software objects created using OOT behave. An object has stored data (information) that is only available to other objects by properly using the methods supplied by the object. Realize that there are many different types of objects, data and methods that we have not discussed.
What are some of the advantages of OOT? Well, according to the literature, OOT applications:
In the accessibility/usability field, we can make use of OOT in two distinct areas.
OOT supports information (data) storage and information retrieval (methods) on an object basis. Before OOT, someone (usually the programmer) had to create structures that acted like data and procedures to access that data. Objects provide this behavior by default. Since objects contain data and methods to access that data, objects can communicate with each other. This communication can occur between objects on the same computer within the same application, or on different computers in different applications across the internet, or on a computer talking to a personal pager, or on a cellular phone talking to a web server, etc. The opportunities appear to be endless.
However, there is a price. Before two objects can communicate,
they must be able to talk the "same" language and understand how
each other store and access their data. Finally, many of the
underlying transport mechanisms and development environments are
changing so fast it has been and will continue to be difficult to
keep up with the changes in OOT.
We've included some snippets of the source code from each of the demonstrations below to help present the concepts being discussed.
The first demonstration highlights some of the basic differences
between the AWT and Swing components. To do this, we've created a
simple Java application that is nothing more than a button and
some menu items. The Java application creates two top level
windows, one created using AWT components, and the other created
using Swing components. To understand some of the basic
differences, we'll us a modified version of Explorer to examine
the application. Explorer is one of the three accessibility
utilities that SUN shipped with the early releases of Swing and
the Java Accessibility Interface.
MVC ("Model-View-Controller") is a programming paradigm used to create flexible user interfaces. It is a boon for programming for accessibility because it causes the developer to separate the code that presents the data and interacts with the user from the data and application logic.
Thinking back to the pop and pop can analogy, the can represents how we get at and display the data (the pop). Let us say that the only data value the pop represents is "how many ounces" and we will set that to "12." Therefore, if we pour the pop into a glass, and assume that the glass is larger than 12 ounces, the data has not changed. We still have 12 ounces of pop. We have two methods to change the value of the pop. We can reduce the number of ounces by drinking from a straw or by tilting the glass.
In the MVC paradigm, the pop represents the "model." The can, and the glass represent the "views" and the straw and the tilting are "controllers." In a computer user interface, the model is the application logic (state), the controller supplies the user input to the model (feel) and the view displays the information from the model (look).
Our next demonstration will show how a model can have several
views and controllers. Other possibilities include command-line
and graphical controllers and views.
Java Report (1997-1998) Various Articles. Available: http://www.javareport.com/ or http://www.javareport.com/
Solutions Consulting. (1997) SerialPort - The Java Class for Serial Ports (software) Available: http://www.sc-systems.com/products/serialport/serialport.htm
Sun Microsystems (1998) Java Accessibility API (software) Available: http://java.sun.com/products/jfc/accessibility/doc/index.html
Trace Research and Development.(1997) * Java Accessibility Preliminary Examination. Available: http://trace.wisc.edu/docs/java_access_rpt/report.htm