Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!

jenita brown

Ranch Hand
+ Follow
since Feb 20, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jenita brown

Hello,

JTree indents the leaf nodes more then a normal node. I want to override this action and get all the children aligned, irrespective of node type.

<pre>
what jtree does by default
root
|
+child1
|
+child2
|
---child3

where child3 is a leaf node


what I want is

root
|
+child1
|
+child2
|
child3
</pre>
Waiting for your reply.

Thank you.

Regards,

Jenal
11 years ago
hello,

My requirement is slightly different. If you notice, JTree indents the leaf nodes more then a normal node. I want to override this action and get all the children aligned, irrespective of node type.

Regards,

Jenal
11 years ago
:-). Yes there are two classes which imperilment the DropTargetListener, DropsourceListner, etc listeners which handle drag and drop. The undo button is in my applet and has action listener. The tree has the UndoableEditListener. When I expand or collapse the nodes the editable event gets fired. But when i do a drag drop it is not fire an editable event so it is not added by the undo manager in its undo list. How do I get the drag drop to fire this event. What should i put in the event object?

Regards,

Jenal
11 years ago
Hi Paul,

I tried a couple of things with the undo class. JTree expand and collapse are straight forward with undo. The problem is that the drag drop event dont trigger the class (don't get caught by the class). So there is no way to undo these actions.

Any ideas?

Regards,

Jenal
11 years ago
I have already got the drag drop logic sorted out. I looked at a usage example of the undo package. It just supports basic expand, collapse operations. There is no method in the package for drag drop actions. There is nothing called undo drop or undo drag that you can call on a node of a tree. I dont know this will help. Could you point me to some usage examples?

Regards,

Jenal
11 years ago
No, I am not using the undo package yet. I just read about it yesterday and was about to explore. So you saying the undo manager will store the state of the tree (actually just the commands) for me and i just need to use the package and set up the methods correctly. I found a usage example of undo with a normal Jtree, will the package be just as effective with the dnd api used with the JTree?

Thank you for the reply.

Regards,

Jenal
11 years ago
Hello,

I have made an applet which creates a tree from a hashmap. I then use the awt dnd api to add drag and drop functionality to my tree. The user can drag drop stuff around and change the hierarchy structure. I am maintaining a list of the nodes that changed and use this for updating the DB. I want to add undo functionality to my drag drop operations. I tried to store the defaulttreemodel before every drag drop operation in a list and try to reload the last model at undo. This however does not work. I can also not think of a way to get the corresponding node in the tree based on the node i have saved in my list of changes. Can someone please me out?

example ..
<pre>
before change
Root
|_n1
| |_n2
| |_n3
|_n4

after change 1
Root
|_n1
| |_n2
|
|_n4
|_n3
change list -> (node n3, parent n4)

after change 2
Root
|_n1
|
|
|_n4
|_n3
|_n2

change list -> (node n3, parent n4),(node n2, parent n4)

when i undo once , I want to get the tree back to
Root
|_n1
| |_n2
|
|_n4
|_n3
</pre>
And so on ....

Thank you.

Regards,



Jenal
SCJP 1.4
11 years ago

Harsh Josh wrote:
Hi All

I am planning to take the Test 000-253. Please send me the latest dumps/study material........
Thanks for your help.........




___________________________________________________________________________________________________________________________________

I hope you have read the FAQs out here and realize that you're not supposed to be asking for dumps, right?


Jenal Dhar Raina
S.C.J.P
Hi,
I am planning to take an IBM 000-015 exam for Maximo Consultant. Can someone help telling the resources or any other useful links to prepare myself for this Exam. Heard that it is not easy to pass this exam in first chance.
Also could you tell me how different is the Test for Maximo Consultant from the Test for Maximo Trainer because I am also contemplating to take the Test for the Trainer as well.

So any help in providing study material and mock tests and positive advice would be more than welcome.


Warm Regards,
Jenal Dhar Raina
S.C.J.P
Please reply friends... any help would be appreciated.
Hi Friends,

I am supposed to learn BERT for an upcoming project in my company. Could anyone of you guide me about the BERT Tutorials and any documentation thats available on it. Its really important for me to have knowledge on this Reporting Tool, the soonest.

Any help or suggestion in this regards would be more than welcome

Warm Regards,
Jenal
no answers yet???
12 years ago
Hi Folks,

I need to convert my scripts/procedures/functions developed on oracle to ms sql format. Is there a tool (hopefully Open Source) to do this?

Thank you.

Regards,
12 years ago
simple...i love oracle and working with databases too and wanna get certified for that too and plus that would broaden my horizons...