Mark Fletcher wrote:
> I have a custom RecordableCommand that opens a JDialog and uses the  the
> x and y parameters to position it. (The command is launched via a css
> command-button.) When I have just one document view displayed, the
> positioning is fine. But, if I open a second view, the dialog
> positioning does not shift to match the new location from which I?m
> launching it. The dialog displays in the same  position relative to the
> XXE window, as if nothing had changed.
> 
>  
> 
> Is this the expected behavior? If so, what additional dimensions can be
> used to offset the x,y coordinates?
> 

I'm really sorry but I don't see how I can help you. *You* create the
JDialog and you position it. *You* have full control over this JDialog.
Your question is absolutely not related to XXE.

As a proof of my good will, the only hints that I can give you are (this
is about Java, not about XXE):

* The origin of your JDialog should be set relative to docView.getPanel().
See
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/gadget/RootGadget.html#getPanel()

* A JDialog has a Frame or Dialog as its ``parent''.
See http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JDialog.html

* The following utility AWTUtil.getDialogOwner may be used to get this
Frame or Dialog parent.
See
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/guiutil/AWTUtil.html#getDialogOwner(java.awt.Component)

* You *must* pass this Frame or Dialog to the constructor of your JDialog.

* The location of a JDialog is better specified using
setLocationRelativeTo(Component) rather than using setLocation(int, int).
See
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Window.html#setLocationRelativeTo(java.awt.Component)
See
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.html#setLocation(int,%20int)







Reply via email to