Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Combined Selection and ConnectionCreationToolEntry
Combined Selection and ConnectionCreationToolEntry [message #987649] Tue, 27 November 2012 12:31
Bastian Schumacher is currently offline Bastian SchumacherFriend
Messages: 1
Registered: November 2012
Junior Member
Hello,
I am currently working on an Eclipse GEF Plugin. There are Nodes that can be moved and resized using an SelectionToolEntry, and can be Connected Using a ConnectionCreationToolEntry. Since the areas with one tool can interact with are distinct from the areas the other tool can interact with, i'd like to combine these tools to one. One witch is capable of selecting and resizing nodes and create connections between them.

Here is what I got:
SelectionToolEntry selection = new SelectionToolEntry();
mainPalette.add(selection);
setDefaultEntry(selection);
        
ConnectionCreationToolEntry connectionCreation =
    new ConnectionCreationToolEntry("Connect", 
    "Connect 2 Nodes", new CreationFactory()
    {
        @Override
        public Object getObjectType()
        {
            return NodeConnection.class;
        }
    
        @Override
        public Object getNewObject()
        {
            return new NodeConnection();
        }
    }, null, null);
mainPalette.add(connectionCreation);


And this is what I'd like to get
SelectionAndConnectionCreationToolEntry editToolEntry =
    new SelectionAndConnectionCreationToolEntry("Edit", 
    "Connect 2 Actions", new CreationFactory()
    {
        @Override
        public Object getObjectType()
        {
            return NodeConnection.class;
        }
    
        @Override
        public Object getNewObject()
        {
            return new NodeConnection();
        }
    }, null, null);
mainPalette.add(editToolEntry);
setDefaultEntry(editToolEntry);


Is there a Better way then to create my own ToolEntry and my Own TargetingTool?

Thanks in advance,
Bastian Schumacher
Previous Topic:[Zest] Combining LayoutStyles and ZestStyles
Next Topic:[Zest] Arcs on top of nodes
Goto Forum:
  


Current Time: Tue Apr 23 15:38:06 GMT 2024

Powered by FUDForum. Page generated in 0.03012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top