How to perform an Action following a click on a part of a JXTable-Cell ?

View: New views
3 Messages — Rating Filter:   Alert me  

How to perform an Action following a click on a part of a JXTable-Cell ?

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have to simulate the behaviour of the Plus/Minus-Expand/Collapse-NodeHandle of a Tree(Table) in a JXTable.
Yes, I considered using the JXTreeTable, but need filtering and sorting of the JXTable.  :-)

I can think of two ways to accomplish this:

1. Using a CompoundComponent (+/- Button and TextField) as a CellEditor and immediately stop the CellEditing on a button-click. Then changing the filtered rows according to the state of the node (persisted in two properties of my DataClass.)

2. Handling the mouseclick as showing a popup menu on a Table; listen for a single click and identify the clicked (region of the) cell. The problem is getting the click coordinates IN the Component.
I searched the sources of JTree for hints, but got lost...

Can someone help me to exclude one of these "ideas" or direct me to a better solution?

Thanks!
[Message sent by forum member 'tl5' (tolle5@...)]

http://forums.java.net/jive/thread.jspa?messageID=370203

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@...
For additional commands, e-mail: jdnc-help@...


Re: How to perform an Action following a click on a part of a JXTable-Cell ?

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

same way as in a core JTable, no additional support in JXTable

Jeanette
[Message sent by forum member 'kleopatra' (fastegal@...)]

http://forums.java.net/jive/thread.jspa?messageID=370208

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@...
For additional commands, e-mail: jdnc-help@...


Re: How to perform an Action following a click on a part of a JXTable-Cell ?

by jdnc-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You can look at our check list implementation for ideas.  We need to listen for a click in the checkbox region to toggle the check.  The HotSpotAware interface is added to a renderer to determine hot spot hit detection.

https://jdnc-incubator.dev.java.net/source/browse/jdnc-incubator/trunk/src/kleopatra/foreign/rasto1968/checklist/

Karl
[Message sent by forum member 'kschaefe' (kschaefe@...)]

http://forums.java.net/jive/thread.jspa?messageID=370210

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@...
For additional commands, e-mail: jdnc-help@...