本文整理了Java中javax.swing.text.JTextComponent.getToolkit()
方法的一些代码示例,展示了JTextComponent.getToolkit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.getToolkit()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:getToolkit
暂无
代码示例来源:origin: bobbylight/RSyntaxTextArea
if (c != null) {
try {
Toolkit tk = c.getToolkit();
Clipboard buffer = tk.getSystemSelection();
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
public void run () {
try {
modifyLine(doc, mt, pos);
} catch (BadLocationException e) {
target.getToolkit().beep();
}
}
});
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
target.getToolkit().beep();
}
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
public void run () {
try {
modifyLine(doc, mt, pos);
} catch (BadLocationException e) {
target.getToolkit().beep();
}
}
});
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
target.getToolkit().beep();
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if( !startRecording(target) ) target.getToolkit().beep();
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!startRecording(target))
target.getToolkit().beep();
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring
@Override
public void keyTyped(KeyEvent e) {
if (!CndLexerUtilities.isCppIdentifierPart(e.getKeyChar())) {
JTextComponent aTarget = target;
if (aTarget != null) {
aTarget.getToolkit().beep();
e.consume();
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
Caret caret = target.getCaret();
try {
BaseDocument doc = (BaseDocument) target.getDocument();
doc.toggleBookmark(caret.getDot());
} catch (BadLocationException e) {
target.getToolkit().beep();
}
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
Caret caret = target.getCaret();
try {
BaseDocument doc = (BaseDocument)target.getDocument();
doc.toggleBookmark(caret.getDot());
} catch (BadLocationException e) {
target.getToolkit().beep();
}
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.replaceSelection(null);
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.replaceSelection(text);
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.cut();
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.replaceSelection(text);
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.replaceSelection(null);
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.paste();
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.cut();
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-editor
public void run () {
DocumentUtilities.setTypingModification(bdoc, true);
try {
int offset = newOffset(target);
if (offset >= 0 && offset < bdoc.getLength()) {
moveToNewOffset(target, offset);
}
} catch (BadLocationException ble) {
target.getToolkit().beep();
} finally {
DocumentUtilities.setTypingModification(bdoc, false);
}
}
});
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
try {
int dotPos = target.getCaret().getDot();
Rectangle r = target.getUI().modelToView(target, dotPos);
if (r != null) {
ExtUtilities.getExtEditorUI(target).showPopupMenu(r.x, r.y + r.height);
}
} catch (BadLocationException e) {
target.getToolkit().beep();
}
}
}
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt, JTextComponent target) {
if (target != null) {
if (!target.isEditable() || !target.isEnabled()) {
target.getToolkit().beep();
return;
}
target.replaceSelection("");
Caret caret = target.getCaret();
int dotPos = caret.getDot();
BaseDocument doc = (BaseDocument) target.getDocument();
dotPos = doc.getFormatter().indentNewLine(doc, dotPos);
caret.setDot(dotPos);
}
}
内容来源于网络,如有侵权,请联系作者删除!