From: Dan T. <dte...@op...> - 2000-07-25 23:50:53
|
ok, I'm starting to catch on here, but very slowly. I think I figured out how to do the word selection by using JEditTextArea.xyToOffset() after getting the x and y from the mouse event. However, now I can't figure out where to stick the darned mouse listener. I extended MouseMotionAdapter, and tried to attach it to a view, a JTextEditArea, and an EditPane. The closest I got to success was with the view, but that only reported the event when my mouse left the text area. So, before I pull my hair out, have you any suggestions? code snippet: public void actionPerformed(ActionEvent evt) { View v = EditAction.getView(evt); Buffer b = (v == null) ? null : v.getBuffer(); if (v != null && b != null) { POLDebuggerPlugin POLDebuggerPlugin = new POLDebuggerPlugin(); EditPane editPane = v.getEditPane(); JEditTextArea textArea = editPane.getTextArea(); Log.log(Log.WARNING, this, "About to set the listener!"); textArea.addMouseMotionListener(new DebugMouseListener(v,b)); } > -----Original Message----- > From: Dan Terrill [mailto:dte...@op...] > Sent: Tuesday, July 25, 2000 11:09 AM > To: 'jed...@li...' > Subject: [ jEdit-devel ] mouseover > > > I'm still pouring through the jEdit code -- great stuff, but > tough for a > java newbie to dig in to. > > Anyhow, I'm still working on my debugger thingie, and I'd > like to set the > tool tip text for any variables in the current JEditTextArea > to the current > variable vaue. However, I can't figure out how to figure out > which word the > mouse is over. Can anyone offer some suggestions on where to look? > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > > ********************************************************************** > > -- > ----------------------------------------------- > jEdit Developers' List > jEd...@li... > http://lists.sourceforge.net/mailman/listinfo/jedit-devel > ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** |