Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » nested Subgraphs in CompoundDirectedGraph and MouseEvents
nested Subgraphs in CompoundDirectedGraph and MouseEvents [message #238344] Thu, 06 September 2007 07:20 Go to next message
Klaus Zerwes is currently offline Klaus Zerwes
Messages: 4
Registered: July 2009
Junior Member
Hello

if I use nested Subgraphs in a CompoundDirectedGraph I have problems to
pass mouse events to the nested Subgraphs.


+---CompoundDirectedGraph-------+
| |
| +--Subgraph-S1-----------+ |
| | | |
| | +--Subgraph-S11--+ | |
| | | | | |
| | +----------------+ | |
| | | |
| | +--Subgraph-S1"--+ | |
| | | | | |
| | +----------------+ | |
| +------------------------+ |
| |
+-------------------------------+

each Subgraph is build this way:

private void buildSubgraphFigure(Figure contents, Subgraph s) {
Figure figure = new Figure();
...
figure.addMouseListener(new MouseListener.Stub(){
public void mouseDoubleClicked(final MouseEvent me) {
....
}
});
}

Now the Problem is that only the main Subgraph (S1) gets the events, the
nested Subgraphs (S11 and S12) never get the events!

How can I pass them to the nested Subgraphs - or what is wrong in my mind?

Thank you in advance

Klaus
Re: nested Subgraphs in CompoundDirectedGraph and MouseEvents [message #238350 is a reply to message #238344] Thu, 06 September 2007 07:21 Go to previous message
Klaus Zerwes is currently offline Klaus Zerwes
Messages: 4
Registered: July 2009
Junior Member
Klaus Zerwes wrote:
> Hello
>
> if I use nested Subgraphs in a CompoundDirectedGraph I have problems to
> pass mouse events to the nested Subgraphs.
>

Sorry - there is a typo in the diagram:
+---CompoundDirectedGraph-------+
| |
| +--Subgraph-S1-----------+ |
| | | |
| | +--Subgraph-S11--+ | |
| | | | | |
| | +----------------+ | |
| | | |
| | +--Subgraph-S12--+ | |
| | | | | |
| | +----------------+ | |
| +------------------------+ |
| |
+-------------------------------+

>
> each Subgraph is build this way:
>
> private void buildSubgraphFigure(Figure contents, Subgraph s) {
> Figure figure = new Figure();
> ...
> figure.addMouseListener(new MouseListener.Stub(){
> public void mouseDoubleClicked(final MouseEvent me) {
> ....
> }
> });
> }
>
> Now the Problem is that only the main Subgraph (S1) gets the events, the
> nested Subgraphs (S11 and S12) never get the events!
>
> How can I pass them to the nested Subgraphs - or what is wrong in my mind?
>
> Thank you in advance
>
> Klaus
Previous Topic:Bendpoint + SnapToGrid
Next Topic:how to programmably add nodes and edges
Goto Forum:
  


Current Time: Mon Sep 01 14:48:19 EDT 2014

Powered by FUDForum. Page generated in 0.04038 seconds