--- /dev/null
+package com.example.furt.myapplication;
+
+import android.view.View;
+
+/**LongNodeHandler: handler per la pressione prolungata di un nodo**/
+
+public class longnodeHandler implements View.OnLongClickListener {
+ Node n; //nodo a cui è legato questo handler
+
+ longnodeHandler(Node node) {
+ n = node;
+ }
+
+ @Override
+ public boolean onLongClick(View view) {
+ if (DrawActivity.selectedNode != null)
+ if (DrawActivity.selectedNode.view == view) {
+ if (DrawActivity.selectedNode.Children.size() == 0) { //se l'hold click è stato fatto sul selectedNode ed esso è un nodo foglia
+ touchnodeHandler.ruleDialog = new RuleDialog(DrawActivity.selectedNode.F.introductionRules());
+ touchnodeHandler.ruleDialog.showAllRules=true; //nuovo ruleDialog con l'opzione showAllRules già settata
+ touchnodeHandler.ruleDialog.show(DrawActivity.fragmentManager, "CIAO");
+ }
+ }
+ return true;
+ }
+}