KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > custom > PaintObjectEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.swt.custom;
12
13 import org.eclipse.swt.events.*;
14 import org.eclipse.swt.graphics.*;
15
16 /**
17  * This event is sent when an object needs to be drawn.
18  *
19  * @since 3.2
20  */

21 public class PaintObjectEvent extends TypedEvent {
22     
23     /**
24      * the GC
25      */

26     public GC gc;
27     
28     /**
29      * the x location
30      */

31     public int x;
32     
33     /**
34      * the y location
35      */

36     public int y;
37     
38     /**
39      * the line ascent
40      */

41     public int ascent;
42     
43     /**
44      * the line descent
45      */

46     public int descent;
47     
48     /**
49      * the StyleRange
50      */

51     public StyleRange style;
52     
53     /**
54      * the Bullet
55      */

56     public Bullet bullet;
57     
58     /**
59      * the bullet index
60      */

61     public int bulletIndex;
62     
63     static final long serialVersionUID = 3906081274027192855L;
64     
65 public PaintObjectEvent(StyledTextEvent e) {
66     super(e);
67     gc = e.gc;
68     x = e.x;
69     y = e.y;
70     ascent = e.ascent;
71     descent = e.descent;
72     style = e.style;
73     bullet = e.bullet;
74     bulletIndex = e.bulletIndex;
75 }
76 }
77
Popular Tags