本文整理了Java中javax.swing.JTextArea.addMouseListener()
方法的一些代码示例,展示了JTextArea.addMouseListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.addMouseListener()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:addMouseListener
暂无
代码示例来源:origin: igniterealtime/Smack
adhocMessages.addMouseListener(new PopupListener(menu));
代码示例来源:origin: deathmarine/Luyten
exception.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 10));
exception.setText(stacktrace);
exception.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
代码示例来源:origin: igniterealtime/Smack
sentText1.addMouseListener(popupListener);
sentText2.addMouseListener(popupListener);
menu.add(menuItem1);
menu.add(menuItem2);
receivedText1.addMouseListener(popupListener);
receivedText2.addMouseListener(popupListener);
menu.add(menuItem1);
menu.add(menuItem2);
interpretedText1.addMouseListener(popupListener);
interpretedText2.addMouseListener(popupListener);
menu.add(menuItem1);
menu.add(menuItem2);
代码示例来源:origin: igniterealtime/Smack
menu.add(menuItem1);
messageTextArea.addMouseListener(new PopupListener(menu));
JPanel sublayout = new JPanel(new BorderLayout());
sublayout.add(new JScrollPane(messageTextArea), BorderLayout.CENTER);
sentText.addMouseListener(new PopupListener(menu));
menu.add(menuItem1);
menu.add(menuItem2);
receivedText.addMouseListener(new PopupListener(menu));
menu.add(menuItem1);
menu.add(menuItem2);
代码示例来源:origin: bobbylight/RSyntaxTextArea
public void install(JTextArea textArea) {
textArea.addCaretListener(this);
textArea.addComponentListener(this);
textArea.addFocusListener(this);
textArea.addKeyListener(this);
textArea.addMouseListener(this);
textArea.addMouseMotionListener(this);
}
代码示例来源:origin: ron190/jsql-injection
panel.setMinimumSize(new Dimension(600, 400));
textarea.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
代码示例来源:origin: ron190/jsql-injection
this.textToTranslate[0].addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
代码示例来源:origin: ron190/jsql-injection
panel.setMinimumSize(new Dimension(400, 250));
textarea.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
代码示例来源:origin: stackoverflow.com
public void addJTextArea(JTextArea tArea){
this.add(tArea, ...);
tArea.addMouseListener(this.listener);
}
代码示例来源:origin: stackoverflow.com
private JTextArea makeCell(final int id) {
JTextArea cell = new JTextArea(DIM_OF_CELLS, DIM_OF_CELLS));
cell.setBorder(...);
cell.setEditable(false);
cell.addMouseListener(new MouseAdaptor() {
public void mouseClicked(MouseEvent ev) {
String text = JOptionPane.showInputDialog("Set text for date: ");
allCells[id].get.setText(text);
}
});
return cell;
}
代码示例来源:origin: stackoverflow.com
JPanel p = new JPanel();
JTextArea t = new JTextArea("line \n line");
t.addMouseListener(new MyMouseListener());
p.add(t);
jRadioButton1.add(p);
jRadioButton1.addMouseListener(new MyRadioButtonMouseListener());
代码示例来源:origin: stackoverflow.com
public class CellBox {
private final JTextArea cell;
public CellBox() {
cell = new JTextArea(DIM_OF_CELLS, DIM_OF_CELLS));
cell.setBorder(...);
cell.setEditable(false);
cell.addMouseListener(new MouseAdaptor() {
public void mouseClicked(MouseEvent ev) {
String text = JOptionPane.showInputDialog("Set text for date: ");
cell.setText(text);
}
});
}
}
代码示例来源:origin: bcdev/beam
@Override
protected void initComponents() {
textArea = new JTextArea();
textArea.setText(defaultText);
textArea.setEditable(false);
textArea.addMouseListener(new PopupHandler());
add(new JScrollPane(textArea), BorderLayout.CENTER);
}
代码示例来源:origin: gaborbata/jpass
/**
* Creates a new {@link JTextArea} instance with a context pop-up menu by default.
*
* @param text the initial text
* @return the new instance
*/
public static JTextArea newTextArea(String text) {
JTextArea textArea = text == null ? new JTextArea() : new JTextArea(text);
textArea.addMouseListener(new TextComponentPopupListener());
TextComponentActionType.bindAllActions(textArea);
return textArea;
}
}
代码示例来源:origin: datacleaner/DataCleaner
@Override
public synchronized void addMouseListener(final MouseListener mouseListener) {
installHoverEffect();
super.addMouseListener(mouseListener);
_bodyLabel.addMouseListener(mouseListener);
}
代码示例来源:origin: sarahtattersall/PIPE
/**
* Registers the handler to this view
* @param handler how the annotation will handle mouse events
*/
private void setMouseHandler(MouseInputAdapter handler) {
addMouseListener(handler);
addMouseMotionListener(handler);
noteText.addMouseListener(handler);
noteText.addMouseMotionListener(handler);
}
代码示例来源:origin: RPTools/maptool
public void initPlayerNotesTextArea() {
getNotesTextArea().addMouseListener(new MouseHandler(getNotesTextArea()));
}
代码示例来源:origin: RPTools/maptool
public void initGMNotesTextArea() {
getGMNotesTextArea().addMouseListener(new MouseHandler(getGMNotesTextArea()));
getComponent("@GMNotes").setEnabled(MapTool.getPlayer().isGM());
}
代码示例来源:origin: com.fifesoft/rsyntaxtextarea
public void install(JTextArea textArea) {
textArea.addCaretListener(this);
textArea.addComponentListener(this);
textArea.addFocusListener(this);
textArea.addKeyListener(this);
textArea.addMouseListener(this);
textArea.addMouseMotionListener(this);
}
代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea
public void install(JTextArea textArea) {
textArea.addCaretListener(this);
textArea.addComponentListener(this);
textArea.addFocusListener(this);
textArea.addKeyListener(this);
textArea.addMouseListener(this);
textArea.addMouseMotionListener(this);
}
内容来源于网络,如有侵权,请联系作者删除!