Example #1
0
 public HandleDragHandler() {
   final PInputEventFilter filter = new PInputEventFilter(InputEvent.BUTTON1_MASK);
   setEventFilter(filter);
   filter.setMarksAcceptedEventsAsHandled(true);
   filter.setAcceptsMouseEntered(false);
   filter.setAcceptsMouseExited(false);
   filter.setAcceptsMouseMoved(false);
 }
Example #2
0
 /**
  * This is the constructor.
  *
  * @param graph the GraphBuilder this handler is for
  */
 public KeyEventHandler(GraphBuilder graph) {
   super();
   PInputEventFilter eventFilter = new PInputEventFilter();
   this.graph = graph;
   eventFilter.rejectAllEventTypes();
   eventFilter.setAcceptsKeyPressed(true);
   eventFilter.setAcceptsKeyReleased(true);
   setEventFilter(eventFilter);
 }
  public ProtegeInputEventHandler(ProtegeGraphModel graphModel, AbstractGraph graph) {
    this.graphModel = graphModel;
    this.graph = graph;

    PInputEventFilter filter = new PInputEventFilter();
    filter.rejectAllEventTypes();
    filter.setAcceptsMousePressed(true);
    filter.setAcceptsMouseMoved(true);

    this.setEventFilter(filter);
  }