| mouse-selecting nodes [message #632096] |
Mon, 11 October 2010 10:40  |
ouri.maler Messages: 22 Registered: July 2010 |
Junior Member |
|
|
In my current project, I've been using ZEST to create a graph representing a model we work with. I want to have two-way interactions - I want it to be possible to interact with the model by acting upon the graph shown with ZEST. For that purpose, I need the nodes to react to mouse events.
As such, I've taken the node creation method and added the following bit of code to it:
newNode.addListener(SWT.SELECTED, new Listener()
{
@Override
public void handleEvent(Event event) {
Config.getConfig().outpuln("selected"); //basically an output line through the GUI
}
});
I figured this would cause the GUI to print the line whenever I mouse-clicked on a node...but, no reaction. But I know the program reacts to mouse-clicks to some degree, since it allows me to drag nodes just fine.
Thoughts? Suggestions?
|
|
|
| Re: mouse-selecting nodes [message #633790 is a reply to message #632096] |
Tue, 19 October 2010 09:06  |
ouri.maler Messages: 22 Registered: July 2010 |
Junior Member |
|
|
*Sigh*
Well, in the face of my continued failure to solve this problem, I'm giving up on the graph-based interaction, and creating a dropdown menu for selecting nodes instead.
|
|
|
Powered by
FUDForum. Page generated in 0.01596 seconds