7124527: [macosx] SwingSet2, label is not read by VoiceOver when focus is on textfield for Internalframe and Table demo.
Reviewed-by: asemenov, serb
This commit is contained in:
parent
ed9592c6e8
commit
0ec3d2e363
src/demo/share/jfc/SwingSet2
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -271,6 +271,7 @@ public class InternalFrameDemo extends DemoModule {
|
||||
|
||||
windowTitleField = new JTextField(getString("InternalFrameDemo.frame_label"));
|
||||
windowTitleLabel = new JLabel(getString("InternalFrameDemo.title_text_field_label"));
|
||||
windowTitleLabel.setLabelFor(windowTitleField);
|
||||
|
||||
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
||||
p.add(Box.createRigidArea(HGAP5));
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -281,6 +281,7 @@ public class TableDemo extends DemoModule {
|
||||
selectionModeComboBox.addItem(getString("TableDemo.one_range"));
|
||||
selectionModeComboBox.addItem(getString("TableDemo.multiple_ranges"));
|
||||
selectionModeComboBox.setSelectedIndex(tableView.getSelectionModel().getSelectionMode());
|
||||
selectionModeComboBox.getAccessibleContext().setAccessibleName(getString("TableDemo.selection_mode"));
|
||||
selectionModeComboBox.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
JComboBox<?> source = (JComboBox<?>)e.getSource();
|
||||
@ -310,6 +311,7 @@ public class TableDemo extends DemoModule {
|
||||
resizeModeComboBox.addItem(getString("TableDemo.last_column"));
|
||||
resizeModeComboBox.addItem(getString("TableDemo.all_columns"));
|
||||
resizeModeComboBox.setSelectedIndex(tableView.getAutoResizeMode());
|
||||
resizeModeComboBox.getAccessibleContext().setAccessibleName(getString("TableDemo.autoresize_mode"));
|
||||
resizeModeComboBox.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
JComboBox<?> source = (JComboBox<?>)e.getSource();
|
||||
@ -330,6 +332,9 @@ public class TableDemo extends DemoModule {
|
||||
footerTextField = new JTextField(getString("TableDemo.footerText"), 15);
|
||||
fitWidth = new JCheckBox(getString("TableDemo.fitWidth"), true);
|
||||
printButton = new JButton(getString("TableDemo.print"));
|
||||
|
||||
headerLabel.setLabelFor(headerTextField);
|
||||
footerLabel.setLabelFor(footerTextField);
|
||||
printButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent ae) {
|
||||
printTable();
|
||||
|
Loading…
x
Reference in New Issue
Block a user