Hi Dennis,

>Does someone have a drag and drop example where I have
>2 trees left and right of a JSplitPane.

example with dnd you can find in book "Core swing advanced programming".

>Also while dragging when the mouse rolls over any node
>of target tree, it should get selected and as soon as
>mouse reaches the other node previous selection should
>vanish and latest node should get selected.

I think, that nodes schould not be selected, but highlighted.
You can very easy highlight node without selecting it - just place JToolTip
with same text over it.

Hope, it helps you

Andrei

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 19, 2002 12:01 PM
Subject: Advanced-swing digest, Vol 1 #436 - 4 msgs


> Send Advanced-swing mailing list submissions to
> [EMAIL PROTECTED]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://eos.dk/mailman/listinfo/advanced-swing
> or, via email, send a message with subject or body 'help' to
> [EMAIL PROTECTED]
>
> You can reach the person managing the list at
> [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Advanced-swing digest..."
>
>
> Today's Topics:
>
>    1. Re: JDialog problem (Vikram Kumar)
>    2. Set different node's height in JTree (a johnston)
>    3. Re: Set different node's height in JTree (Sachin Hejip)
>    4. Drag-n-Drop (Dennis)
>
> --__--__--
>
> Message: 1
> Date: Wed, 18 Sep 2002 17:15:57 +0530
> From: Vikram Kumar <[EMAIL PROTECTED]>
> To: Soumitra Dhankar <[EMAIL PROTECTED]>
> CC: Advanced-Swing <[EMAIL PROTECTED]>
> Subject: Re: JDialog problem
>
> Hi!
>
> Tell me one thing what are you setting as parent for the second Dialog
> Box (which opens  up on clicking of the tree )
>
> vikram
>
> Soumitra Dhankar wrote:
>
> > Hi All,
> >
> > My application has a modal JDialog which contains a JTree.
> >
> > On right click of nodes of this JTree I want to show a JPopupMenu
> > containing one JMenuItem.
> >
> > On clicking this Menu Item I want to show another modal JDialog asking
> > some input from the user.
> >
> > It has a submit button to accept user response.
> >
> > Based on the user response ultimately the tree node will be populated.
> >
> >
> >
> > However this is not working as I expected.
> >
> > A right click on Tree node is showing the popup menu but nothing is
> > happening when I click on the menu item.
> >
> > On the other hand if I make the dialog box as non-modal, then on click
> > of the menu item I am getting the dialog box.
> >
> > However again if I click on the submit button of this JDialog, nothing
> > is happening again even if I make it as non modal.
> >
> >
> >
> > Can anybody suggest a solution.
> >
> >
> >
> > Waiting for your responses.
> >
> > Regards
> >
> > -Soumitra
> >
> >
> >
> >
> >
> >------------------------------------------------------------------------
> >
>
>**************************Disclaimer***************************************
***********
> >
> > Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged'
> >and 'confidential' and intended for use only by the individual or entity
to which it is
> >addressed. You are notified that any use, copying or dissemination of the
information
> >contained in the E-MAIL in any manner whatsoever is strictly prohibited.
> >
>
>***************************************************************************
*************
> >
> >
> >
> >
> >
>
>
>
> --__--__--
>
> Message: 2
> Date: Wed, 18 Sep 2002 14:50:36 -0700 (PDT)
> From: a johnston <[EMAIL PROTECTED]>
> Subject: Set different node's height in JTree
> To: [EMAIL PROTECTED]
>
> --0-452422414-1032385836=:83417
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi All,
>
> Does anyone know how to set a node's height in JTree according to their
row number? This is a feature I am trying to use for highlighting purposes.
I have searched almost all the relevant websites, but no success in finding
a solution. Thanks in advance for any reply.
>
> PS. Normally all the nodes in a JTree have to same height.
>
> Best regards,
>
> George Song
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! News - Today's headlines
> --0-452422414-1032385836=:83417
> Content-Type: text/html; charset=us-ascii
>
> <P>Hi All,</P>
> <P>Does anyone know how to set a node's height in JTree according to their
row number? This is a feature I am trying to use for highlighting
purposes.&nbsp; I have searched almost all the relevant websites,&nbsp;but
no success in finding a&nbsp;solution. Thanks in advance for any reply. </P>
> <P>PS. Normally all the nodes in a JTree have to same height.</P>
> <P>Best regards,</P>
> <P>George Song</P><p><br><hr size=1>Do you Yahoo!?<br>
> <b><a href="http://news.yahoo.com/";>Yahoo! News</a></b> - Today's
headlines
> --0-452422414-1032385836=:83417--
>
> --__--__--
>
> Message: 3
> From: "Sachin Hejip" <[EMAIL PROTECTED]>
> To: "a johnston" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: Set different node's height in JTree
> Date: Thu, 19 Sep 2002 09:59:36 +0530
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0473_01C25FC3.429FB720
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi,
>
> The way I do it is to set the preferredsize of the TreeCellRenderer for =
> each cell it is rendering.
> e.g. in my application I have to show a node with text and arbitrary =
> amount of detail below it.
> So, I have a JPanel with a JLabel and a JTextArea in a BorderLayout as =
> my TreeCellRenderer.
> For each getTreeCellRendererComponent, I set the data and call doLayout =
> and return the JPanel.
> The JTree takes care of the rest.
>
> Hope this helps.
>
> Best Regards
> Sachin
>   ----- Original Message -----=20
>   From: a johnston=20
>   To: [EMAIL PROTECTED]=20
>   Sent: Thursday, September 19, 2002 3:20 AM
>   Subject: Set different node's height in JTree
>
>
>   Hi All,
>
>   Does anyone know how to set a node's height in JTree according to =
> their row number? This is a feature I am trying to use for highlighting =
> purposes.  I have searched almost all the relevant websites, but no =
> success in finding a solution. Thanks in advance for any reply.=20
>
>   PS. Normally all the nodes in a JTree have to same height.
>
>   Best regards,
>
>   George Song
>
>
>
>
>
> -------------------------------------------------------------------------=
> -----
>   Do you Yahoo!?
>   Yahoo! News - Today's headlines
>
> ------=_NextPart_000_0473_01C25FC3.429FB720
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>The way I do it is to set the =
> preferredsize of the=20
> TreeCellRenderer for each cell it is rendering.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>e.g. in my application I have to show a =
> node with=20
> text and arbitrary amount of detail below it.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>So, I have a JPanel with a JLabel and a =
> JTextArea=20
> in a BorderLayout as my TreeCellRenderer.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>For each getTreeCellRendererComponent, =
> I set the=20
> data and call doLayout and return the JPanel.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>The JTree takes care of the =
> rest.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>Hope this helps.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>Best Regards</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Sachin</FONT></DIV>
> <BLOCKQUOTE=20
> style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
> BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
>   <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
>   <DIV=20
>   style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
> black"><B>From:</B>=20
>   <A [EMAIL PROTECTED] href=3D"mailto:[EMAIL PROTECTED]";>a =
> johnston</A>=20
>   </DIV>
>   <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
> [EMAIL PROTECTED]=20
>   href=3D"mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</A> </DIV>
>   <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, September 19, =
> 2002 3:20=20
>   AM</DIV>
>   <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Set different node's =
> height in=20
>   JTree</DIV>
>   <DIV><BR></DIV>
>   <P>Hi All,</P>
>   <P>Does anyone know how to set a node's height in JTree according to =
> their row=20
>   number? This is a feature I am trying to use for highlighting =
> purposes.&nbsp;=20
>   I have searched almost all the relevant websites,&nbsp;but no success =
> in=20
>   finding a&nbsp;solution. Thanks in advance for any reply. </P>
>   <P>PS. Normally all the nodes in a JTree have to same height.</P>
>   <P>Best regards,</P>
>   <P>George Song</P>
>   <P><BR>
>   <HR SIZE=3D1>
>   Do you Yahoo!?<BR><B><A href=3D"http://news.yahoo.com/";>Yahoo! =
> News</A></B> -=20
>   Today's headlines</BLOCKQUOTE></BODY></HTML>
>
> ------=_NextPart_000_0473_01C25FC3.429FB720--
>
>
>
> --__--__--
>
> Message: 4
> Date: Thu, 19 Sep 2002 00:57:46 -0700 (PDT)
> From: Dennis <[EMAIL PROTECTED]>
> Subject: Drag-n-Drop
> To: [EMAIL PROTECTED]
>
> All,
>
> Does someone have a drag and drop example where I have
> 2 trees left and right of a JSplitPane.
>
> The requirement is to transfer a node from left tree
> to the right tree and from the right tree to left
> tree.
>
> Also while dragging when the mouse rolls over any node
> of target tree, it should get selected and as soon as
> mouse reaches the other node previous selection should
> vanish and latest node should get selected.
>
> How do I do this??? Any help will be appreciated.
>
> Thanks
> Dennis
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
>
> --__--__--
>
> _______________________________________________
> Advanced-swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/advanced-swing
>
>
> End of Advanced-swing Digest
>

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to