|
Lines 12-29
Link Here
|
| 12 |
import org.eclipse.jface.wizard.IWizardPage; |
12 |
import org.eclipse.jface.wizard.IWizardPage; |
| 13 |
import org.eclipse.jface.wizard.WizardPage; |
13 |
import org.eclipse.jface.wizard.WizardPage; |
| 14 |
import org.eclipse.mylyn.internal.tasks.core.LocalAttachment; |
14 |
import org.eclipse.mylyn.internal.tasks.core.LocalAttachment; |
|
|
15 |
import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; |
| 15 |
import org.eclipse.swt.SWT; |
16 |
import org.eclipse.swt.SWT; |
| 16 |
import org.eclipse.swt.custom.ScrolledComposite; |
17 |
import org.eclipse.swt.custom.ScrolledComposite; |
|
|
18 |
import org.eclipse.swt.events.ControlAdapter; |
| 19 |
import org.eclipse.swt.events.ControlEvent; |
| 20 |
import org.eclipse.swt.events.MouseEvent; |
| 21 |
import org.eclipse.swt.events.MouseListener; |
| 22 |
import org.eclipse.swt.events.MouseMoveListener; |
| 17 |
import org.eclipse.swt.events.PaintEvent; |
23 |
import org.eclipse.swt.events.PaintEvent; |
| 18 |
import org.eclipse.swt.events.PaintListener; |
24 |
import org.eclipse.swt.events.PaintListener; |
| 19 |
import org.eclipse.swt.events.SelectionEvent; |
25 |
import org.eclipse.swt.events.SelectionEvent; |
| 20 |
import org.eclipse.swt.events.SelectionListener; |
26 |
import org.eclipse.swt.events.SelectionListener; |
|
|
27 |
import org.eclipse.swt.graphics.Cursor; |
| 21 |
import org.eclipse.swt.graphics.GC; |
28 |
import org.eclipse.swt.graphics.GC; |
| 22 |
import org.eclipse.swt.graphics.Image; |
29 |
import org.eclipse.swt.graphics.Image; |
| 23 |
import org.eclipse.swt.graphics.Point; |
30 |
import org.eclipse.swt.graphics.Point; |
| 24 |
import org.eclipse.swt.graphics.Rectangle; |
31 |
import org.eclipse.swt.graphics.Rectangle; |
| 25 |
import org.eclipse.swt.layout.FillLayout; |
|
|
| 26 |
import org.eclipse.swt.layout.GridData; |
| 27 |
import org.eclipse.swt.layout.GridLayout; |
32 |
import org.eclipse.swt.layout.GridLayout; |
| 28 |
import org.eclipse.swt.widgets.Button; |
33 |
import org.eclipse.swt.widgets.Button; |
| 29 |
import org.eclipse.swt.widgets.Canvas; |
34 |
import org.eclipse.swt.widgets.Canvas; |
|
Lines 44-55
Link Here
|
| 44 |
|
49 |
|
| 45 |
private Button makeShotButton; |
50 |
private Button makeShotButton; |
| 46 |
|
51 |
|
| 47 |
private Button showShotButton; |
52 |
private Button cropShotButton; |
|
|
53 |
|
| 54 |
private Button fitShotButton; |
| 55 |
|
| 56 |
private Button revertShotButton; |
| 48 |
|
57 |
|
| 49 |
private Image screenshotImage; |
58 |
private Image screenshotImage; |
| 50 |
|
59 |
|
|
|
60 |
private Image originalshotImage; |
| 61 |
|
| 51 |
private Canvas canvas; |
62 |
private Canvas canvas; |
| 52 |
|
63 |
|
|
|
64 |
private ScrolledComposite scrolledComposite; |
| 65 |
|
| 53 |
protected ScreenShotAttachmentPage(LocalAttachment attachment) { |
66 |
protected ScreenShotAttachmentPage(LocalAttachment attachment) { |
| 54 |
super("ScreenShotAttachment"); |
67 |
super("ScreenShotAttachment"); |
| 55 |
setTitle("Create a screenshot"); |
68 |
setTitle("Create a screenshot"); |
|
Lines 58-121
Link Here
|
| 58 |
} |
71 |
} |
| 59 |
|
72 |
|
| 60 |
public void createControl(Composite parent) { |
73 |
public void createControl(Composite parent) { |
|
|
74 |
|
| 61 |
Composite composite = new Composite(parent, SWT.NONE); |
75 |
Composite composite = new Composite(parent, SWT.NONE); |
| 62 |
GridLayout gridLayout = new GridLayout(); |
76 |
composite.setLayout(new GridLayout()); |
| 63 |
gridLayout.numColumns = 2; |
|
|
| 64 |
composite.setLayout(gridLayout); |
| 65 |
setControl(composite); |
77 |
setControl(composite); |
| 66 |
|
78 |
|
| 67 |
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); |
79 |
Composite buttonsComposite = new Composite(composite, SWT.NONE); |
| 68 |
composite.setLayout(new GridLayout(3, false)); |
80 |
buttonsComposite.setLayout(new GridLayout(4, false)); |
| 69 |
|
81 |
makeShotButton = new Button(buttonsComposite, SWT.PUSH); |
| 70 |
makeShotButton = new Button(composite, SWT.PUSH); |
82 |
makeShotButton.setText("Capture full screen"); |
| 71 |
makeShotButton.setText("Take a screenshot"); |
83 |
makeShotButton.setImage(TasksUiPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN, |
|
|
84 |
"icons/etool16/scr-fullscreen.gif").createImage()); |
| 72 |
makeShotButton.addSelectionListener(new SelectionListener() { |
85 |
makeShotButton.addSelectionListener(new SelectionListener() { |
| 73 |
|
86 |
|
| 74 |
public void widgetSelected(SelectionEvent e) { |
87 |
public void widgetSelected(SelectionEvent e) { |
| 75 |
storeScreenshotContent(); |
88 |
storeScreenshotContent(); |
| 76 |
page.setErrorMessage(null); |
89 |
page.setErrorMessage(null); |
| 77 |
showShotButton.setEnabled(true); |
90 |
cropShotButton.setEnabled(true); |
|
|
91 |
fitShotButton.setEnabled(true); |
| 92 |
} |
| 93 |
|
| 94 |
public void widgetDefaultSelected(SelectionEvent e) { |
| 95 |
//ignore |
| 96 |
} |
| 97 |
|
| 98 |
}); |
| 99 |
|
| 100 |
cropShotButton = new Button(buttonsComposite, SWT.PUSH); |
| 101 |
cropShotButton.setText("Crop a region"); |
| 102 |
cropShotButton.setImage(TasksUiPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN, |
| 103 |
"icons/etool16/scr-crop.gif").createImage()); |
| 104 |
cropShotButton.addSelectionListener(new SelectionListener() { |
| 105 |
|
| 106 |
public void widgetSelected(SelectionEvent e) { |
| 107 |
cropScreenshotContent(); |
| 108 |
} |
| 109 |
|
| 110 |
public void widgetDefaultSelected(SelectionEvent e) { |
| 111 |
//ignore |
| 112 |
} |
| 113 |
|
| 114 |
}); |
| 115 |
cropShotButton.setEnabled(false); |
| 116 |
|
| 117 |
fitShotButton = new Button(buttonsComposite, SWT.TOGGLE); |
| 118 |
fitShotButton.setText("Fit image"); |
| 119 |
fitShotButton.setImage(TasksUiPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN, |
| 120 |
"icons/etool16/scr-fit.gif").createImage()); |
| 121 |
fitShotButton.addSelectionListener(new SelectionListener() { |
| 122 |
|
| 123 |
public void widgetSelected(SelectionEvent e) { |
| 124 |
drawCanvas(); |
| 78 |
} |
125 |
} |
| 79 |
|
126 |
|
| 80 |
public void widgetDefaultSelected(SelectionEvent e) { |
127 |
public void widgetDefaultSelected(SelectionEvent e) { |
|
|
128 |
// ignore |
| 81 |
} |
129 |
} |
| 82 |
|
130 |
|
| 83 |
}); |
131 |
}); |
|
|
132 |
fitShotButton.setSelection(true); |
| 133 |
fitShotButton.setEnabled(false); |
| 84 |
|
134 |
|
| 85 |
showShotButton = new Button(composite, SWT.PUSH); |
135 |
revertShotButton = new Button(buttonsComposite, SWT.PUSH); |
| 86 |
showShotButton.setText("Show the screenshot"); |
136 |
revertShotButton.setText("Revert to original"); |
| 87 |
showShotButton.addSelectionListener(new SelectionListener() { |
137 |
revertShotButton.setImage(TasksUiPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN, |
|
|
138 |
"icons/etool16/scr-revert.gif").createImage()); |
| 139 |
revertShotButton.addSelectionListener(new SelectionListener() { |
| 88 |
|
140 |
|
| 89 |
public void widgetSelected(SelectionEvent e) { |
141 |
public void widgetSelected(SelectionEvent e) { |
| 90 |
showScreenshotContent(); |
142 |
GC gc = new GC(originalshotImage); |
|
|
143 |
screenshotImage = new Image(originalshotImage.getDevice(), originalshotImage.getBounds()); |
| 144 |
gc.copyArea(screenshotImage, 0, 0); |
| 145 |
gc.dispose(); |
| 146 |
drawCanvas(); |
| 147 |
revertShotButton.setEnabled(false); |
| 91 |
} |
148 |
} |
| 92 |
|
149 |
|
| 93 |
public void widgetDefaultSelected(SelectionEvent e) { |
150 |
public void widgetDefaultSelected(SelectionEvent e) { |
|
|
151 |
// ignore |
| 94 |
} |
152 |
} |
| 95 |
|
153 |
|
| 96 |
}); |
154 |
}); |
|
|
155 |
revertShotButton.setEnabled(false); |
| 97 |
|
156 |
|
| 98 |
canvas = new Canvas(composite, SWT.BORDER); |
157 |
scrolledComposite = new ScrolledComposite(composite, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); |
| 99 |
canvas.setLayoutData(GridDataFactory.fillDefaults() |
158 |
scrolledComposite.setLayoutData(GridDataFactory.fillDefaults() |
| 100 |
.align(SWT.FILL, SWT.FILL) |
159 |
.align(SWT.FILL, SWT.FILL) |
| 101 |
.grab(true, true) |
160 |
.grab(true, true) |
| 102 |
.span(2, 1) |
|
|
| 103 |
.create()); |
161 |
.create()); |
| 104 |
|
162 |
|
|
|
163 |
canvas = new Canvas(scrolledComposite, SWT.DOUBLE_BUFFERED | SWT.NONE); |
| 164 |
scrolledComposite.setContent(canvas); |
| 105 |
canvas.addPaintListener(new PaintListener() { |
165 |
canvas.addPaintListener(new PaintListener() { |
| 106 |
public void paintControl(PaintEvent e) { |
166 |
public void paintControl(PaintEvent e) { |
| 107 |
if (screenshotImage != null) { |
167 |
if (screenshotImage != null) { |
| 108 |
Rectangle screenBounds = screenshotImage.getBounds(); |
168 |
Rectangle imageBounds = screenshotImage.getBounds(); |
|
|
169 |
Rectangle originalBounds = originalshotImage.getBounds(); |
| 109 |
Rectangle canvasBounds = canvas.getBounds(); |
170 |
Rectangle canvasBounds = canvas.getBounds(); |
| 110 |
e.gc.drawImage(screenshotImage, 0, 0, screenBounds.width, screenBounds.height, 0, 0, |
171 |
|
| 111 |
canvasBounds.width, canvasBounds.height); |
172 |
if (fitShotButton.getSelection()) { |
|
|
173 |
e.gc.drawImage(screenshotImage, 0, 0, imageBounds.width, imageBounds.height, 0, 0, |
| 174 |
canvasBounds.width, canvasBounds.height); |
| 175 |
} else |
| 176 |
e.gc.drawImage(screenshotImage, 0, 0); |
| 177 |
|
| 178 |
if (!imageBounds.equals(originalBounds)) |
| 179 |
revertShotButton.setEnabled(true); |
| 180 |
|
| 112 |
} else { |
181 |
} else { |
| 113 |
page.setErrorMessage("Screenshot required"); |
182 |
page.setErrorMessage("Screenshot required"); |
| 114 |
showShotButton.setEnabled(false); |
183 |
cropShotButton.setEnabled(false); |
|
|
184 |
fitShotButton.setEnabled(false); |
| 185 |
revertShotButton.setEnabled(false); |
| 115 |
} |
186 |
} |
| 116 |
} |
187 |
} |
| 117 |
}); |
188 |
}); |
| 118 |
|
189 |
|
|
|
190 |
scrolledComposite.addControlListener(new ControlAdapter() { |
| 191 |
@Override |
| 192 |
public void controlResized(ControlEvent e) { |
| 193 |
drawCanvas(); |
| 194 |
} |
| 195 |
}); |
| 196 |
|
| 119 |
} |
197 |
} |
| 120 |
|
198 |
|
| 121 |
@Override |
199 |
@Override |
|
Lines 139-144
Link Here
|
| 139 |
return isPageComplete(); |
217 |
return isPageComplete(); |
| 140 |
} |
218 |
} |
| 141 |
|
219 |
|
|
|
220 |
private void drawCanvas() { |
| 221 |
if (fitShotButton.getSelection()) { |
| 222 |
Rectangle bounds = scrolledComposite.getBounds(); |
| 223 |
bounds.width -= 5; |
| 224 |
bounds.height -= 5; |
| 225 |
canvas.setBounds(bounds); |
| 226 |
} else { |
| 227 |
canvas.setBounds(screenshotImage.getBounds()); |
| 228 |
} |
| 229 |
scrolledComposite.redraw(); |
| 230 |
canvas.redraw(); |
| 231 |
} |
| 232 |
|
| 142 |
private void storeScreenshotContent() { |
233 |
private void storeScreenshotContent() { |
| 143 |
|
234 |
|
| 144 |
final Display display = Display.getDefault(); |
235 |
final Display display = Display.getDefault(); |
|
Lines 148-157
Link Here
|
| 148 |
display.asyncExec(new Runnable() { |
239 |
display.asyncExec(new Runnable() { |
| 149 |
public void run() { |
240 |
public void run() { |
| 150 |
GC gc = new GC(display); |
241 |
GC gc = new GC(display); |
| 151 |
screenshotImage = new Image(display, display.getBounds()); |
242 |
Rectangle displayBounds = display.getBounds(); |
|
|
243 |
screenshotImage = new Image(display, displayBounds); |
| 244 |
originalshotImage = new Image(display, displayBounds); |
| 152 |
gc.copyArea(screenshotImage, 0, 0); |
245 |
gc.copyArea(screenshotImage, 0, 0); |
|
|
246 |
gc.copyArea(originalshotImage, 0, 0); |
| 247 |
gc.drawRectangle(0, 0, displayBounds.width - 1, displayBounds.height - 1); |
| 153 |
gc.dispose(); |
248 |
gc.dispose(); |
| 154 |
canvas.redraw(); |
249 |
drawCanvas(); |
| 155 |
wizardShell.setVisible(true); |
250 |
wizardShell.setVisible(true); |
| 156 |
if (screenshotImage != null) |
251 |
if (screenshotImage != null) |
| 157 |
setPageComplete(true); |
252 |
setPageComplete(true); |
|
Lines 159-192
Link Here
|
| 159 |
}); |
254 |
}); |
| 160 |
} |
255 |
} |
| 161 |
|
256 |
|
| 162 |
private void showScreenshotContent() { |
257 |
private void cropScreenshotContent() { |
| 163 |
Display display = Display.getDefault(); |
258 |
|
|
|
259 |
final Point downPoint = new Point(-1, -1); |
| 260 |
final Rectangle newImageBounds = new Rectangle(-1, -1, -1, -1); |
| 164 |
|
261 |
|
| 165 |
Shell popup = new Shell(display.getActiveShell(), SWT.SHELL_TRIM); |
262 |
final Display display = Display.getDefault(); |
| 166 |
popup.setLayout(new FillLayout()); |
263 |
final Rectangle displayBounds = display.getBounds(); |
| 167 |
popup.setText("Screenshot Image"); |
264 |
|
|
|
265 |
final Shell popup = new Shell(display.getActiveShell(), SWT.SHELL_TRIM); |
| 266 |
popup.setLayout(new GridLayout()); |
| 267 |
popup.setText("Crop a region of the screenshot"); |
| 168 |
|
268 |
|
| 169 |
Rectangle displayBounds = Display.getDefault().getBounds(); |
|
|
| 170 |
Point dialogSize = new Point(0, 0); |
269 |
Point dialogSize = new Point(0, 0); |
| 171 |
dialogSize.x = displayBounds.width / 2; |
270 |
dialogSize.x = displayBounds.width - 100; |
| 172 |
dialogSize.y = displayBounds.height / 2; |
271 |
dialogSize.y = displayBounds.height - 100; |
| 173 |
Point dialoglocation = new Point(0, 0); |
272 |
Point dialoglocation = new Point(0, 0); |
| 174 |
dialoglocation.x = displayBounds.x + displayBounds.width / 2 - dialogSize.x / 2; |
273 |
dialoglocation.x = displayBounds.x + displayBounds.width / 2 - dialogSize.x / 2; |
| 175 |
dialoglocation.y = displayBounds.y + displayBounds.height / 2 - dialogSize.y / 2; |
274 |
dialoglocation.y = displayBounds.y + displayBounds.height / 2 - dialogSize.y / 2; |
| 176 |
popup.setSize(dialogSize); |
275 |
popup.setSize(dialogSize); |
| 177 |
popup.setLocation(dialoglocation); |
276 |
popup.setLocation(dialoglocation); |
| 178 |
|
277 |
|
| 179 |
ScrolledComposite sc = new ScrolledComposite(popup, SWT.V_SCROLL | SWT.H_SCROLL); |
278 |
final Rectangle originalBounds = screenshotImage.getBounds(); |
| 180 |
Canvas canvas = new Canvas(sc, SWT.NONE); |
279 |
final Image bufferedImage = new Image(display, originalBounds); |
| 181 |
sc.setContent(canvas); |
280 |
GC gc = new GC(bufferedImage); |
| 182 |
canvas.setBounds(display.getBounds()); |
281 |
gc.setBackground(popup.getBackground()); |
| 183 |
canvas.addPaintListener(new PaintListener() { |
282 |
gc.fillRectangle(originalBounds); |
|
|
283 |
gc.drawImage(screenshotImage, 0, 0); |
| 284 |
gc.dispose(); |
| 285 |
|
| 286 |
Composite bc = new Composite(popup, SWT.NONE); |
| 287 |
bc.setLayout(new GridLayout(3, false)); |
| 288 |
|
| 289 |
final Button saveButton = new Button(bc, SWT.PUSH); |
| 290 |
saveButton.setText("Save"); |
| 291 |
saveButton.addSelectionListener(new SelectionListener() { |
| 292 |
public void widgetSelected(SelectionEvent e) { |
| 293 |
if (newImageBounds.x != -1 && newImageBounds.y != -1) { |
| 294 |
screenshotImage = new Image(display, newImageBounds); |
| 295 |
GC drawGc = new GC(screenshotImage); |
| 296 |
drawGc.drawImage(bufferedImage, newImageBounds.x, newImageBounds.y, newImageBounds.width, |
| 297 |
newImageBounds.height, 0, 0, newImageBounds.width, newImageBounds.height); |
| 298 |
drawGc.drawRectangle(0, 0, newImageBounds.width - 1, newImageBounds.height - 1); |
| 299 |
drawGc.dispose(); |
| 300 |
drawCanvas(); |
| 301 |
popup.close(); |
| 302 |
} |
| 303 |
} |
| 304 |
|
| 305 |
public void widgetDefaultSelected(SelectionEvent e) { |
| 306 |
// ignore |
| 307 |
} |
| 308 |
}); |
| 309 |
saveButton.setEnabled(false); |
| 310 |
|
| 311 |
final Button cancelButton = new Button(bc, SWT.PUSH); |
| 312 |
cancelButton.setText("Cancel"); |
| 313 |
cancelButton.addSelectionListener(new SelectionListener() { |
| 314 |
public void widgetSelected(SelectionEvent e) { |
| 315 |
popup.close(); |
| 316 |
} |
| 317 |
|
| 318 |
public void widgetDefaultSelected(SelectionEvent e) { |
| 319 |
// ignore |
| 320 |
} |
| 321 |
}); |
| 322 |
|
| 323 |
final ScrolledComposite sc = new ScrolledComposite(popup, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); |
| 324 |
sc.setLayoutData(GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).create()); |
| 325 |
final Canvas scCanvas = new Canvas(sc, SWT.DOUBLE_BUFFERED | SWT.NONE); |
| 326 |
scCanvas.setBounds(originalBounds); |
| 327 |
scCanvas.addPaintListener(new PaintListener() { |
| 184 |
public void paintControl(PaintEvent e) { |
328 |
public void paintControl(PaintEvent e) { |
| 185 |
if (screenshotImage != null) |
329 |
if (screenshotImage != null) |
| 186 |
e.gc.drawImage(screenshotImage, 0, 0); |
330 |
e.gc.drawImage(bufferedImage, 0, 0); |
| 187 |
} |
331 |
} |
| 188 |
}); |
332 |
}); |
|
|
333 |
sc.setContent(scCanvas); |
| 334 |
|
| 335 |
final GC selectionGc = new GC(scCanvas); |
| 336 |
|
| 337 |
final MouseMoveListener mouseMoveListener = new MouseMoveListener() { |
| 338 |
public void mouseMove(MouseEvent e) { |
| 339 |
if (downPoint.x != -1 && downPoint.y != -1) { |
| 340 |
int width = e.x - downPoint.x; |
| 341 |
int height = e.y - downPoint.y; |
| 342 |
scCanvas.redraw(); |
| 343 |
selectionGc.drawRectangle(downPoint.x, downPoint.y, width, height); |
| 344 |
} |
| 345 |
} |
| 346 |
}; |
| 347 |
|
| 348 |
final MouseListener mouseListener = new MouseListener() { |
| 349 |
public void mouseUp(MouseEvent e) { |
| 350 |
if (downPoint.x != -1 && downPoint.y != -1) { |
| 351 |
|
| 352 |
int width; |
| 353 |
if (e.x > originalBounds.width) { |
| 354 |
width = originalBounds.width - downPoint.x; |
| 355 |
} else if (e.x < 0) { |
| 356 |
width = downPoint.x; |
| 357 |
downPoint.x = 0; |
| 358 |
} else { |
| 359 |
width = e.x - downPoint.x; |
| 360 |
} |
| 361 |
|
| 362 |
int height; |
| 363 |
if (e.y > originalBounds.height) { |
| 364 |
height = originalBounds.height - downPoint.y; |
| 365 |
} else if (e.y < 0) { |
| 366 |
height = downPoint.y; |
| 367 |
downPoint.y = 0; |
| 368 |
} else { |
| 369 |
height = e.y - downPoint.y; |
| 370 |
} |
| 371 |
|
| 372 |
display.getActiveShell().setCursor(new Cursor(null, SWT.CURSOR_ARROW)); |
| 373 |
|
| 374 |
selectionGc.drawRectangle(downPoint.x, downPoint.y, width, height); |
| 375 |
|
| 376 |
newImageBounds.x = downPoint.x; |
| 377 |
newImageBounds.y = downPoint.y; |
| 378 |
newImageBounds.width = width; |
| 379 |
newImageBounds.height = height; |
| 380 |
|
| 381 |
sc.removeMouseMoveListener(mouseMoveListener); |
| 382 |
sc.removeMouseListener(this); |
| 383 |
downPoint.x = -1; |
| 384 |
downPoint.y = -1; |
| 385 |
|
| 386 |
saveButton.setEnabled(true); |
| 387 |
} |
| 388 |
} |
| 389 |
|
| 390 |
public void mouseDown(MouseEvent e) { |
| 391 |
if (downPoint.x == -1 && downPoint.y == -1) { |
| 392 |
display.getActiveShell().setCursor(new Cursor(null, SWT.CURSOR_CROSS)); |
| 393 |
downPoint.x = e.x; |
| 394 |
downPoint.y = e.y; |
| 395 |
selectionGc.setLineStyle(SWT.LINE_DASH); |
| 396 |
scCanvas.addMouseMoveListener(mouseMoveListener); |
| 397 |
} |
| 398 |
} |
| 399 |
|
| 400 |
public void mouseDoubleClick(MouseEvent e) { |
| 401 |
// ignore |
| 402 |
} |
| 403 |
}; |
| 404 |
|
| 405 |
scCanvas.addMouseListener(mouseListener); |
| 406 |
|
| 189 |
popup.open(); |
407 |
popup.open(); |
|
|
408 |
|
| 190 |
} |
409 |
} |
| 191 |
|
410 |
|
| 192 |
public Image getScreenshotImage() { |
411 |
public Image getScreenshotImage() { |