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

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

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

JEditorPane.addMouseListener介绍

暂无

代码示例

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

text[0].addMouseListener(new MouseAdapter() {
  @Override
  public void mousePressed(MouseEvent e) {

代码示例来源:origin: bobbylight/RSyntaxTextArea

((HTMLDocument)textArea.getDocument()).setBase(ft.getImageBase());
textArea.addMouseListener(tipListener);
textArea.addHyperlinkListener(new HyperlinkListener() {
  @Override

代码示例来源:origin: org.gephi/desktop-import

reportEditor.addMouseListener(new MouseAdapter() {

代码示例来源:origin: org.gephi/desktop-import

reportEditor.addMouseListener(new MouseAdapter() {

代码示例来源:origin: cytoscape.coreplugins/cpath

/**
 * User has requested that we shows the About Dialog.
 *
 * @param event ActionEvent Object.
 */
public void actionPerformed(ActionEvent event) {
  dialog = new JDialog(parent, "About the cPath PlugIn", true);
  Container contentPane = dialog.getContentPane();
  contentPane.setLayout(new BorderLayout());
  JEditorPane htmlPane = new JEditorPane();
  htmlPane.addMouseListener(this);
  EmptyBorder border = new EmptyBorder(5, 5, 5, 5);
  htmlPane.setBorder(border);
  htmlPane.setContentType("text/html");
  htmlPane.setEditable(false);
  htmlPane.setPreferredSize(new Dimension(WIDTH, HEIGHT));
  String html = this.getAboutHtml();
  htmlPane.setText(html);
  JScrollPane scrollPane = new JScrollPane(htmlPane);
  contentPane.add(scrollPane, BorderLayout.CENTER);
  Point point = parent.getLocation();
  Dimension size = parent.getSize();
  int x = (int) ((point.getX() + (size.getWidth() / 2)) - (WIDTH / 2));
  int y = (int) ((point.getY() + (size.getHeight() / 2)) - (HEIGHT / 2));
  dialog.setLocation(x, y);
  dialog.pack();
  dialog.setVisible(true);
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

final TextPopupMenu pop = new TextPopupMenu();
pop.setTextComponent(_contentsTxt);
_contentsTxt.addMouseListener(new MouseAdapter()

代码示例来源:origin: realXuJiang/bigtable-sql

final TextPopupMenu pop = new TextPopupMenu();
pop.setTextComponent(_contentsTxt);
_contentsTxt.addMouseListener(new MouseAdapter()

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

popup.addSeparator();
editorPane.addMouseListener(popupListener);
gutter.addMouseListener(gutterListener);

代码示例来源:origin: igvteam/igv

pane.addMouseListener(mouseAdapter);

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

add( PropUtils.isAqua ? btn : toolbar);
jep.addMouseListener(this);
jsc.addMouseListener(this);
lbl.addMouseListener(this);

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

public @Override void install (JEditorPane c) {
  super.install (c);
  HyperlinkListener hl = new HyperlinkListener ();
  c.addMouseMotionListener (hl);
  c.addMouseListener (hl);
  c.addKeyListener(hl);
  c.addCaretListener (new MarkOccurrencesSupport (c));
}

代码示例来源:origin: com.fifesoft/rsyntaxtextarea

((HTMLDocument)textArea.getDocument()).setBase(ft.getImageBase());
textArea.addMouseListener(tipListener);
textArea.addHyperlinkListener(new HyperlinkListener() {
  @Override

代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea

((HTMLDocument)textArea.getDocument()).setBase(ft.getImageBase());
textArea.addMouseListener(tipListener);
textArea.addHyperlinkListener(new HyperlinkListener() {
  public void hyperlinkUpdate(HyperlinkEvent e) {

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra

/**
 * Constructor, by default, is JEditorPane will be used for toolTip.
 *
 * @param owner The parent window.
 * @param ft    Focusable tip
 * @param msg   The text of the tool tip.  This can be HTML.
 */
public TipWindow(Window owner, FocusableTip ft, String msg) {
  super(owner);
  this.ft = ft;
  tipListener = new TipListener();
  JEditorPane textArea = new JEditorPane("text/html", msg);
  TipUtil.tweakTipEditorPane(textArea);
  if (ft.getImageBase() != null) { // Base URL for images
    ((HTMLDocument) textArea.getDocument()).setBase(ft.getImageBase());
  }
  textArea.addMouseListener(tipListener);
  textArea.addHyperlinkListener(e -> {
    if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
      TipWindow.this.ft.possiblyDisposeOfTipWindow();
    }
  });
  init(ft, textArea);
}

代码示例来源:origin: eu.mihosoft.vrl/vrl

editor.addMouseListener(new MouseAdapter() {

代码示例来源:origin: org.nuiton/nuiton-widgets

/**
 * Constructor, by default, is JEditorPane will be used for toolTip.
 *
 * @param owner The parent window.
 * @param ft Focusable tip
 * @param msg The text of the tool tip.  This can be HTML.
 */
public TipWindow(Window owner, FocusableTip ft, String msg) {
  super(owner);
  this.ft = ft;
  tipListener = new TipListener();
  JEditorPane textArea = new JEditorPane("text/html", msg);
  TipUtil.tweakTipEditorPane(textArea);
  if (ft.getImageBase()!=null) { // Base URL for images
    ((HTMLDocument)textArea.getDocument()).setBase(ft.getImageBase());
  }
  textArea.addMouseListener(tipListener);
  textArea.addHyperlinkListener(new HyperlinkListener() {
    public void hyperlinkUpdate(HyperlinkEvent e) {
      if (e.getEventType()==HyperlinkEvent.EventType.ACTIVATED) {
        TipWindow.this.ft.possiblyDisposeOfTipWindow();
      }
    }
  });
  init(ft, textArea);
}

代码示例来源:origin: stackoverflow.com

textPane.addMouseListener(new MouseAdapter() {
  @Override
  public void mouseExited(MouseEvent e) {

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

tip.setMargin(new Insets(0, 0, 0, 0));
final LinkMouseListener linkMouseListener = new LinkMouseListener();
tip.addMouseListener(linkMouseListener);
tip.addMouseMotionListener(linkMouseListener);

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

textfield.addFocusListener(textFieldListener);
textfield.addKeyListener(textFieldListener);
textfield.addMouseListener(textFieldListener);
mapViewChangeListener = new MapViewChangeListener();
Controller.getCurrentController().getMapViewManager().addMapViewChangeListener(mapViewChangeListener);

相关文章

JEditorPane类方法