neilcsmith-net commented on PR #8276:
URL: https://github.com/apache/netbeans/pull/8276#issuecomment-2681416861
> Originally i thought it would shield from subsequent clicks,
That's what I was double checking, as delaying showing it would then have
functional effects.
> > use Timer for the delay?
>
> I mean it would look very similar, no?
I don't think so. I have something of a preference for using Timer where
the task is solely about scheduling something on the EDT. I would have thought
`DelayedWaitCursor` could have a Timer and be entirely controlled on the EDT?
Something like (off top of head!) -
```java
cursor.start(); // starts cursor timer
ViewUtil.uiProcessor().post(() -> {
try {
node.getChildren().getNodesCount(true);
} catch (Exception e) {
LOG.log(Level.WARNING, "can't determine node count", e);
} finally {
EventQueue.invokeLater(cursor::hide); // stops timer and
possibly reverts glass pane and cursor
}
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists