本文整理了Java中javax.swing.JTextPane.addFocusListener()
方法的一些代码示例,展示了JTextPane.addFocusListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.addFocusListener()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:addFocusListener
暂无
代码示例来源:origin: stanfordnlp/CoreNLP
textPane.addFocusListener(new java.awt.event.FocusAdapter() {
@Override
public void focusLost(java.awt.event.FocusEvent evt) {
代码示例来源:origin: ron190/jsql-injection
/**
* Build new instance of JTextArea to decorate.
*/
public JPopupTextPane(JTextPane proxy) {
super(proxy);
this.getProxy().addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent arg0) {
JPopupTextPane.this.getProxy().getCaret().setVisible(true);
JPopupTextPane.this.getProxy().getCaret().setSelectionVisible(true);
}
});
this.getProxy().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
this.getProxy().setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
}
代码示例来源:origin: ron190/jsql-injection
browser.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent arg0) {
代码示例来源:origin: com.eas.platypus/platypus-js-forms
public VTextArea(String aText) {
super();
super.setText(aText != null ? aText : "");
if (aText == null) {
nullValue = true;
}
oldValue = aText;
super.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
String text = getText();
if (text != null && !"".equals(text)) {
nullValue = false;
}
checkValueChanged();
}
});
}
代码示例来源:origin: antlr/antlrworks
public void registerUndo(XJUndo undo, JTextPane component) {
undo.bindTo(component);
component.addFocusListener(new EditorFocusListener());
undos.put(component, undo);
}
代码示例来源:origin: stackoverflow.com
for (int i = 0; i < 5; i++) {
final JTextPane b = new JTextPane();
b.setBorder(new JTextArea().getBorder());
b.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent arg0) {
b.repaint();
}
@Override
public void focusLost(FocusEvent arg0) {
b.repaint();
}
});
b.setText(Integer.toString(i));
a.getContentPane().add(b);
}
代码示例来源: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() {
srcFeedPane = new javax.swing.JTextPane();
setLayout(new java.awt.BorderLayout());
srcFeedPane.setContentType(org.openide.util.NbBundle.getMessage(SourcesInformationPanel.class, "SourcesInformationPanel.srcFeedPane.contentType")); // NOI18N
srcFeedPane.setEditable(false);
srcFeedPane.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
srcFeedPaneFocusGained(evt);
}
});
add(srcFeedPane, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
代码示例来源:origin: edu.stanford.nlp/stanford-parser
textPane.addFocusListener(new java.awt.event.FocusAdapter() {
@Override
public void focusLost(java.awt.event.FocusEvent evt) {
代码示例来源:origin: fr.inria.wimmics/kggui
textPaneStyleGraph.addFocusListener(paneGraphFocusListener);
代码示例来源:origin: Wimmics/corese
textPaneStyleGraph.addFocusListener(paneGraphFocusListener);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-kenai-ui
inbox.setEditable(false);
inbox.setText(org.openide.util.NbBundle.getMessage(ChatPanel.class, "ChatPanel.inbox.text", new Object[] {})); // NOI18N
inbox.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
inboxFocusGained(evt);
代码示例来源:origin: fr.inria.wimmics/kggui
textPaneQuery.addFocusListener(this);
textPaneQuery.getDocument().addDocumentListener(this);
textPaneQuery.addCaretListener(this);
代码示例来源:origin: Wimmics/corese
textPaneQuery.addFocusListener(this);
textPaneQuery.getDocument().addDocumentListener(this);
textPaneQuery.addCaretListener(this);
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
textArea.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
代码示例来源:origin: org.jspresso.framework/jspresso-swing-application
getConnectedJComponent().getEditorPane().addFocusListener(
new FocusAdapter() {
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
jtpMain.setMargin(new Insets(4, 4, 4, 4));
jtpMain.addKeyListener(this);
jtpMain.addFocusListener(this);
内容来源于网络,如有侵权,请联系作者删除!