openslide-java | Java bindings to OpenSlide | Wrapper library
kandi X-RAY | openslide-java Summary
kandi X-RAY | openslide-java Summary
Java bindings to OpenSlide
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of openslide-java
openslide-java Key Features
openslide-java Examples and Code Snippets
Community Discussions
Trending Discussions on openslide-java
QUESTION
I'm new to swing, and i have the following problem:
I am using the openslide-java library to view whole slide images. There is a class called OpenSlideView that extends JPanel, and its purpose is to view the images. This class has the capability of zooming-in, out and navigating through an image using the mouse, as it utilizes its own mouse listener. I am overlaying two OpenSlideView objects in a JFrame, where one is visible and the other is not, and i want to be able to perform mouse actions on both of them at the same time, even if one of them is not visible. Plainly put, i want the not-visible JPanel to track down the mouse.
Is something like that possible? Even for the JPanel class and not an extension of it?
Thanks in advance.
P.S: I am attaching the code of the method that handles the mouse events for OpenSlideView objects, in case it helps.
...ANSWER
Answered 2018-Jan-29 at 15:59i want to be able to perform mouse actions on both of them at the same time
Doesn't make any sense. If a component is not visible why would you want to do that. Maybe you need to have your component keep its current state. So when you change the state of the top component you update the state of the hidden component. If the hidden component ever becomes visible it will automatically be painted in its current state.
Plainly put, i want the not-visible JPanel to track down the mouse.
An event is only dispatched to a single component.
However, you could use the Component.dispatchEvent(...)
method to dispatch a new event to a separate component.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install openslide-java
Apache Ant
OpenSlide >= 3.4.0
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page