/** * 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); }