summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PaintObjectEvent.java
blob: 3c6a3ca54552d281cc4a5f79918ca24b9fb269f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.custom;

import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;

/**
 * This event is sent when an object needs to be drawn.
 * 
 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
 *
 * @since 3.2
 */
public class PaintObjectEvent extends TypedEvent {
	
	/**
	 * the GC
	 */
	public GC gc;
	
	/**
	 * the x location
	 */
	public int x;
	
	/**
	 * the y location
	 */
	public int y;
	
	/**
	 * the line ascent
	 */
	public int ascent;
	
	/**
	 * the line descent
	 */
	public int descent;
	
	/**
	 * the StyleRange
	 */
	public StyleRange style;
	
	/**
	 * the Bullet
	 */
	public Bullet bullet;
	
	/**
	 * the bullet index
	 */
	public int bulletIndex;
	
	static final long serialVersionUID = 3906081274027192855L;

/**
 * Constructs a new instance of this class based on the
 * information in the given event.
 *
 * @param e the event containing the information
 */
public PaintObjectEvent(StyledTextEvent e) {
	super(e);
	gc = e.gc;
	x = e.x;
	y = e.y;
	ascent = e.ascent;
	descent = e.descent;
	style = e.style;
	bullet = e.bullet;
	bulletIndex = e.bulletIndex;
}
}