1 19 27 28 package org.netbeans.modules.xml.nbprefuse; 29 30 import java.awt.event.MouseEvent ; 31 import prefuse.controls.HoverActionControl; 32 import prefuse.visual.NodeItem; 33 import prefuse.visual.VisualItem; 34 35 39 public class MouseoverActionControl extends HoverActionControl{ 40 protected String action; 41 42 45 public MouseoverActionControl(String action) { 46 super(action); 47 this.action = action; 48 } 49 50 53 public void itemEntered(VisualItem item, MouseEvent e) { 54 if (item instanceof NodeItem && 55 item.canSetBoolean(AnalysisConstants.MOUSEOVER)){ 56 item.setBoolean(AnalysisConstants.MOUSEOVER, true); 57 } 58 super.itemEntered(item, e); 59 } 60 61 67 public void itemExited(VisualItem item, MouseEvent e) { 68 if (item instanceof NodeItem && 69 item.canSetBoolean(AnalysisConstants.MOUSEOVER)){ 70 item.setBoolean(AnalysisConstants.MOUSEOVER, false); 71 } 72 super.itemExited(item, e); 73 } 74 75 76 77 } 78 | Popular Tags |