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(Unknown
Source)
at
org.apache.batik.gvt.text.ConcreteTextSelector.mousePressed(Unknown Source)
at
org.apache.batik.swing.gvt.TextSelectionManager$MouseListener.mousePressed(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]