javax.swing.JComboBox.getAccessibleContext()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(14.2k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中javax.swing.JComboBox.getAccessibleContext()方法的一些代码示例,展示了JComboBox.getAccessibleContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.getAccessibleContext()方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:getAccessibleContext

JComboBox.getAccessibleContext介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

JComboBox comboBox = new JComboBox(...);
Object child = comboBox.getAccessibleContext().getAccessibleChild(0);
BasicComboPopup popup = (BasicComboPopup)child;
JList list = popup.getList();
list.setSelectionBackground(Color.RED);

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp

private void initComponents() {
  setLayout(new BorderLayout());
  combobox = new JComboBox();
  combobox.setModel(new DefaultComboBoxModel());
  combobox.addActionListener(this);
  add(combobox, BorderLayout.CENTER);
  combobox.getAccessibleContext().setAccessibleName(
      radioButton.getAccessibleContext().getAccessibleName());
  combobox.getAccessibleContext().setAccessibleDescription(
      radioButton.getAccessibleContext().getAccessibleDescription());
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp

private void initComponents() {
  setLayout(new BorderLayout());
  combobox = new JComboBox();
  combobox.setModel(new DefaultComboBoxModel());
  combobox.addActionListener(this);
  combobox.getAccessibleContext().setAccessibleName(
      radioButton.getAccessibleContext().getAccessibleName());
  combobox.getAccessibleContext().setAccessibleDescription(
      radioButton.getAccessibleContext().getAccessibleDescription());
  add(combobox, BorderLayout.CENTER);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_SelectProjectPanel"));
  btnProject.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_btnProject"));
  comProject.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_comProject"));
}

代码示例来源:origin: net.java.abeille/abeille

/** Initializes the Form */
public FindDialogPanel() {
  initComponents();
  getAccessibleContext().setAccessibleName(LocaleSupport.getString("find-title")); // NOI18N
  getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_find")); // NOI18N
  findWhat.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_" + SettingsNames.FIND_WHAT)); // NOI18N
  replaceWith.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_" + SettingsNames.FIND_REPLACE_WITH)); // NOI18N
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameAndLocationPanel"));
  comPackageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
  comCategory.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Category"));
  txtDisplayName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_DisplayName"));
  txtName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Name"));
  txtProjectName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ProjectName"));
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFilesValue"));
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFilesValue"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_BasicSettingsPanel"));
  cbOpenedOnStart.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_OpenOnStart"));
  cbKeepPrefSize.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_KeepPrefSize"));
  comMode.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Mode"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameIconLocationPanel"));
  classNamePrefix.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_ClassNamePrefix"));
  displayName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_DisplayName"));
  category.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_Category"));
  icon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_Icon"));
  iconButton.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_IconBrowse"));
  project.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_ProjectName"));
  packageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_PackageName"));
  createdFiles.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_CreatedFiles"));
  modifiedFiles.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_ModifiedFiles"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  getAccessibleContext().setAccessibleDescription(getMessage("ACS_form"));
  projectNameValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ProjectName"));
  packageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFilesValue"));
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFilesValue"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccesibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_ActionTypePanel"));
  alwaysEnabled.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_alwaysEnabled"));
  condionallyEnabled.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_condionallyEnabled"));
  cookieClass.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_cookieClass"));
  modeMultiple.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_modeMultiple"));
  modeOne.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_modeOne"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_OptionsPanel"));        
  projectNameValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ProjectName"));
  packageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFilesValue"));
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFilesValue"));
  txtPrefix.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL__ClassNamePrefix"));
}

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

@Override public void run() {
    JComboBox combo = (JComboBox) e.getSource();
    Accessible a = combo.getAccessibleContext().getAccessibleChild(0);
    //Or Accessible a = combo.getUI().getAccessibleChild(combo, 0);
    if (a instanceof BasicComboPopup) {
      BasicComboPopup pop = (BasicComboPopup) a;
      Point p = new Point(combo.getSize().width, 0);
      SwingUtilities.convertPointToScreen(p, combo);
      pop.setLocation(p);
    }
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

private void initAccessibility() {
  // Accessibility
  getAccessibleContext().setAccessibleDescription(getString("RUN_DIALOG_PANEL_AD"));
  executableTextField.getAccessibleContext().setAccessibleDescription(getString("EXECUTABLE_AD"));
  executableBrowseButton.getAccessibleContext().setAccessibleDescription(getString("BROWSE_BUTTON_AD"));
  projectComboBox.getAccessibleContext().setAccessibleDescription(getString("ASSOCIATED_PROJECT_AD"));
  runDirectoryTextField.getAccessibleContext().setAccessibleDescription(getString("RUN_DIRECTORY_LABEL_AD"));
  runDirectoryBrowseButton.getAccessibleContext().setAccessibleDescription(getString("RUN_DIRECTORY_BUTTON_AD"));
  argumentTextField.getAccessibleContext().setAccessibleDescription(getString("ARGUMENTS_LABEL_AD"));
  environmentTextField.getAccessibleContext().setAccessibleDescription(getString("ENVIRONMENT_LABEL_AD"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameAndLocationPanel"));
  comPackageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
  txtIcon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Icon"));
  txtPrefix.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Prefix"));
  btnIcon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_IconButton"));
  txtProjectName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ProjectName"));
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFilesValue"));
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFilesValue"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_OptionsPanel0"));
  advancedButton.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_Advanced"));
  optionsCategoryButton.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_OptionsCategory"));
  secondaryPanelTitle.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_DisplayName"));
  categoryNameField.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CategoryName"));
  iconField.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_IconPath"));
  iconButton.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_IconButton"));
  allowSecondaryPanelsCheckBox.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_AllowSecondaryPanels"));
  primaryPanelCombo.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PrimaryPanelCombo"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameAndLocationPanel"));
  comPackageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
  txtIcon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Icon"));
  txtPrefix.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Prefix"));
  btnIcon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_IconButton"));
  txtProjectName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ProjectName"));
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFilesValue"));
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFilesValue"));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameAndLocationPanel"));
  className.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ClassName"));
  createdFiles.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFiles"));
  displayName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_DisplayName"));
  icon.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Icon"));
  iconButton.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_IconButton"));
  modifiedFiles.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFiles"));
  packageName.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_PackageName"));
  project.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Project"));
}

代码示例来源:origin: net.java.abeille/abeille

/** Initializes the UI and fetches the history */
public GotoDialogPanel() {
  initComponents();
  getAccessibleContext().setAccessibleName(LocaleSupport.getString("goto-title")); // NOI18N
  getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_goto")); // NOI18N
  gotoCombo.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_goto-line")); // NOI18N
  List history = (List) EditorState.get(HISTORY_KEY);
  if (history == null)
    history = new ArrayList();
  updateCombo(history);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib

/** Initializes the UI and fetches the history */
public GotoDialogPanel() {
  initComponents ();
  getAccessibleContext().setAccessibleName(LocaleSupport.getString("goto-title")); // NOI18N
  getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_goto")); // NOI18N
  gotoCombo.getAccessibleContext().setAccessibleDescription(LocaleSupport.getString("ACSD_goto-line")); // NOI18N
  List history = (List)EditorState.get( HISTORY_KEY );
  if( history == null ) history = new ArrayList();
  updateCombo( history );
}

代码示例来源:origin: aterai/java-swing-tips

protected static void repaintComboBox(JComboBox<?> combo, int row) {
 if (combo.getSelectedIndex() == row) {
  combo.repaint();
 }
 Accessible a = combo.getAccessibleContext().getAccessibleChild(0);
 if (a instanceof ComboPopup) {
  JList<?> list = ((ComboPopup) a).getList();
  if (list.isShowing()) {
   list.repaint(list.getCellBounds(row, row));
  }
 }
}

相关文章

JComboBox类方法