Bob Hanson wrote:
> Oops, that's a bug.... That is supposed to be the behavior for 2D text.
>
> In the mean time, you can use:
>
> draw text1 {3 4 5} "some text label" translucent 1
>
> That is, create a point, label it with some text, and display it as 
> "invisible". Then you can turn the text on and off using
>
> draw text1 on
> draw text1 off
>
>   
Thank you for this tip!

>From the documentation of the "draw" command ("hoverText": text that
will appear after issuing set drawHover TRUE (Jmol 11.1)) I expected the
text to appear only if the mouse rests over the draw object. Because
that wouldn't help me much, I didn't even tested it.

But the text  appears (fortunately) directly after the definition and I
couldn't observe any difference after changing "set drawHover".

So it looks as if I could use it directly to label planes. And to switch
the label off, just redefine the plane without the text.

When I tried the example 'draw text1 {3 4 5} "some text label"
translucent 1' I got the following Java error with Jmol 11.2.0 (SuSE
Linux 9.3, Java 1.4.2_13, Firefox 1.5.0.10) and the applet doesn't
refresh the window any more:
java.lang.NullPointerException
    at org.jmol.shapespecial.DrawRenderer.renderInfo(Unknown Source)
    at org.jmol.shapespecial.DrawRenderer.render(Unknown Source)
    at org.jmol.shape.ShapeRenderer.render(Unknown Source)
    at org.jmol.viewer.FrameRenderer.render(Unknown Source)
    at org.jmol.viewer.RepaintManager.render(Unknown Source)
    at org.jmol.viewer.Viewer.getImage(Unknown Source)
    at org.jmol.viewer.Viewer.renderScreenImage(Unknown Source)
    at org.jmol.applet.Jmol.update(Unknown Source)
    at org.jmol.applet.Jmol.update(Unknown Source)
    at org.jmol.appletwrapper.AppletWrapper.update(Unknown Source)
    at sun.awt.RepaintArea.paint(RepaintArea.java:169)
    at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:405)
    at java.awt.Component.dispatchEventImpl(Component.java:3678)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
    at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

But this error seems to occur only if this is the first draw command
issued. If I start with 'draw text1 {3 4 5} "some text label"' first and
then add 'translucent 1' in a second command, no Java error occurs.

Regards,
Rolf






-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to