1 /******************************************************************************* 2 * Copyright (c) 2000, 2011 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.swt.custom; 15 16 import org.eclipse.swt.events.*; 17 import org.eclipse.swt.graphics.*; 18 19 /** 20 * This event is sent when a line is about to be drawn. 21 * 22 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> 23 */ 24 public class LineBackgroundEvent extends TypedEvent { 25 26 /** 27 * line start offset 28 */ 29 public int lineOffset; 30 31 /** 32 * line text 33 */ 34 public String lineText; 35 36 /** 37 * line background color 38 */ 39 public Color lineBackground; 40 41 static final long serialVersionUID = 3978711687853324342L; 42 43 /** 44 * Constructs a new instance of this class based on the 45 * information in the given event. 46 * 47 * @param e the event containing the information 48 */ LineBackgroundEvent(StyledTextEvent e)49public LineBackgroundEvent(StyledTextEvent e) { 50 super(e); 51 lineOffset = e.detail; 52 lineText = e.text; 53 lineBackground = e.lineBackground; 54 } 55 } 56 57 58