upButton = loadImageIcon("images/buttonImage2.gif","Round button with gold border, green on the inside, and dark triangle pointing right.");
downButton = loadImageIcon("images/buttonImage3.gif","Round button with gold border, green on the inside, and green triangle pointing right.");
disabledButton = loadImageIcon("images/buttonImage4.gif","Round button with gold border, green on the inside, and greyed out triangle pointing right.");
}
private class AccessibilityEasterListener extends MouseAdapter {
StringTokenizer descriptionTokens;
String descriptionText;
JMenuItem menuItem;
public AccessibilityEasterListener(JMenuItem mi, String descs) {
super();
descriptionTokens = new StringTokenizer(descs, ",");
descriptionText = descs;
menuItem = mi;
}
public void mouseEntered(MouseEvent e) {
if (!descriptionTokens.hasMoreTokens()) {
descriptionTokens = new StringTokenizer(descriptionText, ",");
groupLabel.getAccessibleContext().setAccessibleDescription("The JFC Swing Toolkit is a cooperative effort between JavaSoft and Netscape. The SwingSet demo is Copyright 1997 Sun Microsystems, Inc. All Rights Reserved.");
options.getAccessibleContext().setAccessibleDescription("Look and Feel options: select one of several different Look and Feels for the SwingSet application");
// Look and Feel Radio control
ButtonGroup group = new ButtonGroup();
ToggleUIListener toggleUIListener = new ToggleUIListener();
windowsMenuItem = (JRadioButtonMenuItem) options.add(new JRadioButtonMenuItem("Windows Style Look and Feel"));
"Listing of all of the individual contributors to Swing");
mi = (JMenuItem) people.add(new JMenuItem("Michael Albers", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Mark Andrews", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Tom Ball", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Alan Chung", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Jeff Dinkins", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Amy Fowler", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Brian Gerhold", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Makarand Gokhale", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("James Gosling", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("David Karlton", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Dave Kloba", redDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
tabbedPane.setSelectedIndex(toolTipIndex);
((ToolTipPanel)toolTipPanel).itsEaster(false);
swing.invalidate();
swing.validate();
swing.repaint();
}
});
mi = (JMenuItem) people.add(new JMenuItem("Peter Korn", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addMouseListener(new AccessibilityEasterListener(mi, "Wrote Accessibility API,Wrote outSPOKEN for Windows,Wrote GUIAccess for Windows,Contributed to outSPOKEN for Macintosh,Contributed to inLARGE for Macintosh"));
mi = (JMenuItem) people.add(new JMenuItem("Rick Levenson", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Dana Miller", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Philip Milne", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Dave Moore", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Hans Muller", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Jill Nakata", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Tim Prinzing", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Chester Rose", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Chris Ryan", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Ray Ryan", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Georges Saab", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Tom Santos", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Jeff Shapiro", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Joseph Scheuhammer", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Rich Schiavi", blueDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi.addActionListener(easterListener);
mi = (JMenuItem) people.add(new JMenuItem("Nancy Schorr", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Sara Swanson", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Harry Vertelney", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Scott Violet", invisibleDot));
mi.setHorizontalTextPosition(JMenuItem.RIGHT);
mi = (JMenuItem) people.add(new JMenuItem("Willie Walker", invisibleDot));