What if you don't want to highlight/edit text, but you want to be able to drag it around the canvas? :)
Michael Bishop -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 12:08 PM To: [email protected] Cc: [email protected] Subject: Re: Fw: Non-editable Text Element Hi Ted, Try setting, pointer-events="none" on the text element. That will turn text selection off. [EMAIL PROTECTED] wrote on 10/31/2005 11:31:40 AM: > By the way ....I have tried using the editable="false" tag. It seems > to have no effect. > > ----- Forwarded by Ted Clement/CORP/NAM/APCC on 10/31/2005 11:30 AM ----- > > [EMAIL PROTECTED] > com > To > 10/28/2005 03:14 [email protected] > PM cc > > Subject > Please respond to Non-editable Text Element > [EMAIL PROTECTED] > aphics.apache.org > > > > > > > > > Hello, > > I have an element composed of rectangles and a text field. I want the text > to be read-only. When this element is rendered on the canvas > and the mouse crosses the text field, the cursor changes into "text edit > mode". If the mouse button is clicked at this point, I get an exception > (see below). > > How can I specify the text element as non-editable? Is it necessary to > override the TextSelectionManager MouseListener? > > > <g id="GENERIC_DEVICE" transform="translate(50,30)" > apcTag="canvasElement"> > <g apcTag="normal" display="none" style="font-size:11; > fill:rgb(230,230,245); font-family:'Arial'; > stroke:rgb(230,230,245); stroke-width:1.5;"> > <rect x="0" y="0" width="35.2494" style="stroke:none;" height="45" > /> > <rect x="0" y="0" width="35.2494" style="fill:none; > stroke:rgb(0,130,16);" height="45" /> > <text id="userLabel" x="2.1247000694274902" y="9" > style="font-size:9; fill:black; stroke:none;" xml:space="preserve">Device > </text> > </g> > </g> > > java.lang.NullPointerException > at > org.apache.batik.gvt.text.ConcreteTextSelector.checkSelectGesture(Unknow n > Source) > at > org.apache.batik.gvt.text.ConcreteTextSelector.mousePressed(Unknown Source) > at > org.apache.batik.swing.gvt.TextSelectionManager$MouseListener.mousePress ed(Unknown > > Source) > at > org.apache.batik.gvt.event.AWTEventDispatcher.processMouseEvent(Unknown > Source) > at > org.apache.batik.gvt.event.AWTEventDispatcher.dispatchMouseEvent(Unknown > Source) > at > org.apache.batik.gvt.event.AWTEventDispatcher.dispatchEvent(Unknown Source) > at org.apache.batik.gvt.event.AWTEventDispatcher.mousePressed(Unknown > Source) > at org.apache.batik.swing.svg.JSVGComponent$18.run(Unknown Source) > at org.apache.batik.util.RunnableQueue.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > > Thanks, > Ted > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
