[JIRA] Issue Comment Edited: (SWANK-1) Adding items (nodes) to jtree widget doesn't work
- From: "tsib (JIRA)" <jira-no-reply@kenai.com>
- To: issues@swank.kenai.com
- Subject: [JIRA] Issue Comment Edited: (SWANK-1) Adding items (nodes) to jtree widget doesn't work
- Date: Sun, 3 Oct 2010 18:15:25 +0000 (GMT+00:00)
- Auto-submitted: auto-generated
[
http://kenai.com/jira/browse/SWANK-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53384#action_53384
]
tsib edited comment on SWANK-1 at 10/3/10 6:13 PM:
---------------------------------------------------
Patch source in issue was corrupted, second attempt:
206a207
> if (iNodes[0]>=0) {
209a211
> }
was (Author: tsib):
Patch source in issue was corrupted, second attempt:
206a207
> if (iNodes[0]>=0) {
209a211
> }
> Adding items (nodes) to jtree widget doesn't work
> -------------------------------------------------
>
> Key: SWANK-1
> URL: http://kenai.com/jira/browse/SWANK-1
> Project: swank
> Issue Type: Bug
> Environment: OS: Windows XP
> SWANK under Jacl 1.3.2
> JDK: build 1.6.0_21-b07
> Reporter: tsib
> Attachments: SwkJTreeWidgetCmd.java
>
>
> It is impossible to specify tree in jtree widgets.
> Only adding root node works without problem:
> jtree .tree
> .tree node add root "Root node"
> Now when I try to add other nodes command failed
> .tree node add 0 "First node"
> Error message:
> Exception in thread "AWT-EventQueue-0"
> java.lang.ArrayIndexOutOfBoundsException: node has no children
> at
> javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:228)
> at
> com.onemoonscientific.swank.SwkJTreeWidgetCmd$NodeAdd.run(SwkJTreeWidgetCmd.java:210)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> As I discovered in source there is no possibility to add nodes which follow
> root node - I temporary modify in SwkJTreeWidgetCmd.java method run of
> NodeAdd class:
> "for" loop (over iNodes for calculating refNode) is executed only when
> iNodes[0]>=0,
> patch is follow (don sure that I made it in right way because I done it
> under windows with WinMerge utility)
> 206a207
> > if (iNodes[0]>=0) {
> 209a211
> > }
> Now these commands work
> .tree node add -1 "First node"
> .tree node add -1 "Second node"
> .tree node add -1 "Third node"
> .tree node add 0 "Second level node"
> .tree node add {0 0} "Third level node"
> My version of SwkJTreeWidgetCmd.java file is included as attachment
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://kenai.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
[JIRA] Created: (SWANK-1) Adding items (nodes) to jtree widget doesn't work |
tsib (JIRA) | 10/03/2010 |
|
[JIRA] Commented: (SWANK-1) Adding items (nodes) to jtree widget doesn't work |
tsib (JIRA) | 10/03/2010 |
|
[JIRA] Updated: (SWANK-1) Adding items (nodes) to jtree widget doesn't work |
tsib (JIRA) | 10/03/2010 |
|
[JIRA] Issue Comment Edited: (SWANK-1) Adding items (nodes) to jtree widget doesn't work |
tsib (JIRA) | 10/03/2010 |





