Perforce JViews Charts Sample: Accessibility in a Chart
Description
This sample shows how to enable and utilize various accessibility features, such as keyboard navigation and redundant colors, in a chart.
How to Use the Sample
- Accessibility means making software usable by people with certain common disabilities. Examples are the physical inability to move a mouse, low vision, or color blindness. This sample illustrates how to use the keyboard instead of the mouse to navigate a chart, and how to make colors redundant in various types of charts.
- When the sample is first launched, focus is on the first button of the toolbar. This is the "Print" button. The currently focused element in the user interface is indicated in the status line at the bottom of the sample.
- Press the Tab key to move the focus forward through the user interface elements, or press Shift-Tab to move the focus backward.
- When you move the focus into the chart, the Tab and Shift-Tab keys move the focus through the scales, renderers, and data points or data objects of the chart. Press the Control-Tab key to move the focus forward out of the chart, or press Control-Shift-Tab to move the focus backward out of the chart.
- A menu allows you to choose the type of chart being displayed.
- Another menu contains a checkbox that allows you to choose whether scales are considered focusable or not.
- The next menu allows you to choose among two modes: The "traverse all" mode, which arranges all focusable elements of the chart in a single sequence, and the "by level" mode, which structures these elements in several levels and requires the use of down-arrow to enter a sub-level and of up-arrow to leave a level.
- The last menu allows you to choose the way the focusable element in a chart is displayed.
How to Run the Sample as an Application
This sample can
be run as an application.
The installation directory contains
an executable JAR file,
accessibility.jar
,
that allows you to execute the sample with a double click from a
file browser. Note that if you are using Internet Explorer, you can
open the installation directory
and execute the JAR file from the browser. This
technique may not work in other Web browsers.
Alternatively, you
can run the sample application from the command line.
First check that the Ant utility is properly configured. If not, see the
instructions on how to configure Ant for Perforce JViews.
Then, go to the installation directory
of the sample and type:
ant run
Topics Covered
- Accessibility
- How to use the keyboard to navigate through a chart
- How to make colors in a chart redundant
Detailed Description
For keyboard navigation, the Swing notion of focus is complemented by a selection inside a chart: elements of the chart area, such as scales, series, or data points can be selected.
Installation Directory
The Accessibility in a Chart sample is installed here.
Classes Involved
- ilog.views.chart.interactor.IlvChartCycleSelectInteractor
- ilog.views.chart.accessibility.IlvDefaultChartAreaAccessibleHierarchy
- ilog.views.chart.interactor.IlvChartAreaNavigationMode
- ilog.views.chart.interactor.IlvChartAreaSelectionManager
Source Files
-
accessibility.AccessibilityDemo
The main sample application.