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

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

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

JEditorPane.requestFocus介绍

暂无

代码示例

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

public void run() {
    editorPane.requestFocus();
  }
});

代码示例来源:origin: net.sf.taverna.t2.ui-activities/beanshell-activity-ui

public void whenOpened() {
scriptTextArea.requestFocus();
}

代码示例来源:origin: net.sf.taverna.t2.ui-activities/rshell-activity-ui

public void whenOpened() {
scriptTextArea.requestFocus();
}

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

public void run()
  {
    splitter.setDividerLocation(jEdit.getIntegerProperty(
      "helpviewer.splitter",250));
    viewer.requestFocus();
  }
});

代码示例来源:origin: net.sf.taverna.t2.ui-activities/stringconstant-activity-ui

public void whenOpened() {
  scriptTextArea.requestFocus();
  if (scriptTextArea.getText().equals(StringConstantTemplateService.DEFAULT_VALUE)) {
    scriptTextArea.selectAll();
  }
}

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

/** Transfer the focus to the editor pane.
 */
@Deprecated
@Override
public void requestFocus() {
  super.requestFocus();
  if (pane != null) {
    if ((customComponent != null) && !SwingUtilities.isDescendingFrom(pane, customComponent)) {
      customComponent.requestFocus();
    } else {
      pane.requestFocus();
    }
  }
}

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

private void selectDefaultRadioButton() {
  boolean wasSelected = false;
  for (PropertyEditorElement element : elements) {
    if (element.isInitiallySelected()) {
      element.getRadioButton().setSelected(true);
      element.getRadioButton().requestFocus();
      wasSelected = true;
      break;
    }
  }
  userCodeRadioButton.setSelected(!wasSelected);
  if (!wasSelected) {
    userCodeEditorPane.requestFocus();
  }
}

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

@Override
public void tableRowSelected(NodeModel node, String rowName) {
  if(isCaretInsideStringToken())
    return;
  final String replacement = createReference(node) + "['" + rowName + "']";
  textEditor.replaceSelection(replacement);
  textEditor.requestFocus();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Transfer the focus to the editor pane.
 */
public void requestFocus() {
  super.requestFocus ();
  if(customComponent != null
  && !SwingUtilities.isDescendingFrom(pane, customComponent)) {
    customComponent.requestFocus();
  } else if(pane != null) {
    pane.requestFocus();
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Transfer the focus to the editor pane.
 */
public void requestFocus() {
  super.requestFocus ();
  if(customComponent != null
  && !SwingUtilities.isDescendingFrom(pane, customComponent)) {
    customComponent.requestFocus();
  } else if(pane != null) {
    pane.requestFocus();
  }
}

代码示例来源:origin: dcaoyuan/nbscala

editorPane.requestFocus ();

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

@Override
public void nodeSelected(final NodeModel node) {
  final String replacement;
  if(isCaretInsideStringToken())
    replacement = mapExplorer.getNodeReferenceSuggestion(node);
  else
    replacement = createReference(node);
  textEditor.replaceSelection(replacement);
  textEditor.requestFocus();
}

代码示例来源:origin: igniterealtime/Spark

frame.setSize(600, 400);
window.setCaretPosition(0);
window.requestFocus();
GraphicUtils.centerWindowOnScreen(frame);
frame.setVisible(true);

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

@Override
  public void run() {
    final SHTMLPanel htmlEditorPanel = getHtmlEditorPanel();
    htmlEditorPanel.getMostRecentFocusOwner().requestFocus();
    if (ResourceController.getResourceController().getBooleanProperty("goto_note_end_on_edit")) {
      final JEditorPane editorPane = htmlEditorPanel.getEditorPane();
      editorPane.setCaretPosition(editorPane.getDocument().getLength());
    }
  }
});

代码示例来源:origin: com.googlecode.jannocessor/jannocessor-ui

setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
input.requestFocus();
logger.debug("Initialized UI.");

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

viewer.requestFocus();

代码示例来源:origin: AlexFalappa/nb-springboot

@Override
  public void valueChanged(ListSelectionEvent event) {
    final int selectedRow = ((ListSelectionModel) event.getSource()).getMinSelectionIndex();
    if (event.getValueIsAdjusting() || selectedRow < 0) {
      return;
    }
    final MappedElement mappedElement = mappedElementsModel.getElementAt(table.convertRowIndexToModel(selectedRow));
    ElementOpen.open(mappedElement.getFileObject(), mappedElement.getHandle());
    try {
      final DataObject dataObject = DataObject.find(mappedElement.getFileObject());
      final EditorCookie editorCookie = dataObject.getLookup().lookup(EditorCookie.class);
      if (editorCookie != null) {
        editorCookie.openDocument();
        JEditorPane[] p = editorCookie.getOpenedPanes();
        if (p.length > 0) {
          p[0].requestFocus();
        }
      }
    } catch (IOException e) {
    }
  }
});

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

keyEventDispatcher.deactivate();
htmlEditorPanel.getMostRecentFocusOwner().requestFocus();
htmlEditorWindow.show();

相关文章

JEditorPane类方法