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

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

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

JTextArea.getAccessibleContext介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-dialogs

area.setEditable(false);
area.setFocusable(true);
area.getAccessibleContext().setAccessibleName(NbBundle.getMessage(NotifyDescriptor.class, "ACN_NotifyDescriptor_MessageJTextArea")); // NOI18N
area.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(NotifyDescriptor.class, "ACD_NotifyDescriptor_MessageJTextArea")); // NOI18N
newMessage = area;

代码示例来源:origin: org.netbeans.api/org-openide-dialogs

ta.setWrapStyleWord(true);
ta.setFont(UIManager.getFont("Label.font")); // NOI18N
ta.getAccessibleContext().setAccessibleDescription(""); // NOI18N
ta.setBorder(BorderFactory.createEmptyBorder());

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

@NbBundle.Messages({
  "ACS_LayoutSummaryPanel=Overview Your Changes",
  "ACS_CTL_Layout_CreatedFilesValue=List of files that will be created",
  "ACS_CTL_Layout_ModifiedFilesValue=List of files that will be modified"
})
private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(Bundle.ACS_LayoutSummaryPanel());
  createdFilesValue.getAccessibleContext().setAccessibleDescription(Bundle.ACS_CTL_Layout_CreatedFilesValue());
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(Bundle.ACS_CTL_Layout_ModifiedFilesValue());
}

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

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_JavaHelpPanel"));//NOI18N
  projectNameValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ProjectName"));//NOI18N
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_CreatedFilesValue"));//NOI18N
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_ModifiedFilesValue"));//NOI18N
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
  java.awt.GridBagConstraints gridBagConstraints;
  jScrollPane1 = new javax.swing.JScrollPane();
  textArea = new javax.swing.JTextArea();
  setLayout(new java.awt.GridBagLayout());
  jScrollPane1.setPreferredSize(new java.awt.Dimension(80, 40));
  textArea.setRows(1);
  textArea.setTabSize(4);
  jScrollPane1.setViewportView(textArea);
  textArea.getAccessibleContext().setAccessibleName(bundle.getString("StringPropertyPanel.panel.AccessibleName"));
  textArea.getAccessibleContext().setAccessibleDescription(bundle.getString("StringPropertyPanel.panel.AccessibleDescription"));
  gridBagConstraints = new java.awt.GridBagConstraints();
  gridBagConstraints.gridx = 0;
  gridBagConstraints.gridy = 0;
  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
  gridBagConstraints.weightx = 0.5;
  gridBagConstraints.weighty = 0.5;
  gridBagConstraints.insets = new java.awt.Insets(6, 10, 10, 10);
  add(jScrollPane1, gridBagConstraints);
}// </editor-fold>//GEN-END:initComponents

代码示例来源: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-kenai-ui

protected JTextComponent createCommandField() {
  JTextArea res = new JTextArea();
  res.getAccessibleContext().setAccessibleName(NbBundle.getMessage(KenaiSearchPanel.class, "KenaiSearchPanel.searchLabel.text"));
  res.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(KenaiSearchPanel.class, "KenaiSearchPanel.searchLabel.AccessibleContext.accessibleDescription"));
  res.setRows(1);
  res.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
  // disable default Swing's Ctrl+Shift+O binding to enable our global action
  InputMap curIm = res.getInputMap(JComponent.WHEN_FOCUSED);
  while (curIm != null) {
    curIm.remove(KeyStroke.getKeyStroke(
        KeyEvent.VK_O, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));
    curIm = curIm.getParent();
  }
  res.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (e.getKeyCode() == KeyEvent.VK_ENTER) {
        SearchField.this.actionPerformed(new ActionEvent(e.getSource(), e.getID(), SEARCH, e.getWhen(), e.getModifiers()));
        e.consume();
      }
    }
  });
  return res;
}

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

private void initComponents() {
    setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    setLayout(new BorderLayout(0, 5));
    JLabel textLabel = new JLabel();
    Mnemonics.setLocalizedText(textLabel, Bundle.SnapshotInfoPanel_UserCommentsLbl());
    textArea = new JTextArea();
    textLabel.setLabelFor(textArea);
    textArea.requestFocus();
    JScrollPane textAreaScroll = new JScrollPane(textArea);
    textAreaScroll.setPreferredSize(new Dimension(350, 150));
    add(textAreaScroll, BorderLayout.CENTER);
    add(textLabel, BorderLayout.NORTH);
    getAccessibleContext().setAccessibleDescription(
        NbBundle.getMessage(NotifyDescriptor.class, "ACSD_InputPanel") // NOI18N
        );
    textArea.getAccessibleContext().setAccessibleDescription(
        NbBundle.getMessage(NotifyDescriptor.class, "ACSD_InputField") // NOI18N
        );
  }
};

代码示例来源:origin: codeminders/javadrone

jTextArea1.setText("Enter - takeoff\nSpace - landing\n\nW -  tilt left\nA -   tilt forward\nS -   tilt backward\nD -  tilt right\n\nArrow Up - increase altitude\nArrow Down - decrease altitude\nArrow Left - yaw Left\nArrow Right- yaw Right\n\nR - clear emergency signal\nC - change camera view\nE - start/stop video\nF - take a snapshot");
jScrollPane1.setViewportView(jTextArea1);
jTextArea1.getAccessibleContext().setAccessibleName("keyMappings");
jTextArea1.getAccessibleContext().setAccessibleParent(this);

代码示例来源: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.netbeans.modules/org-netbeans-modules-apisupport-wizards

private void initAccessibility() {
  this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_NameIconLocationPanel"));
  createdFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_CreatedFiles"));
  modifiedFilesValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_ModifiedFiles"));
  libraryDisplayNameValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_DisplayName"));
  libraryNameVale.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_Name"));
  projectNameValue.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_ProjectName"));
}

代码示例来源: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_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-visualweb-palette

/** Creates new form NewJPanel */
public CodeClipViewerPanel(String title, String tooltip, String content) {
  initComponents();
  setBorder(new EtchedBorder(EtchedBorder.LOWERED));
  setClipName(title);
  setContentText(content);
  setToolTip(tooltip);
  
  titleField.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CodeClipViewerPanel.class, "Acc_CodeSnippetViewer_Title"));
  titleField.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CodeClipViewerPanel.class, "Acc_CodeSnippetViewer_TitleDesc"));
  clipContentTextArea.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CodeClipViewerPanel.class, "Acc_EditorPane_Name")); // NOI18N
  clipContentTextArea.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(CodeClipViewerPanel.class, "Acc_EditorPane_Desc")); // NOI18N
  tooltipField.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CodeClipViewerPanel.class, "Acc_CodeSnippetViewer_Tooltip"));
  tooltipField.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(CodeClipViewerPanel.class, "Acc_CodeSnippetViewer_Tooltip_Desc"));
}

代码示例来源: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_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-mercurial

/** Creates new form CommitPanel */
public CommitPanel(QCreatePatchParameters parameters, String commitMessage, String patchName) {
  this.parameters = parameters;
  
  initComponents();
  boolean skipTemplates = false;
  if (patchName != null && !patchName.isEmpty()) {
    txtPatchName.setText(patchName);
    txtPatchName.setEditable(false);
    skipTemplates = true;
  }
  
  messageTextArea.setColumns(60);    //this determines the preferred width of the whole dialog
  messageTextArea.setLineWrap(true);
  messageTextArea.setRows(4);
  messageTextArea.setTabSize(4);
  messageTextArea.setWrapStyleWord(true);
  messageTextArea.setMinimumSize(new Dimension(100, 18));
  
  messageTextArea.getAccessibleContext().setAccessibleName(getMessage("ACSN_CommitForm_Message")); // NOI18N
  messageTextArea.getAccessibleContext().setAccessibleDescription(getMessage("ACSD_CommitForm_Message")); // NOI18N
  messageTextArea.addMouseListener(new CommitMessageMouseAdapter());
  
  Spellchecker.register (messageTextArea);  
  initCommitMessage(commitMessage, skipTemplates);
  
  cmbAuthor.setModel(parameters.createRecentUsersModel());
}

代码示例来源: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: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

filePathTxt.getAccessibleContext().setAccessibleDescription(getString("FILE_PATH_TXT_AD"));
filePathTxt.getAccessibleContext().setAccessibleName(getString("FILE_PATH_TXT_AN"));

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

/** Creates new form CommandLineEditorPanel */
public OptionsEditorPanel(String[] texts, BooleanConfiguration inheritValues, PropertyEditorSupport editor, PropertyEnv env) {
this.inheritValues = inheritValues;
  this.editor = editor;
  initComponents();
  // The following line was copied from the generated code (which was reset to default)
  // so I can add an NOI18N comment
  allOptionsTextArea.setBackground(javax.swing.UIManager.getDefaults().getColor("TextField.inactiveBackground")); // NOI18N
  
additionalLabel.setText(texts[2]);
allLabel.setText(texts[3]);
  setPreferredSize(new java.awt.Dimension(400, 300));
  CndUIUtilities.requestFocus(additionalOptionsTextArea);
if (inheritValues != null) {
  inheritCheckBox.setSelected(inheritValues.getValue());
}
else {
  remove(inheritCheckBox);
}
  
  env.setState(PropertyEnv.STATE_NEEDS_VALIDATION);
  env.addPropertyChangeListener(this);
  
  // Accessibility
  additionalOptionsTextArea.getAccessibleContext().setAccessibleDescription(getString("ADDITIONAL_OPTIONS_AD"));
  inheritCheckBox.getAccessibleContext().setAccessibleDescription(getString("INHERIT_AD"));
}

相关文章

JTextArea类方法