|
@@ -211,6 +211,7 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
|
|
|
@Override
|
|
|
public void mouseClicked(MouseEvent e) {
|
|
|
+ toolTip.setEnabled(false);
|
|
|
/*
|
|
|
* FindSmartDevice that was clicked
|
|
|
*/
|
|
@@ -233,7 +234,8 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
// If Rightclick
|
|
|
if (e.getButton() == MouseEvent.BUTTON3) {
|
|
|
// Show the RightClickMenu
|
|
|
- showRightClickMenu(clicked);
|
|
|
+ Link linkAtPosition = getLinkVisualizationAtPosition(e.getX(), e.getY());
|
|
|
+ showRightClickMenu(clicked, linkAtPosition);
|
|
|
break;
|
|
|
}
|
|
|
if(!controller.getControllerConfiguration().getConfigurationManager().getSelectionModel().selectedDevices.isEmpty()&&!controlDown){
|
|
@@ -269,6 +271,7 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
|
|
|
@Override
|
|
|
public void mousePressed(MouseEvent e) {
|
|
|
+ toolTip.setEnabled(false);
|
|
|
// Save mouse position for right Click options
|
|
|
dragged_x = e.getX();
|
|
|
dragged_y = e.getY();
|
|
@@ -337,6 +340,7 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
|
|
|
@Override
|
|
|
public void mouseDragged(MouseEvent e) {
|
|
|
+ toolTip.setEnabled(false);
|
|
|
// move dragged object/object selection on screen
|
|
|
switch (mode) {
|
|
|
case DRAG_SELECT:
|
|
@@ -685,7 +689,9 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
public void mouseEntered(MouseEvent e) {}
|
|
|
|
|
|
@Override
|
|
|
- public void mouseExited(MouseEvent e) {}
|
|
|
+ public void mouseExited(MouseEvent e) {
|
|
|
+ toolTip.setEnabled(false);
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public void actionPerformed(ActionEvent e) {}
|
|
@@ -697,9 +703,10 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
* shown at the Mouse position on the VisualisationPanel.
|
|
|
*
|
|
|
* @param clickedOn
|
|
|
- * Device which was clicked, null if no
|
|
|
+ * Device which was clicked, otherwise null
|
|
|
+ * @param clickedLink Link which was clicked, otherwise null
|
|
|
*/
|
|
|
- protected void showRightClickMenu(SmartDevice clickedOn) {
|
|
|
+ protected void showRightClickMenu(SmartDevice clickedOn, Link clickedLink) {
|
|
|
/**
|
|
|
* Mouse Position on the VisualisationPanel
|
|
|
*/
|
|
@@ -751,7 +758,6 @@ public class VisualisationInteractor implements MouseInputListener,
|
|
|
rightClickMenu.remove(itemEditConnection);
|
|
|
rightClickMenu.add(itemCreateConnection,editCreateConnectionIndex);
|
|
|
}
|
|
|
-
|
|
|
if(controller.getControllerConfiguration().getConfigurationManager().getSelectionModel().selectedDevices.contains(clickedOn)){
|
|
|
itemDeleteSelected.setEnabled(true);
|
|
|
itemCreateLink.setEnabled(true);
|