Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Is it possible to display Tool-Kit on mouse click? (Read 3154 times)
PaulWu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Nov 16th, 2015
Is it possible to display Tool-Kit on mouse click?
Nov 19th, 2015 at 5:10am
Print Post  
Hi,

I am developing a program running on Microsoft surface. Is it possible to display tool-kit when a user "touches" (mouse left click) a node? I override the onClick method but cannot find a way to display the tool-kit.

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Is it possible to display Tool-Kit on mouse click?
Reply #1 - Nov 19th, 2015 at 9:36am
Print Post  
Hi,

If by tool-kit you mean context menu, check the DirTree sample project:

Code
Select All
diagram.addDiagramListener(new DiagramAdapter()
{
    public void nodeClicked(NodeEvent e)
    {
        if(e.getMouseButton() != MouseEvent.BUTTON3)
            return;

        if(e.getNode() instanceof ShapeNode)
        {
            Point mousePos = getMousePosition();
            dir = (File)e.getNode().getTag();
            cmFolder.show(DirTreeFrame.this, mousePos.x, mousePos.y);
        }
    } 



Change BUTTON3 to BUTTON1 for left-clicks.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PaulWu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Nov 16th, 2015
Re: Is it possible to display Tool-Kit on mouse click?
Reply #2 - Nov 19th, 2015 at 9:10pm
Print Post  
This is exactly what I need. Thank you so much.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint