Révision 2002

tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java (revision 2002)
65 65
	protected LineComparator lastSortingComparator = null;
66 66

  
67 67
	@Override
68
	public void processEvent(final AWTEvent event, final int eventArea, final Object o) {
68
	public void processEvent(final Object event, final int eventArea, final Object o) {
69 69
		
70 70
		// Need to run this in the SWT UI thread because it's called from the AWT UI thread in TBX charts engine layer
71 71
		chartEditor.getComposite().getDisplay().asyncExec(new Runnable() {
72 72
			public void run() {
73 73

  
74
				AWTEvent awtEvent = (AWTEvent) event;
75
				
74 76
				// Mouse event
75 77
				if(event instanceof MouseEvent)	{
76 78
				
......
85 87
					ChartEntity entity = chartEvent.getEntity();
86 88
					final ArrayList<Integer> selectedPointPositions = ((ProgressionChartCreator) chartEditor.getResult().getChartCreator()).getSelectedPointPositions(chartEditor.getChart());
87 89
	
88
					if(event.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 2 && eventArea == EventCallBack.AREA_ITEM && !selectedPointPositions.isEmpty()) {
90
					if(awtEvent.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 2 && eventArea == EventCallBack.AREA_ITEM && !selectedPointPositions.isEmpty()) {
89 91
	
90 92
						// Linked edition (CTRL/CMD + double click)
91 93
						if((mouseEvent.getModifiers() & ZoomAndPanCallBack.keyboardZoomModifierKeyMask) != 0) {
......
98 100
							updateLinkedConcordanceEditor(chartEditor.getLinkedEditors(ConcordanceEditor.class), selectedPointPositions);
99 101
						}
100 102
					}
101
					else if(event.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 1 && eventArea == EventCallBack.AREA_ITEM) {
103
					else if(awtEvent.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 1 && eventArea == EventCallBack.AREA_ITEM) {
102 104

  
103 105
						// Get the linked concordance editors and update the one linked to the progression curve if it exists
104 106
						ArrayList<EditorPart> linkedConcordancesEditors = chartEditor.getLinkedEditors(ConcordanceEditor.class);
......
114 116
						}
115 117
						
116 118
					}
117
					else if(event.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 2 && eventArea == EventCallBack.AREA_EMPTY) {
119
					else if(awtEvent.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 2 && eventArea == EventCallBack.AREA_EMPTY) {
118 120
						// FIXME: debug
119 121
						//System.err.println("ProgressionMouseClickedCallBack.processEvent(...).new Runnable() {...}.run(): double click in empty area");
120 122
					}
121
					else if(event.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 1 && eventArea == EventCallBack.AREA_EMPTY) {
123
					else if(awtEvent.getID() == MouseEvent.MOUSE_CLICKED && mouseEvent.getClickCount() == 1 && eventArea == EventCallBack.AREA_EMPTY) {
122 124
						// FIXME: debug
123 125
						//System.err.println("ProgressionMouseClickedCallBack.processEvent(...).new Runnable() {...}.run(): single click in empty area");
124 126
					}

Formats disponibles : Unified diff