KickJava   Java API By Example, From Geeks To Geeks.

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


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
15 /**
16  * This event is sent when a line is about to be drawn.
17  */

18 public class LineStyleEvent extends TypedEvent {
19     
20     /**
21      * line start offset (input)
22      */

23     public int lineOffset;
24     
25     /**
26      * line text (input)
27      */

28     public String JavaDoc lineText;
29     
30     /**
31      * line ranges (output)
32      *
33      * @since 3.2
34      */

35     public int[] ranges;
36     
37     /**
38      * line styles (output)
39      *
40      * Note: Because a StyleRange includes the start and length, the
41      * same instance cannot occur multiple times in the array of styles.
42      * If the same style attributes, such as font and color, occur in
43      * multiple StyleRanges, <code>ranges</code> can be used to share
44      * styles and reduce memory usage.
45      */

46     public StyleRange[] styles;
47
48     /**
49      * line alignment (input, output)
50      *
51      * @since 3.2
52      */

53     public int alignment;
54
55     /**
56      * line indent (input, output)
57      *
58      * @since 3.2
59      */

60     public int indent;
61
62     /**
63      * line justification (input, output)
64      *
65      * @since 3.2
66      */

67     public boolean justify;
68
69     /**
70      * line bullet (output)
71      * @since 3.2
72      */

73     public Bullet bullet;
74
75     /**
76      * line bullet index (output)
77      * @since 3.2
78      */

79     public int bulletIndex;
80     
81     static final long serialVersionUID = 3906081274027192884L;
82     
83 public LineStyleEvent(StyledTextEvent e) {
84     super(e);
85     lineOffset = e.detail;
86     lineText = e.text;
87     alignment = e.alignment;
88     justify = e.justify;
89     indent = e.indent;
90     bullet = e.bullet;
91     bulletIndex = e.bulletIndex;
92 }
93 }
94
Popular Tags