Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » mouse-selecting nodes(no response)
mouse-selecting nodes [message #632096] Mon, 11 October 2010 10:40 Go to next message
ouri.maler is currently offline 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 Go to previous message
ouri.maler is currently offline 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.
Previous Topic:How to place Label above Ellipse?
Next Topic:Drag&Drop Palette elements in a grid
Goto Forum:
  


Current Time: Sat May 18 22:38:40 EDT 2013

Powered by FUDForum. Page generated in 0.01563 seconds