|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2004, 2008 Tasktop Technologies and others. |
2 |
* Copyright (c) 2004, 2008 Tasktop Technologies and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 28-33
Link Here
|
| 28 |
import org.eclipse.mylyn.tasks.ui.TasksUiImages; |
28 |
import org.eclipse.mylyn.tasks.ui.TasksUiImages; |
| 29 |
import org.eclipse.swt.SWT; |
29 |
import org.eclipse.swt.SWT; |
| 30 |
import org.eclipse.swt.graphics.Image; |
30 |
import org.eclipse.swt.graphics.Image; |
|
|
31 |
import org.eclipse.swt.graphics.Point; |
| 31 |
import org.eclipse.swt.graphics.Rectangle; |
32 |
import org.eclipse.swt.graphics.Rectangle; |
| 32 |
import org.eclipse.swt.widgets.Event; |
33 |
import org.eclipse.swt.widgets.Event; |
| 33 |
import org.eclipse.swt.widgets.Listener; |
34 |
import org.eclipse.swt.widgets.Listener; |
|
Lines 91-96
Link Here
|
| 91 |
activationImage = taskInactive; |
92 |
activationImage = taskInactive; |
| 92 |
} |
93 |
} |
| 93 |
} |
94 |
} |
|
|
95 |
if (data instanceof AbstractTask) { |
| 96 |
AbstractTask task = (AbstractTask) data; |
| 97 |
if (task.isCompleted()) { |
| 98 |
Rectangle bounds = ((TreeItem) event.item).getBounds(); |
| 99 |
int lineY = bounds.y + (bounds.height / 2); |
| 100 |
String itemText = ((TreeItem) event.item).getText(); |
| 101 |
Point extent = event.gc.textExtent(itemText); |
| 102 |
event.gc.drawLine(bounds.x, lineY, bounds.x + extent.x, lineY); |
| 103 |
} |
| 104 |
} |
| 94 |
if (data instanceof ITaskContainer) { |
105 |
if (data instanceof ITaskContainer) { |
| 95 |
switch (event.type) { |
106 |
switch (event.type) { |
| 96 |
case SWT.EraseItem: { |
107 |
case SWT.EraseItem: { |