javax.swing.JEditorPane.addFocusListener()方法的使用及代码示例

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

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

JEditorPane.addFocusListener介绍

暂无

代码示例

代码示例来源:origin: ron190/jsql-injection

text[0].addFocusListener(new FocusAdapter() {
  @Override
  public void focusGained(FocusEvent arg0) {

代码示例来源:origin: freeplane/freeplane

private void addWindowListener() {
  pane.addFocusListener(new FocusAdapter() {
    @Override
    public void focusGained(FocusEvent e) {
      e.getComponent().removeFocusListener(this);
      SwingUtilities.getWindowAncestor(pane).addWindowListener(new WindowAdapter(){
        @Override
        public void windowClosed(WindowEvent e) {
          e.getWindow().removeWindowListener(this);
          deHighlight();
        }
      });
    }
  });
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

super.setContentType("text/html");
super.setText(aText != null ? aText : "");
super.addFocusListener(new FocusAdapter() {

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

/** 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.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  commChannelsDisplayer = new javax.swing.JEditorPane();
  setBackground(new java.awt.Color(255, 255, 255));
  setLayout(new java.awt.BorderLayout());
  commChannelsDisplayer.setBackground(new java.awt.Color(255, 255, 255));
  commChannelsDisplayer.setContentType(org.openide.util.NbBundle.getMessage(ForumsAndMailingListsPanel.class, "ForumsAndMailingListsPanel.commChannelsDisplayer.contentType")); // NOI18N
  commChannelsDisplayer.setEditable(false);
  commChannelsDisplayer.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(java.awt.event.FocusEvent evt) {
      commChannelsDisplayerFocusGained(evt);
    }
  });
  add(commChannelsDisplayer, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents

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

/** 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.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  issuesInfoPane = new javax.swing.JEditorPane();
  setBackground(new java.awt.Color(255, 255, 255));
  setPreferredSize(new java.awt.Dimension(0, 800));
  setLayout(new java.awt.BorderLayout());
  issuesInfoPane.setContentType(org.openide.util.NbBundle.getMessage(IssuesInformationPanel.class, "IssuesInformationPanel.issuesInfoPane.contentType")); // NOI18N
  issuesInfoPane.setEditable(false);
  issuesInfoPane.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(java.awt.event.FocusEvent evt) {
      issuesInfoPaneFocusGained(evt);
    }
  });
  add(issuesInfoPane, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents

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

int rowHeight = metrics.getHeight();
editorPane.setPreferredSize(new Dimension(columnWidth * 80, rowHeight * 15));
editorPane.addFocusListener(new java.awt.event.FocusListener() {
  public void focusGained(java.awt.event.FocusEvent e) {
    editorPane.setSelectionStart(0);

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

editorPane.addFocusListener(new java.awt.event.FocusListener() {
  public void focusGained(java.awt.event.FocusEvent e) {

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

userCodeEditorPane.getAccessibleContext().setAccessibleDescription(
    userCodeRadioButton.getAccessibleContext().getAccessibleDescription());
userCodeEditorPane.addFocusListener(this);
userCodeEditorPane.setContentType("text/x-java"); // NOI18N
userCodeEditorPane.getDocument().addDocumentListener(CustomEditor.this);

代码示例来源:origin: freeplane/freeplane

htmlEditorPanel.getSourceEditorPane().addFocusListener(new FocusListener() {

代码示例来源:origin: JetBrains/jediterm

myEditorPane.addFocusListener(new FocusAdapter() {
 @Override
 public void focusLost(FocusEvent e) {

代码示例来源:origin: freeplane/freeplane

final TextFieldListener textFieldListener = new TextFieldListener();
this.textFieldListener = textFieldListener;
textfield.addFocusListener(textFieldListener);
textfield.addKeyListener(textFieldListener);
textfield.addMouseListener(textFieldListener);

相关文章

JEditorPane类方法