Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3467

custom cell renderer stay

From "Jake" <jake@THRWHITE.remove-dii-this>
Subject custom cell renderer stay
Message-ID <fvoebv01vhm@news2.newsguy.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:45 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hi,

In a JTree I have several leaf nodes w/ a custom renderer extended from 
an AbstractCellRenderer which implements a TreeCellEditor and a 
CellEditorListener. Some of the leaf nodes are JComboBoxes, and others 
are JTextFields. 

When the user clicks on one of the JComboBox leaf nodes, the JComboBox 
will drop down displaying it's list of menu items ready for selection.

My problem is that, when the user selects an item in the drop down list, 
the JComboBox drop down list of items no longer appears (which is 
normal), however, the JComboBox is still in edit mode as seen by the item 
that is still highlighted and the icon is still showing an edit icon 
(document icon) and not the icon I have on it when in a normal unediting 
state.

It seems that while it's still in an editing state, the only way to 
"punch in" the value is when the user clicks on another leaf node or 
loses focus, then the leaf node apears as normal. I'm expecting that once 
the selection is made from the list by clicking on an item, then it's no 
longer being edited.

Anyone have ideas on this? Any help much appreciated.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread


Thread

custom cell renderer stay "Jake" <jake@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000

csiph-web