I have a JTree where users can drop items from other components. When users hang over nodes in the tree (during the "drop mode"), the one closest to the node is highlighted. This is achieved by implementing TransferHandler.
@Override
public boolean canImport(TransferSupport support) {
support.setShowDropLocation(true);
Each time a new node is selected (also during "drop mode"), this will delete the TreeSelectionEvent. This, in turn, will call the listener I created, which will query the database for details related to this node.
Now I'm looking for a way to somehow filter out the events that are generated from the node during the "drop mode". This is an attempt to restrict database calls. Anyone have any ideas on how I can achieve this?
All input will be appreciated!
source
share